Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
tetCreatorOctree Class Reference
Collaboration diagram for tetCreatorOctree:
Collaboration graph
[legend]

Public Member Functions

 tetCreatorOctree (const meshOctree &octree, const IOdictionary &meshDict)
 Construct from octree and IOdictionary. More...
 
 ~tetCreatorOctree ()
 
const LongList< point > & tetPoints () const
 
const LongList< partTet > & tets () const
 

Private Member Functions

void clearOut ()
 deletes all pointer data More...
 
void selectElements ()
 find elements which will be used as mesh cells More...
 
void createPointsAndAddressing ()
 create tetPoints_ and necessary addressing More...
 
void createFaceCentreLabels ()
 create faceCentreLabelPtr_ More...
 
void createTetsAroundEdges ()
 create tetrahedra from faces, owner and neighbour More...
 
void createTetsFromSplitFaces ()
 create tetrahedra from split faces More...
 
void createTetsFromFacesWithCentreNode ()
 
void createTetsAroundSplitEdges ()
 create tetrahedra from faces with split edges More...
 
void checkAndAppendTet (const partTet)
 
void createTets ()
 function containing the workflow More...
 
 tetCreatorOctree (const tetCreatorOctree &)
 Disallow default bitwise copy construct. More...
 
void operator= (const tetCreatorOctree &)
 Disallow default bitwise assignment. More...
 

Private Attributes

meshOctreeAddressing octreeCheck_
 reference to the octree More...
 
LongList< pointtetPoints_
 points of the tetrahedrisation More...
 
LongList< partTettets_
 tetrahedra More...
 
List< labelLongListsortedLeaves_
 octree leaves sorted according to their level More...
 
VRWGraphsubNodeLabelsPtr_
 node labels of vertices created inside split-hex boxes More...
 
labelListcubeLabelPtr_
 cube centre label More...
 
VRWGraphfaceCentreLabelPtr_
 cube face label More...
 
bool created_
 are tets created or not More...
 

Static Private Attributes

static const meshOctreeCubeCoordinates edgeCoordinates_ [12][4]
 helper for searching coordinates of cubes around an edge More...
 
static const label faceCentreHelper_ [3][4]
 helper for finding face centres of cubes sharing an edge More...
 

Detailed Description

Definition at line 53 of file tetCreatorOctree.H.

Constructor & Destructor Documentation

◆ tetCreatorOctree() [1/2]

tetCreatorOctree ( const tetCreatorOctree )
private

Disallow default bitwise copy construct.

◆ tetCreatorOctree() [2/2]

tetCreatorOctree ( const meshOctree octree,
const IOdictionary meshDict 
)

Construct from octree and IOdictionary.

Definition at line 154 of file tetCreatorOctree.C.

◆ ~tetCreatorOctree()

Definition at line 175 of file tetCreatorOctree.C.

References tetCreatorOctree::clearOut().

Here is the call graph for this function:

Member Function Documentation

◆ clearOut()

void clearOut ( )
private

deletes all pointer data

Definition at line 142 of file tetCreatorOctree.C.

References tetCreatorOctree::cubeLabelPtr_, Foam::deleteDemandDrivenData(), tetCreatorOctree::faceCentreLabelPtr_, tetCreatorOctree::sortedLeaves_, and tetCreatorOctree::subNodeLabelsPtr_.

Referenced by tetCreatorOctree::createTets(), and tetCreatorOctree::~tetCreatorOctree().

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

◆ selectElements()

void selectElements ( )
private

◆ createPointsAndAddressing()

void createPointsAndAddressing ( )
private

◆ createFaceCentreLabels()

void createFaceCentreLabels ( )
private

◆ createTetsAroundEdges()

void createTetsAroundEdges ( )
private

create tetrahedra from faces, owner and neighbour

find maximum refinement level of octree leaves attached to each vertex

start creating tets around edges which have both vertices at the same refinement level which is equal to the max refinement level of boxes incident to such edges

start checking edges

edge has both vertices at the same refinement level as the current leaf

