Container to encapsulate various operations for linear equation of the forms with real coefficients: More...
Public Types | |
enum | components { A, B } |
Component labeling enumeration. More... | |
Public Types inherited from VectorSpace< linearEqn, scalar, 2 > | |
typedef VectorSpace< linearEqn, scalar, Ncmpts > | vsType |
VectorSpace type. More... | |
typedef scalar | cmptType |
Component type. More... | |
typedef scalar | magType |
Magnitude type. More... | |
typedef scalar * | iterator |
Random access iterator for traversing VectorSpace. More... | |
typedef const scalar * | const_iterator |
Random access iterator for traversing VectorSpace. More... | |
Public Member Functions | |
linearEqn ()=default | |
Default construct. More... | |
linearEqn (const Foam::zero) | |
Construct initialized to zero. More... | |
linearEqn (const scalar a, const scalar b) | |
Construct from components. More... | |
scalar | a () const noexcept |
scalar | b () const noexcept |
scalar & | a () noexcept |
scalar & | b () noexcept |
scalar | value (const scalar x) const |
Evaluate the linear equation at x. More... | |
scalar | derivative (const scalar x) const |
Evaluate the derivative of the linear equation at x. More... | |
scalar | error (const scalar x) const |
Estimate the error of evaluation of the linear equation at x. More... | |
Roots< 1 > | roots () const |
Return the real root of the linear equation. More... | |
Public Member Functions inherited from VectorSpace< linearEqn, scalar, 2 > | |
VectorSpace ()=default | |
Default construct. More... | |
VectorSpace (const Foam::zero) | |
Construct initialized to zero. More... | |
VectorSpace (const VectorSpace< linearEqn, scalar, Ncmpts > &vs) | |
Copy construct. More... | |
VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &) | |
Copy construct of a VectorSpace with the same size. More... | |
VectorSpace (Istream &is) | |
Construct from Istream. More... | |
const scalar & | component (const direction) const |
scalar & | component (const direction) |
void | component (scalar &, const direction) const |
void | replace (const direction, const scalar &) |
const scalar * | cdata () const noexcept |
Return const pointer to the first data element. More... | |
scalar * | data () noexcept |
Return pointer to the first data element. More... | |
const ConstBlock< SubVector, BStart > | block () const |
const Foam::VectorSpace< linearEqn, scalar, Ncmpts >::template ConstBlock< SubVector, BStart > | block () const |
const scalar & | operator[] (const direction) const |
scalar & | operator[] (const direction) |
void | operator= (const VectorSpace< linearEqn, scalar, Ncmpts > &) |
void | operator= (const Foam::zero) |
void | operator+= (const VectorSpace< linearEqn, scalar, Ncmpts > &) |
void | operator-= (const VectorSpace< linearEqn, scalar, Ncmpts > &) |
void | operator*= (const scalar) |
void | operator/= (const scalar) |
iterator | begin () noexcept |
Return an iterator to begin of VectorSpace. More... | |
const_iterator | begin () const noexcept |
Return const_iterator to begin of VectorSpace. More... | |
iterator | end () noexcept |
Return an iterator to end of VectorSpace. More... | |
const_iterator | end () const noexcept |
Return const_iterator to end of VectorSpace. More... | |
const_iterator | cbegin () const noexcept |
Return const_iterator to begin of VectorSpace. More... | |
const_iterator | cend () const noexcept |
Return const_iterator to end of VectorSpace. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from VectorSpace< linearEqn, scalar, 2 > | |
static constexpr direction | size () noexcept |
The number of elements in the VectorSpace = Ncmpts. More... | |
static linearEqn | uniform (const scalar &s) |
Return a VectorSpace with all elements = s. More... | |
Public Attributes inherited from VectorSpace< linearEqn, scalar, 2 > | |
scalar | v_ [Ncmpts] |
The components of this vector space. More... | |
Static Public Attributes inherited from VectorSpace< linearEqn, scalar, 2 > | |
static constexpr direction | dim |
Dimensionality of space. More... | |
static constexpr direction | nComponents |
Number of components in this vector space. More... | |
static constexpr direction | mRows |
static constexpr direction | nCols |
static const char *const | typeName |
static const char *const | componentNames [] |
static const linearEqn | zero |
static const linearEqn | one |
static const linearEqn | max |
static const linearEqn | min |
static const linearEqn | rootMax |
static const linearEqn | rootMin |
Container to encapsulate various operations for linear equation of the forms with real coefficients:
Definition at line 56 of file linearEqn.H.
enum components |
|
default |
Default construct.
|
inline |
Construct initialized to zero.
Definition at line 24 of file linearEqnI.H.
|
inline |
Construct from components.
Definition at line 30 of file linearEqnI.H.
References A, B, and Foam::constant::physicoChemical::b.
|
inlinenoexcept |
Definition at line 90 of file linearEqn.H.
References linearEqn::A, and VectorSpace< linearEqn, scalar, 2 >::v_.
|
inlinenoexcept |
Definition at line 91 of file linearEqn.H.
References linearEqn::B, and VectorSpace< linearEqn, scalar, 2 >::v_.
|
inlinenoexcept |
Definition at line 93 of file linearEqn.H.
References linearEqn::A, and VectorSpace< linearEqn, scalar, 2 >::v_.
|
inlinenoexcept |
Definition at line 94 of file linearEqn.H.
References linearEqn::B, and VectorSpace< linearEqn, scalar, 2 >::v_.
|
inline |
Evaluate the linear equation at x.
Definition at line 39 of file linearEqnI.H.
References Foam::constant::physicoChemical::b, and x.
|
inline |
Evaluate the derivative of the linear equation at x.
Definition at line 45 of file linearEqnI.H.
|
inline |
Estimate the error of evaluation of the linear equation at x.
Definition at line 51 of file linearEqnI.H.
References Foam::constant::physicoChemical::b, Foam::mag(), and x.
|
inline |
Return the real root of the linear equation.
Definition at line 57 of file linearEqnI.H.
References Foam::constant::physicoChemical::b, Foam::mag(), Foam::roots::nan, Foam::roots::negInf, Foam::roots::posInf, Foam::roots::real, and Foam::sign().
Referenced by quadraticEqn::roots(), and cubicEqn::roots().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.