Public Member Functions | Private Member Functions | Private Attributes | Friends
PolynomialEntry Class Reference

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...

Collaboration diagram for PolynomialEntry:
Collaboration graph
[legend]

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

Ostreamoperator (Ostream &os, const PolynomialEntry< Type > &cnst)
 Ostream Operator. More...
 

Detailed Description

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)
    );
Source files

Definition at line 60 of file PolynomialEntry.H.

Constructor & Destructor Documentation

◆ PolynomialEntry() [1/3]

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PolynomialEntry() [2/3]

PolynomialEntry ( const word entryName,
const List< Tuple2< Type, Type > > &   
)

Construct from components.

◆ PolynomialEntry() [3/3]

PolynomialEntry ( const PolynomialEntry poly)

Copy constructor.

Definition at line 123 of file PolynomialEntry.C.

◆ ~PolynomialEntry()

~PolynomialEntry ( )
virtual

Destructor.

Definition at line 135 of file PolynomialEntry.C.

Member Function Documentation

◆ operator=()

void operator= ( const PolynomialEntry< Type > &  )
private

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "polynomial"  )

Runtime type information.

◆ clone()

virtual tmp<DataEntry<Type> > clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 114 of file PolynomialEntry.H.

References PolynomialEntry::PolynomialEntry().

Here is the call graph for this function:

◆ convertTimeBase()

void convertTimeBase ( const Time t)
virtual

Convert time.

Definition at line 142 of file PolynomialEntry.C.

References Foam::component(), forAll, Foam::setComponent(), and TimeState::userTimeToTime().

Here is the call graph for this function:

◆ value()

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.

Here is the call graph for this function:

◆ integrate()

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.

Here is the call graph for this function:

◆ dimValue()

Foam::dimensioned< Type > dimValue ( const scalar  x) const

Return dimensioned constant value.

Definition at line 213 of file PolynomialEntry.C.

References x.

◆ dimIntegrate()

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.

◆ writeData()

void writeData ( Ostream os) const
virtual

Write in dictionary format.

Definition at line 63 of file PolynomialEntryIO.C.

References Foam::indent(), Foam::nl, and writeData().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream os,
const PolynomialEntry< Type > &  cnst 
)
friend

Ostream Operator.

Field Documentation

◆ coeffs_

List<Tuple2<Type, Type> > coeffs_
private

PolynomialEntry coefficients - list of prefactor, exponent.

Definition at line 78 of file PolynomialEntry.H.

◆ canIntegrate_

bool canIntegrate_
private

Flag to indicate whether poly can be integrated.

Definition at line 81 of file PolynomialEntry.H.

◆ dimensions_

dimensionSet dimensions_
private

The dimension set.

Definition at line 84 of file PolynomialEntry.H.


The documentation for this class was generated from the following files: