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. More...
Public Member Functions | |
TypeName ("polynomial") | |
Runtime type information. More... | |
PolynomialEntry (const word &entryName, const dictionary &dict) | |
PolynomialEntry (const word &entryName, const List< Tuple2< Type, Type > > &) | |
Construct from components. More... | |
PolynomialEntry (const PolynomialEntry &poly) | |
Copy constructor. More... | |
virtual tmp< DataEntry< Type > > | clone () const |
Construct and return a clone. More... | |
virtual | ~PolynomialEntry () |
Destructor. More... | |
virtual void | convertTimeBase (const Time &t) |
Convert time. More... | |
Type | value (const scalar x) const |
Return PolynomialEntry value. More... | |
Type | integrate (const scalar x1, const scalar x2) const |
Integrate between two (scalar) values. More... | |
dimensioned< Type > | dimValue (const scalar) const |
Return dimensioned constant value. More... | |
dimensioned< Type > | dimIntegrate (const scalar x1, const scalar x2) const |
Integrate between two values and return dimensioned type. More... | |
virtual void | writeData (Ostream &os) const |
Write in dictionary format. More... | |
Private Member Functions | |
void | operator= (const PolynomialEntry< Type > &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
List< Tuple2< Type, Type > > | coeffs_ |
PolynomialEntry coefficients - list of prefactor, exponent. More... | |
bool | canIntegrate_ |
Flag to indicate whether poly can be integrated. More... | |
dimensionSet | dimensions_ |
The dimension set. More... | |
Friends | |
Ostream & | operator (Ostream &os, const PolynomialEntry< Type > &cnst) |
Ostream Operator. More... | |
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.
<entryName> polynomial [0 0 1 0 0] // optional dimensions ( (1 2) (2 3) );
Definition at line 60 of file PolynomialEntry.H.
PolynomialEntry | ( | const word & | entryName, |
const dictionary & | dict | ||
) |
Definition at line 32 of file PolynomialEntry.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), Foam::nl, Istream::putBack(), and WarningInFunction.
Referenced by PolynomialEntry::clone().
PolynomialEntry | ( | const word & | entryName, |
const List< Tuple2< Type, Type > > & | |||
) |
Construct from components.
PolynomialEntry | ( | const PolynomialEntry & | poly | ) |
Copy constructor.
Definition at line 123 of file PolynomialEntry.C.
|
virtual |
Destructor.
Definition at line 135 of file PolynomialEntry.C.
|
private |
Disallow default bitwise assignment.
TypeName | ( | "polynomial" | ) |
Runtime type information.
Construct and return a clone.
Definition at line 114 of file PolynomialEntry.H.
References PolynomialEntry::PolynomialEntry().
|
virtual |
Convert time.
Definition at line 142 of file PolynomialEntry.C.
References Foam::component(), forAll, Foam::setComponent(), and TimeState::userTimeToTime().
Type value | ( | const scalar | x | ) | const |
Return PolynomialEntry value.
Definition at line 157 of file PolynomialEntry.C.
References Foam::cmptMultiply(), Foam::cmptPow(), forAll, x, and y.
Type integrate | ( | const scalar | x1, |
const scalar | x2 | ||
) | const |
Integrate between two (scalar) values.
Definition at line 175 of file PolynomialEntry.C.
References Foam::cmptDivide(), Foam::cmptMultiply(), Foam::cmptPow(), and forAll.
Foam::dimensioned< Type > dimValue | ( | const scalar | x | ) | const |
Foam::dimensioned< Type > dimIntegrate | ( | const scalar | x1, |
const scalar | x2 | ||
) | const |
Integrate between two values and return dimensioned type.
Definition at line 223 of file PolynomialEntry.C.
|
virtual |
Write in dictionary format.
Definition at line 63 of file PolynomialEntryIO.C.
References Foam::indent(), Foam::nl, and writeData().
|
friend |
Ostream Operator.
PolynomialEntry coefficients - list of prefactor, exponent.
Definition at line 78 of file PolynomialEntry.H.
|
private |
Flag to indicate whether poly can be integrated.
Definition at line 81 of file PolynomialEntry.H.
|
private |
The dimension set.
Definition at line 84 of file PolynomialEntry.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.