Go to the documentation of this file.
42 <<
"Table " <<
name() <<
": must have at least 2 values." <<
nl
43 <<
"Table size = " << size() <<
nl
44 <<
" min, interval width = " << x0_ <<
", " << dx_ <<
nl
70 dict.readEntry(
"data", *
this);
71 dict.readEntry(
"x0", x0_);
72 dict.readEntry(
"dx", dx_);
73 dict.readIfPresent(
"log10", log10_);
74 dict.readIfPresent(
"bound", bound_);
84 const word& tableName,
87 const bool initialiseOnly
100 x0_(
dict.get<scalar>(
"x0")),
101 dx_(
dict.get<scalar>(
"dx")),
102 log10_(
dict.getOrDefault<
Switch>(
"log10",
false)),
103 bound_(
dict.getOrDefault<
Switch>(
"bound",
false))
107 const scalar
xMax =
dict.get<scalar>(
"xMax");
113 dict.readEntry(
"data", *
this);
158 <<
"Supplied value is less than minimum table value:" <<
nl
159 <<
"xMin=" << x0_ <<
", xMax=" <<
xMax() <<
", x=" <<
x <<
nl
166 <<
"Supplied value is greater than maximum table value:" <<
nl
167 <<
"xMin=" << x0_ <<
", xMax=" <<
xMax() <<
", x=" <<
x <<
nl
172 const label i =
static_cast<label
>((
x - x0_)/dx_);
174 const scalar xLo = x0_ + i*dx_;
176 Type fx = (
x - xLo)/dx_*(
operator[](i+1) - operator[](i)) +
operator[](i);
180 Info<<
"Table: " <<
name() <<
", x=" <<
x
181 <<
", x_lo=" << xLo <<
", x_hi=" << xLo + dx_
182 <<
", f(x_lo)=" << operator[](i) <<
", f(x_hi)=" << operator[](i+1)
183 <<
", f(x)=" << fx <<
endl;
202 else if (bound_ && (
x <= 0))
209 <<
"Table " <<
name() <<
nl
210 <<
"Supplied value must be greater than 0 when in log10 mode"
229 dict.add(
"log10", log10_);
233 dict.add(
"bound", bound_);
236 dict.regIOobject::writeObject
int debug
Static debugging option.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
points setSize(newPointi)
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A class for handling words, derived from Foam::string.
static constexpr const zero Zero
Global zero (0)
const Time & time() const
Return time.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Registry of regIOobjects.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
dimensionedScalar log10(const dimensionedScalar &ds)
The IOstreamOption is a simple container for options an IOstream can normally have.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const label nIntervals(pdfDictionary.get< label >("nIntervals"))
errorManipArg< error, int > exit(error &err, const int errNo=1)
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const word & constant() const
Return constant name.
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.