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

Public Member Functions

 meshOctreeCreator (meshOctree &)
 construct from meshOctree More...
 
 meshOctreeCreator (meshOctree &mo, const IOdictionary &dict)
 Construct from meshOctree and dictionary. More...
 
 ~meshOctreeCreator ()
 
void setScalingFactor (const scalar)
 set the scaling factor More...
 
void activateHexRefinement ()
 
void createOctreeBoxes ()
 create octree boxes More...
 
void createOctreeWithRefinedBoundary (const direction maxLevel, const label nTrianglesInLeaf=15)
 

Protected Attributes

meshOctreeoctree_
 Reference to meshOctree. More...
 
scalar scalingFactor_
 Scaling factor. More...
 
const IOdictionarymeshDictPtr_
 Dictionary containing information necessary to perform refinement. More...
 
bool hexRefinement_
 hex refinement flag More...
 

Private Member Functions

void refineBoxesContainedInObjects ()
 refine boxes contained inside the objects for refinement More...
 
void refineBoxesIntersectingSurfaces ()
 
void refineBoxesIntersectingEdgeMeshes ()
 
void refineBoxesNearDataBoxes (const label nLayers=1)
 refine boxes near DATA boxes to get a nice smooth surface More...
 
void refineBoxes (const direction refLevel, const direction cubeType)
 refine boxes of the given flag to the given size More...
 
void refineBoundary ()
 
void createInsideOutsideInformation ()
 
void refineInsideAndUnknownBoxes ()
 
void loadDistribution (const bool distributeUsed=false)
 
void setRootCubeSizeAndRefParameters ()
 set the boundBox such that maxCellSize is achieved More...
 
 meshOctreeCreator (const meshOctreeCreator &)
 Disallow default bitwise copy construct. More...
 
void operator= (const meshOctreeCreator &)
 Disallow default bitwise assignment. More...
 

Private Attributes

direction globalRefLevel_
 ref level to achieve max cell size More...
 
List< DynList< std::pair< direction, scalar > > > surfRefLevel_
 this list contains ref level for each surface triangle More...
 

Detailed Description

Definition at line 57 of file meshOctreeCreator.H.

Constructor & Destructor Documentation

◆ meshOctreeCreator() [1/3]

meshOctreeCreator ( const meshOctreeCreator )
private

Disallow default bitwise copy construct.

◆ meshOctreeCreator() [2/3]

construct from meshOctree

Definition at line 43 of file meshOctreeCreator.C.

◆ meshOctreeCreator() [3/3]

meshOctreeCreator ( meshOctree mo,
const IOdictionary dict 
)

Construct from meshOctree and dictionary.

Definition at line 54 of file meshOctreeCreator.C.

◆ ~meshOctreeCreator()

Definition at line 69 of file meshOctreeCreator.C.

Member Function Documentation

◆ refineBoxesContainedInObjects()

void refineBoxesContainedInObjects ( )
private

refine boxes contained inside the objects for refinement

calculate refinement levels

calculate additional refinement levels from cell size

read refinement thickness

start refining boxes inside the objects

select boxes which need to be refined

transform bounding boxes into non-modified coordinates

mark additional boxes for refinement to achieve correct refinement distance

refine boxes

delete coordinate modifier if it exists

set up inside-outside information

Definition at line 196 of file meshOctreeCreatorAdjustOctreeToSurface.C.

References coordinateModifier::backwardModifiedPoint(), PtrList::clear(), meshOctreeCreator::createInsideOutsideInformation(), meshOctreeCubeCoordinates::cubeBox(), meshOctreeCubeBasic::cubeType(), Foam::deleteDemandDrivenData(), dict, entry::dict(), meshOctreeModifier::distributeLeavesToProcessors(), Foam::endl(), forAll, dictionary::found(), meshOctreeCreator::globalRefLevel_, meshOctreeCreator::hexRefinement_, Foam::Info, dictionary::isDict(), entry::keyword(), meshOctreeModifier::leavesAccess(), meshOctreeCubeCoordinates::level(), meshOctreeCreator::loadDistribution(), dictionary::lookup(), boundBox::max(), Foam::max(), meshOctreeCreator::meshDictPtr_, boundBox::min(), meshOctree::neiProcs(), objectRefinement::New(), meshOctreeCreator::octree_, meshOctreeCubeBasic::OUTSIDE, Foam::readScalar(), Foam::reduce(), meshOctreeModifier::refineSelectedBoxes(), meshOctreeModifier::refineSelectedBoxesAndAdditionalLayers(), meshOctree::rootBox(), s(), PtrList::set(), PtrList::setSize(), List::size(), LongList< T, Offset >::size(), PtrList::size(), and dictionary::subDict().

