Roots< N > Class Template Reference

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

Inheritance diagram for Roots< N >:
Collaboration diagram for Roots< N >:

Public Member Functions

 Roots ()
 Construct null. More...
 
 Roots (const rootType t, const scalar x)
 Construct with a uniform value. More...
 
 Roots (const rootType t, const scalar x, const Roots< N - 1 > &xs)
 Construct by concatenation. More...
 
 Roots (const Roots< N - 1 > &xs, const rootType 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 rootType t)
 Set the type of the i-th root. More...
 
rootType 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 ()
 Construct null. More...
 
 VectorSpace (const Foam::zero)
 Construct initialised to zero. More...
 
 VectorSpace (Istream &)
 Construct from Istream. More...
 
 VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &)
 Construct as copy of a VectorSpace with the same size. More...
 
const scalar & component (const direction) const
 
scalar & component (const direction)
 
void component (scalar &, const direction) const
 
void replace (const direction, const scalar &)
 
const ConstBlock< SubVector, BStart > block () const
 
const 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 VectorSpace< Roots< N >, scalar, Ncmpts > &)
 
void operator= (const Foam::zero)
 
void operator*= (const scalar)
 
void operator/= (const scalar)
 

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...
 
- Static Public Member Functions inherited from VectorSpace< Roots< N >, scalar, N >
static direction size ()
 Return the number of elements in the VectorSpace = Ncmpts. More...
 
static Roots< Nuniform (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 const direction dim
 Dimensionality of space. More...
 
static const direction nComponents
 Number of components in this vector space. More...
 
static const direction mRows
 
static const direction nCols
 
static const char *const typeName
 
static const char *const componentNames []
 
static const Roots< Nzero
 
static const Roots< None
 
static const Roots< Nmax
 
static const Roots< Nmin
 
static const Roots< NrootMax
 
static const Roots< NrootMin
 

Detailed Description

template<direction N>
class Foam::Roots< N >

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

Source files

Definition at line 64 of file Roots.H.

Constructor & Destructor Documentation

◆ Roots() [1/5]

Roots ( )
inline

Construct null.

Definition at line 29 of file RootsI.H.

References forAll, Foam::nan, and Roots< N >::type().

Referenced by Roots< N >::Roots().

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

◆ Roots() [2/5]

Roots ( const rootType  t,
const scalar  x 
)
inline

Construct with a uniform value.

Definition at line 41 of file RootsI.H.

References forAll, Roots< N >::Roots(), Roots< N >::type(), VectorSpace< Roots< N >, scalar, N >::v_, and x.

Here is the call graph for this function:

◆ Roots() [3/5]

Roots ( const rootType  t,
const scalar  x,
const Roots< N - 1 > &  xs 
)
inline

Construct by concatenation.

Definition at line 55 of file RootsI.H.

References forAll, Roots< N >::Roots(), Roots< N >::type(), VectorSpace< Roots< N >, scalar, N >::v_, and x.

Here is the call graph for this function:

◆ Roots() [4/5]

Roots ( const Roots< N - 1 > &  xs,
const rootType  t,
const scalar  x 
)
inline

Construct by concatenation.

Definition at line 75 of file RootsI.H.

References forAll, N, Roots< N >::Roots(), Roots< N >::type(), VectorSpace< Roots< N >, scalar, N >::v_, and x.

Here is the call graph for this function:

◆ Roots() [5/5]

Roots ( const Roots< M > &  xs,
const Roots< N - M > &  ys 
)
inline

Construct by concatenation.

Definition at line 96 of file RootsI.H.

References forAll, M, Roots< N >::type(), and VectorSpace< Roots< N >, scalar, N >::v_.

Here is the call graph for this function:

Member Function Documentation

◆ type() [1/2]

void type ( const direction  i,
const rootType  t 
)
inline

Set the type of the i-th root.

Definition at line 120 of file RootsI.H.

Referenced by Foam::eigenValues(), Roots< N >::Roots(), cubicEqn::roots(), Foam::triIntersect::solveProjection(), and particle::trackToMovingTri().

Here is the caller graph for this function:

◆ type() [2/2]

Foam::rootType type ( const direction  i) const
inline

Return the type of the i-th root.

Definition at line 130 of file RootsI.H.


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