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 | |
meshOctree & | octree_ |
Reference to meshOctree. More... | |
scalar | scalingFactor_ |
Scaling factor. More... | |
const IOdictionary * | meshDictPtr_ |
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... | |
Definition at line 57 of file meshOctreeCreator.H.
|
private |
Disallow default bitwise copy construct.
meshOctreeCreator | ( | meshOctree & | mo | ) |
construct from meshOctree
Definition at line 43 of file meshOctreeCreator.C.
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.
|
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().
|
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().
|
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().
|
private |
refine boxes near DATA boxes to get a nice smooth surface
ensure one to one matching with unknown boxes
refine cubes
set up inside-outside information
Definition at line 871 of file meshOctreeCreatorAdjustOctreeToSurface.C.
References LongList< T, Offset >::append(), LongList< T, Offset >::clear(), HashTable::clear(), meshOctreeCubeBasic::coordinates(), meshOctreeCreator::createInsideOutsideInformation(), meshOctreeCube::cubeLabel(), meshOctreeCubeBasic::cubeType(), meshOctreeModifier::distributeLeavesToProcessors(), Foam::endl(), meshOctree::exchangeRequestsWithNeighbourProcessors(), meshOctree::findLeafLabelForPosition(), forAll, HashTable::found(), meshOctreeCreator::hexRefinement_, Foam::Info, HashSet< Key, Hash >::insert(), k, meshOctreeModifier::leavesAccess(), meshOctreeCubeCoordinates::level(), meshOctreeCreator::loadDistribution(), meshOctree::neiProcs(), meshOctreeCreator::octree_, meshOctreeCubeBasic::OTHERPROC, meshOctreeCubeBasic::OUTSIDE, UPstream::parRun(), meshOctreeModifier::refineSelectedBoxes(), meshOctree::regularityPositions(), List::size(), LongList< T, Offset >::size(), and startTime.
Referenced by meshOctreeCreator::createOctreeBoxes().
refine boxes of the given flag to the given size
refine selected cubes
Definition at line 1135 of file meshOctreeCreatorAdjustOctreeToSurface.C.
References meshOctreeCubeBasic::cubeType(), meshOctreeModifier::distributeLeavesToProcessors(), Foam::endl(), forAll, Foam::Info, meshOctreeModifier::leavesAccess(), meshOctreeCubeCoordinates::level(), UPstream::parRun(), Foam::reduce(), meshOctreeModifier::refineSelectedBoxes(), and LongList< T, Offset >::size().
Referenced by meshOctreeCreator::refineInsideAndUnknownBoxes().
|
private |
refine DATA boxes to the given level
select boxes which need to be refined
mark additional boxes for refinement to achieve correct refinement distance
refine boxes
Definition at line 57 of file meshOctreeCreatorAdjustOctreeToSurface.C.
References meshOctreeCube::containedElements(), meshOctreeSlot::containedTriangles_, meshOctreeModifier::distributeLeavesToProcessors(), Foam::endl(), forAll, forAllReverse, forAllRow, meshOctreeCube::hasContainedElements(), meshOctreeCreator::hexRefinement_, Foam::Info, meshOctreeModifier::leavesAccess(), meshOctreeCubeCoordinates::level(), meshOctreeCreator::loadDistribution(), meshOctreeCreator::octree_, UPstream::parRun(), Foam::reduce(), meshOctreeModifier::refineSelectedBoxes(), meshOctreeModifier::refineSelectedBoxesAndAdditionalLayers(), LongList< T, Offset >::size(), meshOctreeCube::slotPtr(), and meshOctreeCreator::surfRefLevel_.
Referenced by meshOctreeCreator::createOctreeBoxes().
|
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().
|
private |
Definition at line 441 of file meshOctreeCreatorCreateOctreeBoxes.C.
References meshOctreeCreator::globalRefLevel_, meshOctreeCubeBasic::INSIDE, meshOctreeCreator::refineBoxes(), and meshOctreeCubeBasic::UNKNOWN.
Referenced by meshOctreeCreator::createOctreeBoxes().
|
private |
move octree cubes from one processor to another until each processor contains the same number of leaves of the required type
Definition at line 46 of file meshOctreeCreatorLoadDistribution.C.
References meshOctreeCubeBasic::DATA, dictionary::found(), meshOctreeCubeBasic::INSIDE, meshOctreeModifier::loadDistribution(), meshOctreeCreator::meshDictPtr_, meshOctree::neiProcs(), meshOctreeCreator::octree_, and List::size().
Referenced by meshOctreeCreator::createOctreeBoxes(), meshOctreeCreator::refineBoundary(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), and meshOctreeCreator::refineBoxesNearDataBoxes().
|
private |
set the boundBox such that maxCellSize is achieved
exchange data
set other refinement parameters set boundary ref level
exchange data
set patch-wise ref levels
map patch name to its index
map a facet subset name to its index
set refinement for these entries
patch-based refinement
this is a facet subset
Definition at line 49 of file meshOctreeCreatorCreateOctreeBoxes.C.
References Foam::constant::universal::c, dict, Foam::endl(), forAll, dictionary::found(), meshOctreeCreator::globalRefLevel_, Foam::Info, dictionary::isDict(), meshOctreeModifier::isRootInitialisedAccess(), dictionary::lookup(), Foam::mag(), boundBox::max(), meshOctreeCreator::meshDictPtr_, boundBox::min(), geometryBase::name(), meshOctreeCreator::octree_, UPstream::parRun(), patchNames(), Foam::pow(), Foam::readLabel(), Foam::readScalar(), Foam::reduce(), meshOctreeModifier::rootBoxAccess(), s(), meshOctreeCreator::scalingFactor_, meshOctreeModifier::searchRangeAccess(), List::setSize(), List::size(), dictionary::subDict(), meshOctree::surface(), meshOctreeCreator::surfRefLevel_, List::transfer(), Foam::Warning, WarningIn, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by meshOctreeCreator::createOctreeBoxes().
|
private |
Disallow default bitwise assignment.
void setScalingFactor | ( | const scalar | s | ) |
set the scaling factor
Definition at line 74 of file meshOctreeCreator.C.
References s(), and meshOctreeCreator::scalingFactor_.
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_.
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().
void createOctreeWithRefinedBoundary | ( | const direction | maxLevel, |
const label | nTrianglesInLeaf = 15 |
||
) |
refine boxes containing surface elements this is used for proximity searches
Definition at line 498 of file meshOctreeCreatorCreateOctreeBoxes.C.
References meshOctreeModifier::createListOfLeaves(), meshOctreeModifier::dataSlotsAccess(), forAll, meshOctreeModifier::leavesAccess(), meshOctreeCubeCoordinates::level(), meshOctreeCube::refineCube(), DynList< T, staticSize >::size(), and surface::surface().
Referenced by triSurfaceImportSurfaceAsSubset::addSurfaceAsSubset(), Foam::triSurfaceChecks::checkCollocatedPoints(), Foam::triSurfaceChecks::checkOverlaps(), Foam::triSurfaceChecks::checkSelfIntersections(), cartesian2DMeshGenerator::generateBoundaryLayers(), findCellsIntersectingSurface::generateOctree(), tetMeshGenerator::projectSurfaceAfterBackScaling(), voronoiMeshGenerator::projectSurfaceAfterBackScaling(), and cartesianMeshGenerator::projectSurfaceAfterBackScaling().
|
protected |
Reference to meshOctree.
Definition at line 63 of file meshOctreeCreator.H.
Referenced by meshOctreeCreator::createInsideOutsideInformation(), meshOctreeCreator::createOctreeBoxes(), meshOctreeCreator::loadDistribution(), meshOctreeCreator::refineBoundary(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), meshOctreeCreator::refineBoxesNearDataBoxes(), and meshOctreeCreator::setRootCubeSizeAndRefParameters().
|
protected |
Scaling factor.
Definition at line 66 of file meshOctreeCreator.H.
Referenced by meshOctreeCreator::setRootCubeSizeAndRefParameters(), and meshOctreeCreator::setScalingFactor().
|
protected |
Dictionary containing information necessary to perform refinement.
Definition at line 69 of file meshOctreeCreator.H.
Referenced by meshOctreeCreator::createOctreeBoxes(), meshOctreeCreator::loadDistribution(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), and meshOctreeCreator::setRootCubeSizeAndRefParameters().
|
protected |
hex refinement flag
Definition at line 72 of file meshOctreeCreator.H.
Referenced by meshOctreeCreator::activateHexRefinement(), meshOctreeCreator::createOctreeBoxes(), meshOctreeCreator::refineBoundary(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), and meshOctreeCreator::refineBoxesNearDataBoxes().
|
private |
ref level to achieve max cell size
Definition at line 108 of file meshOctreeCreator.H.
Referenced by meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), meshOctreeCreator::refineInsideAndUnknownBoxes(), and meshOctreeCreator::setRootCubeSizeAndRefParameters().
this list contains ref level for each surface triangle
Definition at line 111 of file meshOctreeCreator.H.
Referenced by meshOctreeCreator::refineBoundary(), and meshOctreeCreator::setRootCubeSizeAndRefParameters().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.