Templated storage for the roots of polynomial equations, plus flags to indicate the nature of the roots. More...


Public Member Functions | |
| Roots () | |
| Default construct as 'nan'. More... | |
| Roots (const roots::type t, const scalar x) | |
| Construct with a uniform value. More... | |
| Roots (const roots::type t, const scalar x, const Roots< N - 1 > &xs) | |
| Construct by concatenation. More... | |
| Roots (const Roots< N - 1 > &xs, const roots::type t, const scalar x) | |
| Construct by concatenation. More... | |
| template<direction M> | |
| Roots (const Roots< M > &xs, const Roots< N - M > &ys) | |
| Construct by concatenation. More... | |
| void | type (const direction i, const roots::type t) |
| Set the type of the i-th root. More... | |
| roots::type | type (const direction i) const |
| Return the type of the i-th root. More... | |
Public Member Functions inherited from VectorSpace< Roots< N >, scalar, N > | |
| VectorSpace ()=default | |
| Default construct. More... | |
| VectorSpace (const Foam::zero) | |
| Construct initialized to zero. More... | |
| VectorSpace (const VectorSpace< Roots< N >, 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< Roots< N >, scalar, Ncmpts >::template ConstBlock< SubVector, BStart > | block () const |
| const scalar & | operator[] (const direction) const |
| scalar & | operator[] (const direction) |
| void | operator= (const VectorSpace< Roots< N >, scalar, Ncmpts > &) |
| void | operator= (const Foam::zero) |
| void | operator+= (const VectorSpace< Roots< N >, scalar, Ncmpts > &) |
| void | operator-= (const VectorSpace< Roots< N >, 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 | |
Public Types inherited from VectorSpace< Roots< N >, scalar, N > | |
| typedef VectorSpace< Roots< N >, 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... | |
Static Public Member Functions inherited from VectorSpace< Roots< N >, scalar, N > | |
| static constexpr direction | size () noexcept |
| The number of elements in the VectorSpace = Ncmpts. More... | |
| static Roots< N > | uniform (const scalar &s) |
| Return a VectorSpace with all elements = s. More... | |
Public Attributes inherited from VectorSpace< Roots< N >, scalar, N > | |
| scalar | v_ [Ncmpts] |
| The components of this vector space. More... | |
Static Public Attributes inherited from VectorSpace< Roots< N >, scalar, N > | |
| 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 Roots< N > | zero |
| static const Roots< N > | one |
| static const Roots< N > | max |
| static const Roots< N > | min |
| static const Roots< N > | rootMax |
| static const Roots< N > | rootMin |
Templated storage for the roots of polynomial equations, plus flags to indicate the nature of the roots.
|
inline |
Default construct as 'nan'.
Definition at line 24 of file RootsI.H.
References forAll, Foam::roots::nan, and Roots< N >::type().

|
inline |
Construct with a uniform value.
Definition at line 36 of file RootsI.H.
References forAll, Roots< N >::type(), VectorSpace< Roots< N >, scalar, N >::v_, and x.

|
inline |
Construct by concatenation.
Definition at line 50 of file RootsI.H.
References forAll, Roots< N >::type(), Foam::type(), and x.

|
inline |
Construct by concatenation.
Definition at line 70 of file RootsI.H.
References forAll, N(), Roots< N >::type(), Foam::type(), and x.

Construct by concatenation.
Definition at line 91 of file RootsI.H.
References forAll, M, Roots< N >::type(), and Foam::type().

|
inline |
Set the type of the i-th root.
Definition at line 115 of file RootsI.H.
References Foam::type().
Referenced by Foam::eigenValues(), Roots< N >::Roots(), and cubicEqn::roots().


|
inline |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.