Public Types | Public Member Functions | List of all members
binaryTree< CompType, ThermoType > Class Template Reference

Data storage of the chemistryOnLineLibrary according to a binary tree structure. More...

Public Types

typedef binaryNode< CompType, ThermoType > node
 
typedef chemPointISAT< CompType, ThermoType > chemPoint
 

Public Member Functions

 binaryTree (TDACChemistryModel< CompType, ThermoType > &chemistry, dictionary coeffsDict)
 
label size ()
 
label depth (node *subTreeRoot)
 
label depth ()
 
noderoot ()
 
label maxNLeafs ()
 
void insertNewLeaf (const scalarField &phiq, const scalarField &Rphiq, const scalarSquareMatrix &A, const scalarField &scaleFactor, const scalar &epsTol, const label nCols, chemPoint *&phi0)
 
void binaryTreeSearch (const scalarField &phiq, node *node, chemPoint *&nearest)
 
bool secondaryBTSearch (const scalarField &phiq, chemPoint *&x)
 
void deleteLeaf (chemPoint *&phi0)
 
void balance ()
 
void deleteAllNode ()
 
chemPointtreeMin (node *subTreeRoot)
 
chemPointtreeMin ()
 
chemPointtreeSuccessor (chemPoint *x)
 
void clear ()
 
bool isFull ()
 
void resetNumRetrieve ()
 

Detailed Description

template<class CompType, class ThermoType>
class Foam::binaryTree< CompType, ThermoType >

Data storage of the chemistryOnLineLibrary according to a binary tree structure.

0 (root node) / \ 0 0 / \ / \ L R L 0 / \ L R

L: leafLeft_ R: leafRight_

Definition at line 53 of file binaryTree.H.

Member Typedef Documentation

◆ node

typedef binaryNode<CompType, ThermoType> node

Definition at line 58 of file binaryTree.H.

◆ chemPoint

typedef chemPointISAT<CompType, ThermoType> chemPoint

Definition at line 59 of file binaryTree.H.

Constructor & Destructor Documentation

◆ binaryTree()

binaryTree ( TDACChemistryModel< CompType, ThermoType > &  chemistry,
dictionary  coeffsDict 
)

Definition at line 337 of file binaryTree.C.

Member Function Documentation

◆ size()

label size ( )
inline

Definition at line 134 of file binaryTree.H.

Referenced by ISAT< CompType, ThermoType >::size().

Here is the caller graph for this function:

◆ depth() [1/2]

Foam::label depth ( node subTreeRoot)

Definition at line 354 of file binaryTree.C.

References Foam::max(), binaryNode< CompType, ThermoType >::nodeLeft(), and binaryNode< CompType, ThermoType >::nodeRight().

Here is the call graph for this function:

◆ depth() [2/2]

label depth ( )
inline

Definition at line 142 of file binaryTree.H.

◆ root()

node* root ( )
inline

Definition at line 147 of file binaryTree.H.

◆ maxNLeafs()

label maxNLeafs ( )
inline

Definition at line 152 of file binaryTree.H.

◆ insertNewLeaf()

void insertNewLeaf ( const scalarField phiq,
const scalarField Rphiq,
const scalarSquareMatrix A,
const scalarField scaleFactor,
const scalar &  epsTol,
const label  nCols,
chemPoint *&  phi0 
)

Definition at line 376 of file binaryTree.C.

References A, Foam::deleteDemandDrivenData(), chemPointISAT< CompType, ThermoType >::node(), and Foam::constant::electromagnetic::phi0.

Here is the call graph for this function:

◆ binaryTreeSearch()

void binaryTreeSearch ( const scalarField phiq,
node node,
chemPoint *&  nearest 
)

◆ secondaryBTSearch()

bool secondaryBTSearch ( const scalarField phiq,
chemPoint *&  x 
)

Definition at line 517 of file binaryTree.C.

References chemPointISAT< CompType, ThermoType >::inEOA(), x, and y.

Here is the call graph for this function:

◆ deleteLeaf()

void deleteLeaf ( chemPoint *&  phi0)

◆ balance()

void balance

Definition at line 638 of file binaryTree.C.

References forAll, SortableList::indices(), n, Foam::constant::electromagnetic::phi0, SortableList::sort(), Foam::sqr(), x, and Foam::Zero.

Here is the call graph for this function:

◆ deleteAllNode()

void deleteAllNode ( )
inline

Definition at line 215 of file binaryTree.H.

◆ treeMin() [1/2]

Foam::chemPointISAT< CompType, ThermoType > * treeMin ( node subTreeRoot)

Definition at line 730 of file binaryTree.C.

References binaryNode< CompType, ThermoType >::leafLeft(), and binaryNode< CompType, ThermoType >::nodeLeft().

Here is the call graph for this function:

◆ treeMin() [2/2]

chemPoint* treeMin ( )
inline

Definition at line 222 of file binaryTree.H.

◆ treeSuccessor()

Foam::chemPointISAT< CompType, ThermoType > * treeSuccessor ( chemPoint x)

Definition at line 747 of file binaryTree.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, x, and y.

Here is the call graph for this function:

◆ clear()

void clear

Definition at line 797 of file binaryTree.C.

◆ isFull()

bool isFull

Definition at line 811 of file binaryTree.C.

◆ resetNumRetrieve()

void resetNumRetrieve

Definition at line 818 of file binaryTree.C.

References chemPointISAT< CompType, ThermoType >::resetNumRetrieve().

Here is the call graph for this function:

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