39 high_(dict.
lookup(
"high")),
40 values_(dict.
lookup(
"values"))
42 if (values_.m() < 2 || values_.n() < 2)
46 <<
" " << this->name_ <<
nl 47 <<
" has less than 2 entries in one or both dimensions." 52 deltax_ = (high_.first() - low_.first())/(values_.m() - 1);
53 deltay_ = (high_.second() - low_.second())/(values_.n() - 1);
71 if (ndx < 0 || ix > values_.m() - 2)
74 <<
"x " << x <<
" out of range " 75 << low_.first() <<
" to " << high_.first() <<
nl 76 <<
" of table " << this->name_
80 if (ndy < 0 || iy > values_.n() - 2)
83 <<
"y " << y <<
" out of range " 84 << low_.second() <<
" to " << high_.second() <<
nl 85 <<
" of table " << this->name_
98 const scalar ndx = (x - low_.first())/deltax_;
101 const scalar ndy = (y - low_.second())/deltay_;
102 const label iy = ndy;
104 checkRange(x, ndx, ix, y, ndy, iy);
106 const scalar xi = low_.first() + ix*deltax_;
107 const scalar lambdax = (x - xi)/deltax_;
112 + lambdax*(values_(ix + 1, iy) - values_(ix, iy));
117 + lambdax*(values_(ix + 1, iy + 1) - values_(ix, iy + 1));
119 const scalar yi = low_.second() + iy*deltay_;
120 const scalar lambday = (y - yi)/deltay_;
123 return fxi + lambday*(fxix1 - fxi);
135 const scalar ndp = (p - low_.first())/deltax_;
136 const label ip = ndp;
138 const scalar ndT = (T - low_.second())/deltay_;
139 const label iT = ndT;
141 checkRange(p, ndp, ip, T, ndT, iT);
144 (values_(ip + 1, iT) - values_(ip, iT))/deltax_;
146 (values_(ip + 1, iT + 1) - values_(ip, iT + 1))/deltax_;
148 const scalar Ti = low_.second() + iT*deltay_;
149 const scalar lambdaT = (T - Ti)/deltay_;
152 return dfdpi + lambdaT*(dfdpip1 - dfdpi);
164 const scalar ndp = (p - low_.first())/deltax_;
165 const label ip = ndp;
167 const scalar ndT = (T - low_.second())/deltay_;
168 const label iT = ndT;
170 checkRange(p, ndp, ip, T, ndT, iT);
173 (values_(ip, iT + 1) - values_(ip, iT))/deltay_;
175 (values_(ip + 1, iT + 1) - values_(ip + 1, iT))/deltay_;
177 const scalar
pi = low_.first() + ip*deltax_;
178 const scalar lambdap = (p -
pi)/deltax_;
181 return dfdTi + lambdap*(dfdTip1 - dfdTi);
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.
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.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.