binaryNode Class Reference

Node of the binary tree. More...

Collaboration diagram for binaryNode:

Public Member Functions

void calcV (const chemPointISAT &elementLeft, const chemPointISAT &elementRight, scalarField &v)
 Compute vector v: More...
 
scalar calcA (const chemPointISAT &elementLeft, const chemPointISAT &elementRight)
 Compute a the product v^T.phih, with phih = (phi0 + phiq)/2. More...
 
 binaryNode ()
 Construct null. More...
 
 binaryNode (chemPointISAT *elementLeft, chemPointISAT *elementRight, binaryNode *parent)
 Construct from components. More...
 
chemPointISAT *& leafLeft ()
 Access. More...
 
chemPointISAT *& leafRight ()
 
binaryNode *& nodeLeft ()
 
binaryNode *& nodeRight ()
 
binaryNode *& parent ()
 
const scalarFieldv () const
 Topology. More...
 
const scalar & a () const
 

Public Attributes

chemPointISATleafLeft_
 Element on the left. More...
 
chemPointISATleafRight_
 Element on the right. More...
 
binaryNodenodeLeft_
 Node which follows on the left. More...
 
binaryNodenodeRight_
 Node which follows on the right. More...
 
binaryNodeparent_
 Parent node. More...
 
scalarField v_
 
scalar a_
 

Detailed Description

Node of the binary tree.

SourceFile binaryNode.C

Definition at line 48 of file binaryNode.H.

Constructor & Destructor Documentation

◆ binaryNode() [1/2]

Construct null.

Definition at line 31 of file binaryNode.C.

◆ binaryNode() [2/2]

binaryNode ( chemPointISAT elementLeft,
chemPointISAT elementRight,
binaryNode parent 
)

Construct from components.

Definition at line 41 of file binaryNode.C.

References binaryNode::a_, binaryNode::calcA(), binaryNode::calcV(), and binaryNode::v_.

Here is the call graph for this function:

Member Function Documentation

◆ calcV()

void calcV ( const chemPointISAT elementLeft,
const chemPointISAT elementRight,
scalarField v 
)

Compute vector v:

Let E be the ellipsoid which covers the region of accuracy of the left leaf (previously defined). E is described by E={phi| ||L^T.(phi-phi0)|| <= 1}, (see chemPoint for more details). let E' be the transformation of E in a space where E' is a hypersphere centered at the origin, in this space y=L^T.(phi-phi0) and then E'={y| ||y||<=1} let u be the unit vector joining the center of E' and the newly added composition point in the transformed space (y2=L^T.(phiq-phi0)),u = y2/||y2| Then the hyperplane separating the two points is defined as the perpendicular bisector of the segment linking 0 to y2 H' = {y| u^T.(y-yh) = 0}, where yh = y2/2. In the original composition space, the hyperplane H is defined by H = {y| v^T(phi-phih) = 0}, where phih = phi0 + L^-T.yh = (phi0 + phiq) / 2 and v is L.L^T (phiq-phi0) v = ——————– . ||L.L^T (phiq-phi0)||

Note : v is not normalised in this implementation since it is used on both side of an equality to know if one should go on the left or the right in the binary tree Parameter: elementLeft : chemPoint of the left element elementRight: chemPoint of the right element v : empty scalar field to store v Returnq: void (v is stored in the empty scalarField)

Definition at line 62 of file binaryNode.C.

References chemPointISAT::completeSpaceSize(), chemPointISAT::completeToSimplifiedIndex(), k, chemPointISAT::LT(), Foam::min(), chemPointISAT::nActive(), chemPointISAT::phi(), ISAT::reduction(), chemPointISAT::scaleFactor(), Foam::sqr(), chemPointISAT::table(), and chemPointISAT::tolerance().

Referenced by binaryNode::binaryNode().

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

◆ calcA()

Foam::scalar calcA ( const chemPointISAT elementLeft,
const chemPointISAT elementRight 
)
inline

Compute a the product v^T.phih, with phih = (phi0 + phiq)/2.

When travelling in the binary tree, to know in which part of the composition space the query point 'phi' belongs to, v^T.phi is performed. If the result is "> a" then it belongs to the right part (where phiq is), otherwise it belongs to the left part (where phi0 is).

Definition at line 29 of file binaryNodeI.H.

References binaryNode::a(), forAll, chemPointISAT::phi(), and binaryNode::v_.

Referenced by binaryNode::binaryNode().

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

◆ leafLeft()

chemPointISAT*& leafLeft ( )
inline

Access.

Definition at line 138 of file binaryNode.H.

References binaryNode::leafLeft_.

Referenced by binaryTree::binaryTreeSearch(), binaryTree::deleteLeaf(), and binaryTree::treeMin().

Here is the caller graph for this function:

◆ leafRight()

chemPointISAT*& leafRight ( )
inline

Definition at line 143 of file binaryNode.H.

References binaryNode::leafRight_.

Referenced by binaryTree::binaryTreeSearch(), and binaryTree::deleteLeaf().

Here is the caller graph for this function:

◆ nodeLeft()

binaryNode*& nodeLeft ( )
inline

Definition at line 148 of file binaryNode.H.

References binaryNode::nodeLeft_.

Referenced by binaryTree::binaryTreeSearch(), binaryTree::deleteLeaf(), binaryTree::depth(), and binaryTree::treeMin().

Here is the caller graph for this function:

◆ nodeRight()

binaryNode*& nodeRight ( )
inline

Definition at line 153 of file binaryNode.H.

References binaryNode::nodeRight_.

Referenced by binaryTree::binaryTreeSearch(), binaryTree::deleteLeaf(), and binaryTree::depth().

Here is the caller graph for this function:

◆ parent()

binaryNode*& parent ( )
inline

Definition at line 158 of file binaryNode.H.

References binaryNode::parent_.

Referenced by binaryTree::deleteLeaf().

Here is the caller graph for this function:

◆ v()

const scalarField& v ( ) const
inline

Topology.

Definition at line 165 of file binaryNode.H.

References binaryNode::v_.

Referenced by binaryTree::binaryTreeSearch().

Here is the caller graph for this function:

◆ a()

const scalar& a ( ) const
inline

Definition at line 170 of file binaryNode.H.

References binaryNode::a_.

Referenced by binaryTree::binaryTreeSearch(), and binaryNode::calcA().

Here is the caller graph for this function:

Member Data Documentation

◆ leafLeft_

chemPointISAT* leafLeft_

Element on the left.

Definition at line 54 of file binaryNode.H.

Referenced by binaryNode::leafLeft().

◆ leafRight_

chemPointISAT* leafRight_

Element on the right.

Definition at line 57 of file binaryNode.H.

Referenced by binaryNode::leafRight().

◆ nodeLeft_

binaryNode* nodeLeft_

Node which follows on the left.

Definition at line 60 of file binaryNode.H.

Referenced by binaryNode::nodeLeft().

◆ nodeRight_

binaryNode* nodeRight_

Node which follows on the right.

Definition at line 63 of file binaryNode.H.

Referenced by binaryNode::nodeRight().

◆ parent_

binaryNode* parent_

Parent node.

Definition at line 66 of file binaryNode.H.

Referenced by binaryNode::parent().

◆ v_

Definition at line 68 of file binaryNode.H.

Referenced by binaryNode::binaryNode(), binaryNode::calcA(), and binaryNode::v().

◆ a_

scalar a_

Definition at line 70 of file binaryNode.H.

Referenced by binaryNode::a(), and binaryNode::binaryNode().


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