Referenced by meshOctreeCreator::createOctreeBoxes().

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

◆ refineBoxesIntersectingSurfaces()

void refineBoxesIntersectingSurfaces ( )
private

refine boxes intersected by surface meshes used as refinement sources

read surface meshes and calculate the refinement level for each surface mesh

load surface meshes into memory

set the refinement level for the current surface

start refining boxes intersecting triangles in each refinement surface

select boxes that need to be refined

find the bounding box of the current triangle

find octree leaves inside the bounding box

check which of the leaves are intersected by the triangle

mark boxes for refinement

mark additional boxes for refinement to achieve correct refinement distance

refine boxes

Definition at line 421 of file meshOctreeCreatorAdjustOctreeToSurface.C.

References DynList< T, staticSize >::clear(), dict, meshOctreeModifier::distributeLeavesToProcessors(), Foam::endl(), meshOctree::findLeavesContainedInBox(), forAll, dictionary::found(), meshOctreeCreator::globalRefLevel_, meshOctreeCreator::hexRefinement_, Foam::Info, meshOctreeCubeCoordinates::intersectsTriangleExact(), meshOctreeModifier::leavesAccess(), meshOctreeCubeCoordinates::level(), meshOctreeCreator::loadDistribution(), dictionary::lookup(), boundBox::max(), Foam::max(), meshOctreeCreator::meshDictPtr_, boundBox::min(), Foam::min(), surfaceMeshGeometryModification::modifyGeometry(), meshOctree::neiProcs(), meshOctreeCreator::octree_, points, triSurfPoints::points(), Foam::readLabel(), Foam::readScalar(), Foam::reduce(), meshOctreeModifier::refineSelectedBoxes(), meshOctreeModifier::refineSelectedBoxesAndAdditionalLayers(), meshOctree::rootBox(), s(), PtrList::set(), List::size(), LongList< T, Offset >::size(), meshOctreeCubeCoordinates::size(), boundBox::span(), dictionary::subDict(), and dictionary::toc().

Referenced by meshOctreeCreator::createOctreeBoxes().

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

◆ refineBoxesIntersectingEdgeMeshes()

void refineBoxesIntersectingEdgeMeshes ( )
private

refine boxes by edge meshes used as refinement sources

read edge meshes and calculate the refinement level for each edge mesh

load edge meshes into memory

set the refinement level for the current mesh

start refining boxes intersecting triangles in each refinement surface

select boxes which need to be refined

find the bounding box of the current triangle

find octree leaves inside the bounding box

check which of the leaves are intersected by the triangle

mark additional boxes for refinement to achieve correct refinement distance

refine boxes

Definition at line 652 of file meshOctreeCreatorAdjustOctreeToSurface.C.

References DynList< T, staticSize >::append(), DynList< T, staticSize >::clear(), dict, meshOctreeModifier::distributeLeavesToProcessors(), Foam::e, edgeMesh::edges(), Foam::endl(), meshOctree::findLeavesContainedInBox(), forAll, dictionary::found(), meshOctreeCreator::globalRefLevel_, meshOctreeCreator::hexRefinement_, Foam::Info, meshOctreeCubeCoordinates::intersectsLine(), meshOctreeModifier::leavesAccess(), meshOctreeCubeCoordinates::level(), meshOctreeCreator::loadDistribution(), dictionary::lookup(), boundBox::max(), Foam::max(), meshOctreeCreator::meshDictPtr_, boundBox::min(), Foam::min(), edgeMeshGeometryModification::modifyGeometry(), meshOctree::neiProcs(), meshOctreeCreator::octree_, points, edgeMesh::points(), Foam::readLabel(), Foam::readScalar(), Foam::reduce(), meshOctreeModifier::refineSelectedBoxes(), meshOctreeModifier::refineSelectedBoxesAndAdditionalLayers(), meshOctree::rootBox(), s(), PtrList::set(), List::size(), LongList< T, Offset >::size(), boundBox::span(), dictionary::subDict(), and dictionary::toc().

Referenced by meshOctreeCreator::createOctreeBoxes().

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

◆ refineBoxesNearDataBoxes()

void refineBoxesNearDataBoxes ( const label  nLayers = 1)
private

