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

Public Member Functions

 meshOctreeAutomaticRefinement (meshOctree &mo, const IOdictionary &dict, bool useDATABoxes=false)
 Construct from meshOctree, dictionary and boolean. More...
 
 ~meshOctreeAutomaticRefinement ()
 
void activateHexRefinement ()
 activate hex refinement More...
 
void automaticRefinement ()
 

Private Member Functions

void createOctreeAddressing () const
 calculate octree addresing More...
 
const meshOctreeAddressingoctreeAddressing () const
 
void createSurfacePartitioner () const
 calculate partitionerPtr_ More...
 
const triSurfacePartitionerpartitioner () const
 
void createCurvatureEstimator () const
 calculate curvaturePtr_ More...
 
const triSurfaceCurvatureEstimatorcurvature () const
 
void setMaxRefLevel ()
 set maxRefLevel_ More...
 
void refineSelectedBoxes (labelList &, labelLongList &)
 refine selected boxes More...
 
bool curvatureRefinement ()
 refine DATA boxes based on curvature More...
 
bool refineBasedOnCurvature (labelList &, const labelLongList &)
 
bool proximityRefinement ()
 
bool refineBasedOnProximityTests (labelList &, const labelLongList &)
 
bool refineBasedOnContainedPartitions (labelList &, const labelLongList &)
 
bool refineBasedOnContainedCorners (labelList &, const labelLongList &)
 refine boxes based on the number of contained surface corners More...
 
 meshOctreeAutomaticRefinement (const meshOctreeAutomaticRefinement &)
 Disallow default bitwise copy construct. More...
 
void operator= (const meshOctreeAutomaticRefinement &)
 Disallow default bitwise assignment. More...
 

Private Attributes

meshOctreeoctree_
 reference to meshOctree More...
 
const IOdictionarymeshDict_
 const reference to mesh dictionary More...
 
bool useDATABoxes_
 use DATA boxes More...
 
bool hexRefinement_
 a flag for activating paired refinement More...
 
meshOctreeAddressingoctreeAddressingPtr_
 meshOctreeAddressing pointer More...
 
triSurfacePartitionerpartitionerPtr_
 surface partitioner pointer More...
 
triSurfaceCurvatureEstimatorcurvaturePtr_
 curvature estimator pointer More...
 
direction maxRefLevel_
 maximum allowed refinement level More...
 

Detailed Description

Definition at line 56 of file meshOctreeAutomaticRefinement.H.

Constructor & Destructor Documentation

◆ meshOctreeAutomaticRefinement() [1/2]

Disallow default bitwise copy construct.

◆ meshOctreeAutomaticRefinement() [2/2]

meshOctreeAutomaticRefinement ( meshOctree mo,
const IOdictionary dict,
bool  useDATABoxes = false 
)

Construct from meshOctree, dictionary and boolean.

calculate maximum allowed refinement level from the minimum cell size

Definition at line 161 of file meshOctreeAutomaticRefinement.C.

References dict, dictionary::found(), dictionary::lookup(), and Foam::readBool().

Here is the call graph for this function:

◆ ~meshOctreeAutomaticRefinement()

Member Function Documentation

◆ createOctreeAddressing()

void createOctreeAddressing ( ) const
private

◆ octreeAddressing()

const meshOctreeAddressing & octreeAddressing ( ) const
private

◆ createSurfacePartitioner()

void createSurfacePartitioner ( ) const
private

calculate partitionerPtr_

Definition at line 69 of file meshOctreeAutomaticRefinement.C.

References meshOctreeAutomaticRefinement::octree_, meshOctreeAutomaticRefinement::partitionerPtr_, and meshOctree::surface().

Referenced by meshOctreeAutomaticRefinement::partitioner().

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

◆ partitioner()

const triSurfacePartitioner & partitioner ( ) const
private

◆ createCurvatureEstimator()

void createCurvatureEstimator ( ) const
private

calculate curvaturePtr_

Definition at line 93 of file meshOctreeAutomaticRefinement.C.

References meshOctreeAutomaticRefinement::curvaturePtr_, meshOctreeAutomaticRefinement::octree_, and meshOctree::surface().

Referenced by meshOctreeAutomaticRefinement::curvature().

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

◆ curvature()

const triSurfaceCurvatureEstimator & curvature ( ) const
private

◆ setMaxRefLevel()

void setMaxRefLevel ( )
private

◆ refineSelectedBoxes()

void refineSelectedBoxes ( labelList refineBox,
labelLongList refCandidates 
)
private

refine selected boxes

find the cubes which have been marked for refinement

perform load distribution in case od parallel runs

communicate the cubes selected for refinement with other processors

find the cubes which shall checked in the next iteration

Definition at line 464 of file meshOctreeAutomaticRefinementRef.C.

References LongList< T, Offset >::append(), LongList< T, Offset >::clear(), coordinates(), meshOctreeCube::cubeLabel(), Foam::deleteDemandDrivenData(), meshOctreeModifier::findCubeForPosition(), forAll, meshOctreeCube::isLeaf(), meshOctreeModifier::leavesAccess(), meshOctreeModifier::loadDistribution(), meshOctreeModifier::markAdditionalLayers(), UPstream::parRun(), meshOctreeCubeCoordinates::refineForPosition(), meshOctreeModifier::refineSelectedBoxes(), LongList< T, Offset >::setSize(), and List::setSize().

