33 const word& entryName,
49 <<
"Polynomial coefficients for entry " << this->name_
57 canIntegrate_ =
false;
67 <<
"Polynomial " << this->name_ <<
" cannot be integrated" 77 const word& entryName,
88 <<
"Polynomial coefficients for entry " << this->name_
94 if (
mag(coeffs_[i].second() + 1) < rootVSmall)
96 canIntegrate_ =
false;
106 <<
"Polynomial " << this->name_ <<
" cannot be integrated" 117 coeffs_(poly.coeffs_),
118 canIntegrate_(poly.canIntegrate_)
136 Type
value = coeffs_[i].first();
137 for (
direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
#define forAll(list, i)
Loop across all elements in list.
Ostream & indent(Ostream &os)
Indent stream.
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 2-tuple for storing two objects of different types.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Ostream & endl(Ostream &os)
Add newline and flush stream.
Traits class for primitives.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
virtual void writeData(Ostream &os) const
Write in dictionary format.
Polynomial(const word &entryName, const dictionary &dict)
virtual scalar userTimeToTime(const scalar theta) const
Convert the user-time (e.g. CA deg) to real-time (s).
A class for handling words, derived from string.
virtual Type integrate(const scalar x1, const scalar x2) const
Integrate between two (scalar) values.
Scalar cmptPow(const Scalar s1, const Scalar s2)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > mag(const dimensioned< Type > &)
PolynomialEntry container data entry for scalars. Items are stored in a list of Tuple2's. Data is input in the form, e.g. for an entry <entryName> that describes y = x^2 + 2x^3.
virtual void convertTimeBase(const Time &t)
Convert time.
label & setComponent(label &l, const direction)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
virtual ~Polynomial()
Destructor.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
virtual void writeData(Ostream &os) const
Write in dictionary format.
virtual Type value(const scalar x) const
Return Polynomial value.