Polynomial templated on size (order): More...
#include <OpenFOAM/Polynomial.H>
Polynomial templated on size (order):
poly = logCoeff*log(x) + sum(coeff_[i]*x^i)
where 0 <= i <= n
Definition at line 78 of file Polynomial.H.
Public Types | |
typedef Polynomial< PolySize > | polyType |
typedef Polynomial< PolySize+1 > | intPolyType |
Public Member Functions | |
Polynomial () | |
Construct null.
| |
Polynomial (const word &name, Istream &is) | |
Construct from name and Istream.
| |
Polynomial (const Polynomial &poly) | |
Copy constructor.
| |
bool & | logActive () |
Return access to the log term active flag.
| |
scalar & | logCoeff () |
Return access to the log coefficient.
| |
scalar | evaluate (const scalar x) const |
Return polynomial value.
| |
intPolyType | integrate (const scalar intConstant=0.0) |
Return integrated polynomial coefficients.
| |
polyType | integrateMinus1 (const scalar intConstant=0.0) |
Return integrated polynomial coefficients when lowest order.
| |
scalar | integrateLimits (const scalar x1, const scalar x2) const |
Integrate between two values.
| |
Friends | |
Ostream & | operator (Ostream &, const Polynomial &) |
Ostream Operator.
|
typedef Polynomial<PolySize> polyType |
Definition at line 93 of file Polynomial.H.
typedef Polynomial<PolySize+1> intPolyType |
Definition at line 95 of file Polynomial.H.
Polynomial | ( | ) |
Construct null.
Definition at line 31 of file Polynomial.C.
Polynomial | ( | const word & | name, |
Istream & | is | ||
) |
Construct from name and Istream.
Definition at line 40 of file Polynomial.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::nl, Polynomial< PolySize >::operator, and VectorSpace< Polynomial< PolySize >, scalar, PolySize >::size().
Polynomial | ( | const Polynomial< PolySize > & | poly ) |
Copy constructor.
bool & logActive | ( | ) |
Return access to the log term active flag.
Definition at line 86 of file Polynomial.C.
Referenced by Polynomial< PolySize >::integrateMinus1().
Foam::scalar & logCoeff | ( | ) |
Return access to the log coefficient.
Definition at line 93 of file Polynomial.C.
Referenced by Polynomial< PolySize >::integrateMinus1().
Foam::scalar evaluate | ( | const scalar | x ) | const |
Return polynomial value.
Definition at line 100 of file Polynomial.C.
References Foam::log(), Foam::pow(), and y.
Referenced by Polynomial< PolySize >::integrateLimits().
Foam::Polynomial< PolySize >::intPolyType integrate | ( | const scalar | intConstant = 0.0
) |
Return integrated polynomial coefficients.
argument becomes zeroth element (constant of integration)
Definition at line 146 of file Polynomial.C.
References forAll.
Foam::Polynomial< PolySize >::polyType integrateMinus1 | ( | const scalar | intConstant = 0.0
) |
Return integrated polynomial coefficients when lowest order.
is -1. Argument added to zeroth element
Definition at line 162 of file Polynomial.C.
References Polynomial< PolySize >::logActive(), and Polynomial< PolySize >::logCoeff().
Foam::scalar integrateLimits | ( | const scalar | x1, |
const scalar | x2 | ||
) | const |
Integrate between two values.
Definition at line 120 of file Polynomial.C.
References Foam::abort(), Polynomial< PolySize >::evaluate(), Foam::FatalError, FatalErrorIn, and Foam::nl.
Ostream& operator | ( | Ostream & | , |
const Polynomial< PolySize > & | |||
) | [friend]
|
Ostream Operator.
Referenced by Polynomial< PolySize >::Polynomial().