Referenced by meshOctreeAutomaticRefinement::curvatureRefinement(), and meshOctreeAutomaticRefinement::proximityRefinement().

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

◆ curvatureRefinement()

bool curvatureRefinement ( )
private

◆ refineBasedOnCurvature()

bool refineBasedOnCurvature ( labelList refineBox,
const labelLongList refCandidates 
)
private

search for the minimum curvature radius at surface triangles

check the edge curvature

Definition at line 328 of file meshOctreeAutomaticRefinementRef.C.

References triSurfaceCurvatureEstimator::curvatureAtEdge(), Foam::endl(), forAll, Foam::Info, meshOctreeCubeCoordinates::level(), Foam::mag(), Foam::max(), triSurfaceCurvatureEstimator::meanCurvatureAtTriangle(), Foam::reduce(), and meshOctreeCubeCoordinates::size().

Referenced by meshOctreeAutomaticRefinement::curvatureRefinement().

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

◆ proximityRefinement()

bool proximityRefinement ( )
private

◆ refineBasedOnProximityTests()

bool refineBasedOnProximityTests ( labelList refineBox,
const labelLongList refCandidates 
)
private

find triangles in range

find edges contained in the neighbourhood

refine boxes with more than two face groups

Definition at line 400 of file meshOctreeAutomaticRefinementRef.C.

References Foam::constant::universal::c, meshOctreeCubeCoordinates::centre(), DynList< T, staticSize >::clear(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), meshOctreeCubeCoordinates::level(), Foam::help::numberOfEdgeGroups(), Foam::help::numberOfFaceGroups(), Foam::reduce(), s(), and meshOctreeCubeCoordinates::size().

Referenced by meshOctreeAutomaticRefinement::proximityRefinement().

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

◆ refineBasedOnContainedPartitions()

bool refineBasedOnContainedPartitions ( labelList refineBox,
const labelLongList refCandidates 
)
private

refine DATA boxes containing 2 or more corners, 2 or more distinct edges, etc.

find leaves which contains corner nodes

find triangle patches contained in this box

find edge partitions contained in this box

Definition at line 222 of file meshOctreeAutomaticRefinementRef.C.

References DynList< T, staticSize >::appendIfNotIn(), Foam::constant::universal::c, meshOctreeCubeCoordinates::centre(), DynList< T, staticSize >::clear(), triSurfacePartitioner::edgeGroupEdgeGroups(), triSurfacePartitioner::edgeGroups(), Foam::endl(), forAll, found, Foam::Info, meshOctreeModifier::leavesAccess(), patches, triSurfacePartitioner::patchPatches(), Foam::reduce(), s(), DynList< T, staticSize >::size(), and meshOctreeCubeCoordinates::size().

Referenced by meshOctreeAutomaticRefinement::proximityRefinement().

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

◆ refineBasedOnContainedCorners()

bool refineBasedOnContainedCorners ( labelList refineBox,
const labelLongList refCandidates 
)
private

refine boxes based on the number of contained surface corners

find leaves which contains corner nodes

Definition at line 128 of file meshOctreeAutomaticRefinementRef.C.

References Foam::constant::universal::c, DynList< T, staticSize >::clear(), triSurfacePartitioner::corners(), Foam::endl(), forAll, Foam::Info, meshOctreeModifier::leavesAccess(), Foam::mag(), points, Foam::reduce(), List::size(), LongList< T, Offset >::size(), and surface::surface().

Referenced by meshOctreeAutomaticRefinement::proximityRefinement().

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

◆ operator=()

void operator= ( const meshOctreeAutomaticRefinement )
private

Disallow default bitwise assignment.

◆ activateHexRefinement()

void activateHexRefinement ( )

activate hex refinement

Definition at line 60 of file meshOctreeAutomaticRefinementRef.C.

References meshOctreeAutomaticRefinement::hexRefinement_.

Referenced by meshOctreeCreator::createOctreeBoxes().

Here is the caller graph for this function:

◆ automaticRefinement()

void automaticRefinement ( )

refine octree boxes which are too coarse and cannot capture surface features

Definition at line 65 of file meshOctreeAutomaticRefinementRef.C.

References meshOctreeAutomaticRefinement::curvatureRefinement(), Foam::endl(), Foam::Info, meshOctreeAutomaticRefinement::maxRefLevel_, and meshOctreeAutomaticRefinement::proximityRefinement().

Referenced by meshOctreeCreator::createOctreeBoxes().

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

Field Documentation

◆ octree_

meshOctree& octree_
private

◆ meshDict_

const IOdictionary& meshDict_
private

◆ useDATABoxes_

bool useDATABoxes_
private

◆ hexRefinement_

bool hexRefinement_
private

a flag for activating paired refinement

Definition at line 69 of file meshOctreeAutomaticRefinement.H.

Referenced by meshOctreeAutomaticRefinement::activateHexRefinement().

◆ octreeAddressingPtr_

meshOctreeAddressing* octreeAddressingPtr_
mutableprivate

◆ partitionerPtr_

triSurfacePartitioner* partitionerPtr_
mutableprivate

◆ curvaturePtr_

triSurfaceCurvatureEstimator* curvaturePtr_
mutableprivate

◆ maxRefLevel_

direction maxRefLevel_
private

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