store octree leaves at this edge they are all adjacent to the start point

adding face centre labels

create tets around this edge

Definition at line 41 of file tetCreatorOctreeTetsAroundEdges.C.

References Foam::abort(), DynList< T, staticSize >::append(), meshOctreeCubeBasic::coordinates(), tetCreatorOctree::cubeLabelPtr_, meshOctreeCubeCoordinates::edgeNodes_, Foam::endl(), tetCreatorOctree::faceCentreHelper_, tetCreatorOctree::faceCentreLabelPtr_, meshOctreeCubeCoordinates::faceNodes_, Foam::FatalError, FatalErrorIn, forAll, forAllReverse, forAllRow, Foam::Info, k, meshOctreeCubeCoordinates::level(), Foam::max(), meshOctreeAddressing::nodeLabels(), meshOctreeAddressing::nodeLeaves(), meshOctreeAddressing::numberOfNodes(), meshOctreeAddressing::octree(), tetCreatorOctree::octreeCheck_, Foam::pos(), meshOctree::positionsOfLeavesAtNodes(), meshOctreeCubeCoordinates::refineForPosition(), meshOctree::returnLeaf(), DynList< T, staticSize >::size(), VRWGraph::sizeOfRow(), tetCreatorOctree::sortedLeaves_, tetCreatorOctree::subNodeLabelsPtr_, tetCreatorOctree::tetPoints_, and tetCreatorOctree::tets_.

Referenced by tetCreatorOctree::createTets().

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

◆ createTetsFromSplitFaces()

void createTetsFromSplitFaces ( )
private

create tetrahedra from split faces

create 4 tets

Definition at line 40 of file tetCreatorOctreeTetsFromSplitFaces.C.

References tetCreatorOctree::checkAndAppendTet(), tetCreatorOctree::cubeLabelPtr_, Foam::endl(), meshOctreeCubeCoordinates::faceNodes_, forAll, Foam::Info, meshOctreeAddressing::nodeLeaves(), tetCreatorOctree::octreeCheck_, and tetCreatorOctree::subNodeLabelsPtr_.

Referenced by tetCreatorOctree::createTets().

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

◆ createTetsFromFacesWithCentreNode()

void createTetsFromFacesWithCentreNode ( )
private

create tetrahedra from faces which share at least one edge with a refined cube

start creating tets

create 6 tets for each possible combination there are 12 possible combinations

the are two possible combinations of edges for each face

allocate face centre labels

create centre labels

create face centre point

create tets connecting centroids

Definition at line 40 of file tetCreatorOctreeFromFacesWithCentreNode.C.

References tetCreatorOctree::checkAndAppendTet(), tetCreatorOctree::cubeLabelPtr_, meshOctreeCubeCoordinates::edgeFaces_, meshOctreeCubeCoordinates::edgeNodes_, Foam::endl(), tetCreatorOctree::faceCentreLabelPtr_, meshOctreeCubeCoordinates::faceEdges_, meshOctreeCubeCoordinates::faceNodes_, forAll, forAllRow, Foam::Info, k, meshOctreeAddressing::nodeLabels(), meshOctreeAddressing::nodeLeaves(), tetCreatorOctree::octreeCheck_, p, VRWGraph::setRowSize(), List::size(), VRWGraph::sizeOfRow(), tetCreatorOctree::subNodeLabelsPtr_, tetCreatorOctree::tetPoints_, and Vector< scalar >::zero.

Referenced by tetCreatorOctree::createTets().

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

◆ createTetsAroundSplitEdges()

void createTetsAroundSplitEdges ( )
private

create tetrahedra from faces with split edges

find maximum refinement level of octree leaves attached to each vertex

start creating tets around split edges

start checking edges

the edge has at least one vertex at different ref level

store octree leaves at this edge they are all adjacent to the start point

add 4 tets

2. tet

3. tet

4. tet

add 4 tets

3. tet

4. tet

add the edge centre

Definition at line 41 of file tetCreatorOctreeTetsAroundSplitEdges.C.

