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 () |
node * | root () |
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 () |
chemPoint * | treeMin (node *subTreeRoot) |
chemPoint * | treeMin () |
chemPoint * | treeSuccessor (chemPoint *x) |
void | clear () |
bool | isFull () |
void | resetNumRetrieve () |
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.
typedef binaryNode<CompType, ThermoType> node |
Definition at line 58 of file binaryTree.H.
typedef chemPointISAT<CompType, ThermoType> chemPoint |
Definition at line 59 of file binaryTree.H.
binaryTree | ( | TDACChemistryModel< CompType, ThermoType > & | chemistry, |
dictionary | coeffsDict | ||
) |
Definition at line 337 of file binaryTree.C.
|
inline |
Definition at line 134 of file binaryTree.H.
Referenced by ISAT< CompType, ThermoType >::size().
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().
|
inline |
Definition at line 142 of file binaryTree.H.
|
inline |
Definition at line 147 of file binaryTree.H.
|
inline |
Definition at line 152 of file binaryTree.H.
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.
void binaryTreeSearch | ( | const scalarField & | phiq, |
node * | node, | ||
chemPoint *& | nearest | ||
) |
Definition at line 460 of file binaryTree.C.
References binaryNode< CompType, ThermoType >::a(), binaryNode< CompType, ThermoType >::leafLeft(), binaryNode< CompType, ThermoType >::leafRight(), binaryNode< CompType, ThermoType >::nodeLeft(), binaryNode< CompType, ThermoType >::nodeRight(), and binaryNode< CompType, ThermoType >::v().
bool secondaryBTSearch | ( | const scalarField & | phiq, |
chemPoint *& | x | ||
) |
Definition at line 517 of file binaryTree.C.
References chemPointISAT< CompType, ThermoType >::inEOA(), x, and y.
void deleteLeaf | ( | chemPoint *& | phi0 | ) |
Definition at line 574 of file binaryTree.C.
References Foam::deleteDemandDrivenData(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, chemPointISAT< CompType, ThermoType >::node(), binaryNode< CompType, ThermoType >::parent(), Foam::constant::electromagnetic::phi0, and x.
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.
|
inline |
Definition at line 215 of file binaryTree.H.
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().
|
inline |
Definition at line 222 of file binaryTree.H.
Foam::chemPointISAT< CompType, ThermoType > * treeSuccessor | ( | chemPoint * | x | ) |
Definition at line 747 of file binaryTree.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, x, and y.
void clear |
Definition at line 797 of file binaryTree.C.
bool isFull |
Definition at line 811 of file binaryTree.C.
void resetNumRetrieve |
Definition at line 818 of file binaryTree.C.
References chemPointISAT< CompType, ThermoType >::resetNumRetrieve().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.