36 FatalErrorIn(
"uniformInterpolationTable<Type>::checkTable()")
37 <<
"Table " <<
name() <<
": must have at least 2 values." <<
nl 38 <<
"Table size = " << size() <<
nl 39 <<
" min, interval width = " << x0_ <<
", " << dx_ <<
nl 65 dict.
lookup(
"data") >> *
this;
79 const word& tableName,
82 const bool initialiseOnly
108 dict.
lookup(
"data") >> *
this;
154 "uniformInterpolationTable<Type>::interpolate(scalar x)" 155 ) <<
"Supplied value is less than minimum table value:" <<
nl 156 <<
"xMin=" << x0_ <<
", xMax=" <<
xMax() <<
", x=" << x <<
nl 164 "uniformInterpolationTable<Type>::interpolate(scalar x)" 165 ) <<
"Supplied value is greater than maximum table value:" <<
nl 166 <<
"xMin=" << x0_ <<
", xMax=" <<
xMax() <<
", x=" << x <<
nl 171 const label i =
static_cast<label>((x - x0_)/dx_);
173 const scalar xLo = x0_ + i*dx_;
175 Type fx = (x - xLo)/dx_*(
operator[](i+1) - operator[](i)) +
operator[](i);
179 Info<<
"Table: " <<
name() <<
", x=" << x
180 <<
", x_lo=" << xLo <<
", x_hi=" << xLo + dx_
181 <<
", f(x_lo)=" << operator[](i) <<
", f(x_hi)=" << operator[](i+1)
182 <<
", f(x)=" << fx <<
endl;
201 else if (bound_ && (x <= 0))
209 "uniformInterpolationTable<Type>::interpolateLog10(scalar x)" 210 ) <<
"Table " <<
name() <<
nl 211 <<
"Supplied value must be greater than 0 when in log10 mode" 230 dict.
add(
"log10", log10_);
234 dict.
add(
"bound", bound_);
237 dict.regIOobject::write();
word name(const complex &)
Return a string representation of a complex.
Type interpolateLog10(scalar x) const
Interpolate - takes log10 flag into account.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
uniformInterpolationTable(const IOobject &, const bool readFields)
Construct from IOobject and readFields flag.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedScalar log10(const dimensionedScalar &ds)
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
Type interpolate(scalar x) const
Interpolate.
tmp< surfaceScalarField > interpolate(const RhoType &rho)
void write() const
Write.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const word & constant() const
Return constant name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Table with uniform interval in independant variable, with linear interpolation.
const label nIntervals(readLabel(pdfDictionary.lookup("nIntervals")))
bool add(entry *, bool mergeEntry=false)
Add a new entry.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
points setSize(newPointi)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Registry of regIOobjects.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
const Time & time() const
Return time.
This function object reads fields from the time directories and adds them to the mesh database for fu...
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
~uniformInterpolationTable()
Destructor.