39 low_(
dict.lookup(
"low")),
40 high_(
dict.lookup(
"high")),
41 values_(
dict.lookup(
"values"))
45 if (values_.m() < 2 || values_.n() < 2)
50 <<
" has less than 2 entries in one or both dimensions."
55 deltax_ = (high_.
first() - low_.
first())/(values_.m() - 1);
56 deltay_ = (high_.
second() - low_.
second())/(values_.n() - 1);
74 if (ndx < 0 || ix > values_.m() - 2)
77 <<
"x " <<
x <<
" out of range "
78 << low_.first() <<
" to " << high_.first() <<
nl
79 <<
" of table " << this->name_
83 if (ndy < 0 || iy > values_.n() - 2)
86 <<
"y " <<
y <<
" out of range "
87 << low_.second() <<
" to " << high_.second() <<
nl
88 <<
" of table " << this->name_
101 const scalar ndx = (
x - low_.first())/deltax_;
102 const label ix = ndx;
104 const scalar ndy = (
y - low_.second())/deltay_;
105 const label iy = ndy;
107 checkRange(
x, ndx, ix,
y, ndy, iy);
109 const scalar xi = low_.first() + ix*deltax_;
110 const scalar lambdax = (
x - xi)/deltax_;
115 + lambdax*(values_(ix + 1, iy) - values_(ix, iy));
120 + lambdax*(values_(ix + 1, iy + 1) - values_(ix, iy + 1));
122 const scalar yi = low_.second() + iy*deltay_;
123 const scalar lambday = (
y - yi)/deltay_;
126 return fxi + lambday*(fxix1 - fxi);
137 const scalar ndp = (
p - low_.first())/deltax_;
138 const label ip = ndp;
140 const scalar ndT = (
T - low_.second())/deltay_;
141 const label iT = ndT;
143 checkRange(
p, ndp, ip,
T, ndT, iT);
146 (values_(ip + 1, iT) - values_(ip, iT))/deltax_;
148 (values_(ip + 1, iT + 1) - values_(ip, iT + 1))/deltax_;
150 const scalar Ti = low_.second() + iT*deltay_;
151 const scalar lambdaT = (
T - Ti)/deltay_;
154 return dfdpi + lambdaT*(dfdpip1 - dfdpi);
165 const scalar ndp = (
p - low_.first())/deltax_;
166 const label ip = ndp;
168 const scalar ndT = (
T - low_.second())/deltay_;
169 const label iT = ndT;
171 checkRange(
p, ndp, ip,
T, ndT, iT);
174 (values_(ip, iT + 1) - values_(ip, iT))/deltay_;
176 (values_(ip + 1, iT + 1) - values_(ip + 1, iT))/deltay_;
178 const scalar
pi = low_.first() + ip*deltax_;
179 const scalar lambdap = (
p -
pi)/deltax_;
182 return dfdTi + lambdap*(dfdTip1 - dfdTi);
const word name_
Name of entry.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const Type & second() const
Return second.
const Type & first() const
Return first.
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 FatalErrorInFunction
Report an error message using Foam::FatalError.
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.
const HashTable< unitConversion > & units()
Get the table of unit conversions.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
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)