44 if (values_.size() < 2)
49 <<
" has less than 2 entries." 54 low_ = values_.first().first();
55 high_ = values_.last().first();
57 for(
label i = 1; i<values_.size(); i++)
59 delta_ =
min(delta_, values_[i].first() - values_[i - 1].first());
64 jumpTable_.setSize((high_ - low_)/delta_ + 1);
69 const scalar x = low_ + j*delta_;
71 if (x > values_[i + 1].first())
93 jumpTable_(nut.jumpTable_),
94 reader_(nut.reader_,
false)
106 const label i = index(x);
107 const scalar xi = values_[i].first();
108 const scalar
lambda = (x - xi)/(values_[i + 1].first() - xi);
112 + lambda*(values_[i + 1].second() - values_[i].second());
134 const label i = index(T);
137 (values_[i + 1].second() - values_[i].second())
138 /(values_[i + 1].first() - values_[i].first());
145 reader_->write(os, values_);
152 void Foam::Function1s::NonUniformTable<Type>::operator=
159 values_ = nut.values_;
161 jumpTable_ = nut.jumpTable_;
162 reader_ = nut.reader_->clone();
Base class to read table data for tables.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar lambda(laminarTransport.lookup("lambda"))
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
A class for handling words, derived from string.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.