◆ refineBoxes()

void refineBoxes ( const direction  refLevel,
const direction  cubeType 
)
private

◆ refineBoundary()

void refineBoundary ( )
private

◆ createInsideOutsideInformation()

void createInsideOutsideInformation ( )
private

Definition at line 40 of file meshOctreeCreatorFrontalMarking.C.

References Foam::endl(), Foam::Info, and meshOctreeCreator::octree_.

Referenced by meshOctreeCreator::createOctreeBoxes(), meshOctreeCreator::refineBoxesContainedInObjects(), and meshOctreeCreator::refineBoxesNearDataBoxes().

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

◆ refineInsideAndUnknownBoxes()

void refineInsideAndUnknownBoxes ( )
private

Definition at line 441 of file meshOctreeCreatorCreateOctreeBoxes.C.

References meshOctreeCreator::globalRefLevel_, meshOctreeCubeBasic::INSIDE, meshOctreeCreator::refineBoxes(), and meshOctreeCubeBasic::UNKNOWN.

Referenced by meshOctreeCreator::createOctreeBoxes().

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

◆ loadDistribution()

void loadDistribution ( const bool  distributeUsed = false)
private

◆ setRootCubeSizeAndRefParameters()

void setRootCubeSizeAndRefParameters ( )
private

◆ operator=()

void operator= ( const meshOctreeCreator )
private

Disallow default bitwise assignment.

◆ setScalingFactor()

void setScalingFactor ( const scalar  s)

set the scaling factor

Definition at line 74 of file meshOctreeCreator.C.

References s(), and meshOctreeCreator::scalingFactor_.

Here is the call graph for this function:

◆ activateHexRefinement()

void activateHexRefinement ( )

activate octree refinement which marks all sons of an octree box for refinement in case a single son is marked for refinement this type of refinement is necessary for creating hex meshes

Definition at line 79 of file meshOctreeCreator.C.

References meshOctreeCreator::hexRefinement_.

◆ createOctreeBoxes()

void createOctreeBoxes ( )

create octree boxes

set root cube size in order to achieve desired maxCellSize

refine to required boundary resolution

refine parts intersected by surface meshes acting as refinement sources

refine parts intersected by edge meshes acting as refinement sources

perform automatic octree refinement

set up inside-outside information

refine INSIDE and UNKNOWN boxes to to the given cell size

refine boxes inside the geometry objects

make sure that INSIDE and UNKNOWN neighbours of DATA boxes have the same or higher refinement level

distribute octree such that each processor has the same number of leaf boxes which will be used as mesh cells

Definition at line 448 of file meshOctreeCreatorCreateOctreeBoxes.C.

References meshOctreeAutomaticRefinement::activateHexRefinement(), meshOctreeAutomaticRefinement::automaticRefinement(), meshOctreeCreator::createInsideOutsideInformation(), Foam::endl(), meshOctreeCreator::hexRefinement_, Foam::Info, meshOctreeCreator::loadDistribution(), meshOctreeCreator::meshDictPtr_, meshOctreeCreator::octree_, UPstream::parRun(), meshOctreeCreator::refineBoundary(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), meshOctreeCreator::refineBoxesNearDataBoxes(), meshOctreeCreator::refineInsideAndUnknownBoxes(), and meshOctreeCreator::setRootCubeSizeAndRefParameters().

Referenced by cartesian2DMeshGenerator::cartesian2DMeshGenerator(), cartesianMeshGenerator::cartesianMeshGenerator(), tetMeshGenerator::tetMeshGenerator(), and voronoiMeshGenerator::voronoiMeshGenerator().

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

◆ createOctreeWithRefinedBoundary()

void createOctreeWithRefinedBoundary ( const direction  maxLevel,
const label  nTrianglesInLeaf = 15 
)

Field Documentation

◆ octree_

meshOctree& octree_
protected

◆ scalingFactor_

scalar scalingFactor_
protected

◆ meshDictPtr_

const IOdictionary* meshDictPtr_
protected

◆ hexRefinement_

bool hexRefinement_
protected

◆ globalRefLevel_

direction globalRefLevel_
private

◆ surfRefLevel_

List<DynList<std::pair<direction, scalar> > > surfRefLevel_
private

this list contains ref level for each surface triangle

Definition at line 111 of file meshOctreeCreator.H.

Referenced by meshOctreeCreator::refineBoundary(), and meshOctreeCreator::setRootCubeSizeAndRefParameters().


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