47 values_ = reader_->read(units,
dict);
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,...
Base class to read table data for tables.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
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"))
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.
labelList second(const UList< labelPair > &p)
void assertNoConvertUnits(const word &typeName, const Function1s::unitSets &units, const dictionary &dict)
Generate an error in an context where unit conversions are not supported.
labelList first(const UList< labelPair > &p)
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
Struct containing two unitSets for use in converting both the argument and the value of a Function1.