49 if (values_.size() < 2)
54 <<
" has less than 2 entries."
59 low_ = values_.first().first();
60 high_ = values_.last().first();
62 for(
label i = 1; i<values_.size(); i++)
64 delta_ =
min(delta_, values_[i].
first() - values_[i - 1].
first());
69 jumpTable_.
setSize((high_ - low_)/delta_ + 1);
74 const scalar
x = low_ + j*delta_;
76 if (
x > values_[i + 1].
first())
98 jumpTable_(
nut.jumpTable_),
99 reader_(
nut.reader_, false)
112 const scalar xi = values_[i].first();
113 const scalar
lambda = (
x - xi)/(values_[i + 1].
first() - xi);
117 +
lambda*(values_[i + 1].second() - values_[i].second());
143 /(values_[i + 1].first() - values_[i].first());
154 reader_->write(os,
units, values_);
168 values_ =
nut.values_;
170 jumpTable_ =
nut.jumpTable_;
171 reader_ =
nut.reader_->clone();
#define forAll(list, i)
Loop across all elements in list.
const word & name() const
Return the name of the entry.
void setSize(const label)
Reset size of List.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Macros for creating standard TableReader-s.
A list of keyword definitions, which are a keyword followed by any number of values (e....
A class for handling words, derived from string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
dimensionedScalar lambda(viscosity->lookup("lambda"))
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.
labelList second(const UList< labelPair > &p)
labelList first(const UList< labelPair > &p)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
const HashTable< unitConversion > & units()
Get the table of unit conversions.
void assertNoConvertUnits(const word &typeName, const Function1s::unitConversions &units, const dictionary &dict)
Generate an error in an context where unit conversions are not supported.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)