38 dictName_(dict.
name()),
39 low_(dict.
lookup<scalar>(
"low")),
40 high_(dict.
lookup<scalar>(
"high")),
41 values_(dict.
lookup(
"values"))
43 if (values_.size() < 2)
47 <<
" " << dictName_ <<
nl 48 <<
" has less than 2 entries." 53 delta_ = (high_ - low_)/(values_.size() - 1);
63 const scalar nd = (x - low_)/delta_;
66 if (nd < 0 || i > values_.size() - 2)
69 << x <<
" out of range " 70 << low_ <<
" to " << high_ <<
nl 71 <<
" of table " << dictName_
75 const scalar xi = low_ + i*delta_;
76 const scalar
lambda = (x - xi)/delta_;
78 return values_[i] + lambda*(values_[i + 1] - values_[i]);
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...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedScalar lambda(viscosity->lookup("lambda"))
const fileName & name() const
Return the dictionary name.
A class for handling words, derived from string.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
word name(const complex &)
Return a string representation of a complex.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.