References tetCreatorOctree::checkAndAppendTet(), tetCreatorOctree::cubeLabelPtr_, meshOctreeCubeCoordinates::edgeNodes_, Foam::endl(), tetCreatorOctree::faceCentreHelper_, tetCreatorOctree::faceCentreLabelPtr_, meshOctreeCubeCoordinates::faceNodes_, forAll, forAllReverse, forAllRow, Foam::Info, k, meshOctreeCubeCoordinates::level(), Foam::max(), n, meshOctreeAddressing::nodeLabels(), meshOctreeAddressing::nodeLeaves(), meshOctreeAddressing::numberOfNodes(), meshOctreeAddressing::octree(), tetCreatorOctree::octreeCheck_, meshOctree::returnLeaf(), VRWGraph::sizeOfRow(), tetCreatorOctree::sortedLeaves_, tetCreatorOctree::subNodeLabelsPtr_, tetCreatorOctree::tetPoints_, and tetCreatorOctree::tets_.

Referenced by tetCreatorOctree::createTets().

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

◆ checkAndAppendTet()

void checkAndAppendTet ( const partTet  pt)
inlineprivate

helper funtion which checks validity of a created tet and appends it if valid

Definition at line 33 of file tetCreatorOctreeI.H.

References Foam::endl(), Foam::Info, n, and tetCreatorOctree::tets_.

Referenced by tetCreatorOctree::createTetsAroundSplitEdges(), tetCreatorOctree::createTetsFromFacesWithCentreNode(), and tetCreatorOctree::createTetsFromSplitFaces().

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

◆ createTets()

void createTets ( )
private

◆ operator=()

void operator= ( const tetCreatorOctree )
private

Disallow default bitwise assignment.

◆ tetPoints()

const LongList<point>& tetPoints ( ) const
inline

Definition at line 144 of file tetCreatorOctree.H.

References tetCreatorOctree::created_, Foam::exit(), Foam::FatalError, FatalErrorIn, and tetCreatorOctree::tetPoints_.

Referenced by voronoiMeshExtractor::createAddressing(), tetMeshExtractorOctree::createPoints(), and voronoiMeshExtractor::createPoints().

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

◆ tets()

const LongList<partTet>& tets ( ) const
inline

Definition at line 155 of file tetCreatorOctree.H.

References tetCreatorOctree::created_, Foam::exit(), Foam::FatalError, FatalErrorIn, and tetCreatorOctree::tets_.

Referenced by voronoiMeshExtractor::createAddressing(), voronoiMeshExtractor::createPoints(), and tetMeshExtractorOctree::createPolyMesh().

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

Field Documentation

◆ edgeCoordinates_

const meshOctreeCubeCoordinates edgeCoordinates_
staticprivate

helper for searching coordinates of cubes around an edge

Definition at line 57 of file tetCreatorOctree.H.

◆ faceCentreHelper_

const label faceCentreHelper_
staticprivate
Initial value:
=
{
{3, 5, 2, 4},
{5, 1, 4, 0},
{1, 3, 0, 2}
}

helper for finding face centres of cubes sharing an edge

Definition at line 60 of file tetCreatorOctree.H.

Referenced by tetCreatorOctree::createTetsAroundEdges(), and tetCreatorOctree::createTetsAroundSplitEdges().

◆ octreeCheck_

meshOctreeAddressing octreeCheck_
private

◆ tetPoints_

LongList<point> tetPoints_
private

◆ tets_

LongList<partTet> tets_
private

◆ sortedLeaves_

List<labelLongList> sortedLeaves_
private

◆ subNodeLabelsPtr_

VRWGraph* subNodeLabelsPtr_
private

◆ cubeLabelPtr_

labelList* cubeLabelPtr_
private

◆ faceCentreLabelPtr_

VRWGraph* faceCentreLabelPtr_
private

◆ created_

bool created_
private

are tets created or not

Definition at line 84 of file tetCreatorOctree.H.

Referenced by tetCreatorOctree::createTets(), tetCreatorOctree::tetPoints(), and tetCreatorOctree::tets().


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