Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
backgroundMeshDecomposition Class Reference

Store a background polyMesh to use for the decomposition of space and queries for parallel conformalVoronoiMesh. More...

Collaboration diagram for backgroundMeshDecomposition:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("backgroundMeshDecomposition")
 Runtime type information. More...
 
 backgroundMeshDecomposition (const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const dictionary &coeffsDict, const fileName &decompDictFile="")
 Construct from components in foamyHexMesh operation. More...
 
 ~backgroundMeshDecomposition ()
 Destructor. More...
 
autoPtr< mapDistributePolyMeshdistribute (volScalarField &cellWeights)
 Redistribute the background mesh based on a supplied weight field,. More...
 
template<typename PointType >
autoPtr< mapDistributedistributePoints (List< PointType > &points) const
 Distribute supplied the points to the appropriate processor. More...
 
bool positionOnThisProcessor (const point &pt) const
 Is the given position inside the domain of this decomposition. More...
 
boolList positionOnThisProcessor (const List< point > &pts) const
 Are the given positions inside the domain of this decomposition. More...
 
bool overlapsThisProcessor (const treeBoundBox &box) const
 Does the given box overlap the faces of the boundary of this. More...
 
bool overlapsThisProcessor (const point &centre, const scalar radiusSqr) const
 Does the given sphere overlap the faces of the boundary of this. More...
 
pointIndexHit findLine (const point &start, const point &end) const
 Find nearest intersection of line between start and end, (exposing. More...
 
pointIndexHit findLineAny (const point &start, const point &end) const
 Find any intersection of line between start and end, (exposing. More...
 
template<typename PointType >
labelList processorPosition (const List< PointType > &pts) const
 What processor is the given position on? More...
 
labelList processorNearestPosition (const List< point > &pts) const
 What is the nearest processor to the given position? More...
 
List< List< pointIndexHit > > intersectsProcessors (const List< point > &starts, const List< point > &ends, bool includeOwnProcessor=false) const
 Which processors are intersected by the line segment, returns all. More...
 
bool overlapsOtherProcessors (const point &centre, const scalar &radiusSqr) const
 
labelList overlapProcessors (const point &centre, const scalar radiusSqr) const
 
const fvMeshmesh () const
 Return access to the underlying mesh. More...
 
const indexedOctree< treeDataBPatch > & tree () const
 Return access to the underlying tree. More...
 
const treeBoundBoxprocBounds () const
 Return the boundBox of this processor. More...
 
const labelListcellLevel () const
 Return the cell level of the underlying mesh. More...
 
const labelListpointLevel () const
 Return the point level of the underlying mesh. More...
 

Static Public Member Functions

static autoPtr< mapDistributebuildMap (const List< label > &toProc)
 Build a mapDistribute for the supplied destination processor data. More...
 

Private Member Functions

void initialRefinement ()
 
void printMeshData (const polyMesh &mesh) const
 Print details of the decomposed mesh. More...
 
bool refineCell (label cellI, volumeType volType, scalar &weightEstimate) const
 Estimate the number of vertices that will be in this cell, returns. More...
 
labelList selectRefinementCells (List< volumeType > &volumeStatus, volScalarField &cellWeights) const
 Select cells for refinement at the surface of the geometry to be. More...
 
void buildPatchAndTree ()
 Build the surface patch and search tree. More...
 
 backgroundMeshDecomposition (const backgroundMeshDecomposition &)
 Disallow default bitwise copy construct. More...
 
void operator= (const backgroundMeshDecomposition &)
 Disallow default bitwise assignment. More...
 

Private Attributes

const TimerunTime_
 Method details dictionary. More...
 
const conformationSurfacesgeometryToConformTo_
 Reference to surface. More...
 
RandomrndGen_
 Random number generator. More...
 
fvMesh mesh_
 Mesh stored on for this processor, specifiying the domain that it. More...
 
hexRef8 meshCutter_
 Refinement object. More...
 
autoPtr< bPatchboundaryFacesPtr_
 Patch containing an independent representation of the surface of the. More...
 
autoPtr< indexedOctree< treeDataBPatch > > bFTreePtr_
 Search tree for the boundaryFaces_ patch. More...
 
treeBoundBoxList allBackgroundMeshBounds_
 The bounds of all background meshes on all processors. More...
 
treeBoundBox globalBackgroundBounds_
 The overall bounds of all of the background meshes, used to test if. More...
 
scalar mergeDist_
 merge distance required by fvMeshDistribute More...
 
scalar spanScale_
 Scale of a cell span vs cell size used to decide to refine a cell. More...
 
scalar minCellSizeLimit_
 Smallest minimum cell size allowed, i.e. to avoid high initial. More...
 
label minLevels_
 Minimum normal level of refinement. More...
 
label volRes_
 How fine should the initial sample of the volume a box be to. More...
 
scalar maxCellWeightCoeff_
 Allowed factor above the average cell weight before a background. More...
 

Detailed Description

Store a background polyMesh to use for the decomposition of space and queries for parallel conformalVoronoiMesh.

The requirements are:

Source files

Definition at line 92 of file backgroundMeshDecomposition.H.

Constructor & Destructor Documentation

◆ backgroundMeshDecomposition() [1/2]

Disallow default bitwise copy construct.

◆ backgroundMeshDecomposition() [2/2]

backgroundMeshDecomposition ( const Time runTime,
Random rndGen,
const conformationSurfaces geometryToConformTo,
const dictionary coeffsDict,
const fileName decompDictFile = "" 
)

Construct from components in foamyHexMesh operation.

◆ ~backgroundMeshDecomposition()

Destructor.

Member Function Documentation

◆ initialRefinement()

void initialRefinement ( )
private

◆ printMeshData()

void printMeshData ( const polyMesh mesh) const
private

Print details of the decomposed mesh.

◆ refineCell()

bool refineCell ( label  cellI,
volumeType  volType,
scalar &  weightEstimate 
) const
private

Estimate the number of vertices that will be in this cell, returns.

true if the cell is to be split because of the density ratio inside it

◆ selectRefinementCells()

labelList selectRefinementCells ( List< volumeType > &  volumeStatus,
volScalarField cellWeights 
) const
private

Select cells for refinement at the surface of the geometry to be.

meshed

◆ buildPatchAndTree()

void buildPatchAndTree ( )
private

Build the surface patch and search tree.

◆ operator=()

void operator= ( const backgroundMeshDecomposition )
private

Disallow default bitwise assignment.

◆ ClassName()

ClassName ( "backgroundMeshDecomposition"  )

Runtime type information.

◆ buildMap()

static autoPtr<mapDistribute> buildMap ( const List< label > &  toProc)
static

Build a mapDistribute for the supplied destination processor data.

◆ distribute()

autoPtr<mapDistributePolyMesh> distribute ( volScalarField cellWeights)

Redistribute the background mesh based on a supplied weight field,.

returning a map to use to redistribute vertices.

◆ distributePoints()

autoPtr<mapDistribute> distributePoints ( List< PointType > &  points) const

Distribute supplied the points to the appropriate processor.

◆ positionOnThisProcessor() [1/2]

bool positionOnThisProcessor ( const point pt) const

Is the given position inside the domain of this decomposition.

◆ positionOnThisProcessor() [2/2]

boolList positionOnThisProcessor ( const List< point > &  pts) const

Are the given positions inside the domain of this decomposition.

◆ overlapsThisProcessor() [1/2]

bool overlapsThisProcessor ( const treeBoundBox box) const

Does the given box overlap the faces of the boundary of this.

processor

◆ overlapsThisProcessor() [2/2]

bool overlapsThisProcessor ( const point centre,
const scalar  radiusSqr 
) const

Does the given sphere overlap the faces of the boundary of this.

processor

◆ findLine()

pointIndexHit findLine ( const point start,
const point end 
) const

Find nearest intersection of line between start and end, (exposing.

underlying indexedOctree)

◆ findLineAny()

pointIndexHit findLineAny ( const point start,
const point end 
) const

Find any intersection of line between start and end, (exposing.

underlying indexedOctree)

◆ processorPosition()

labelList processorPosition ( const List< PointType > &  pts) const

What processor is the given position on?

◆ processorNearestPosition()

labelList processorNearestPosition ( const List< point > &  pts) const

What is the nearest processor to the given position?

◆ intersectsProcessors()

List<List<pointIndexHit> > intersectsProcessors ( const List< point > &  starts,
const List< point > &  ends,
bool  includeOwnProcessor = false 
) const

Which processors are intersected by the line segment, returns all.

processors whose boundary patch is intersected by the sphere. By default this does not return the processor that the query is launched from, it is assumed that the point is on that processor. The index data member of the pointIndexHit is replaced with the processor index.

◆ overlapsOtherProcessors()

bool overlapsOtherProcessors ( const point centre,
const scalar &  radiusSqr 
) const

◆ overlapProcessors()

labelList overlapProcessors ( const point centre,
const scalar  radiusSqr 
) const

◆ mesh()

const Foam::fvMesh & mesh ( ) const
inline

Return access to the underlying mesh.

Definition at line 28 of file backgroundMeshDecompositionI.H.

References backgroundMeshDecomposition::mesh_.

◆ tree()

const Foam::indexedOctree< Foam::treeDataBPatch > & tree ( ) const
inline

Return access to the underlying tree.

Definition at line 35 of file backgroundMeshDecompositionI.H.

◆ procBounds()

const Foam::treeBoundBox & procBounds ( ) const
inline

Return the boundBox of this processor.

Definition at line 42 of file backgroundMeshDecompositionI.H.

References UPstream::myProcNo().

Here is the call graph for this function:

◆ cellLevel()

const Foam::labelList & cellLevel ( ) const
inline

Return the cell level of the underlying mesh.

Definition at line 48 of file backgroundMeshDecompositionI.H.

◆ pointLevel()

const Foam::labelList & pointLevel ( ) const
inline

Return the point level of the underlying mesh.

Definition at line 54 of file backgroundMeshDecompositionI.H.

Field Documentation

◆ runTime_

const Time& runTime_
private

Method details dictionary.

dictionary coeffsDict_; Reference to runtime

Definition at line 100 of file backgroundMeshDecomposition.H.

◆ geometryToConformTo_

const conformationSurfaces& geometryToConformTo_
private

Reference to surface.

Definition at line 103 of file backgroundMeshDecomposition.H.

◆ rndGen_

Random& rndGen_
private

Random number generator.

Definition at line 106 of file backgroundMeshDecomposition.H.

◆ mesh_

fvMesh mesh_
private

Mesh stored on for this processor, specifiying the domain that it.

is responsible for.

Definition at line 110 of file backgroundMeshDecomposition.H.

Referenced by backgroundMeshDecomposition::mesh().

◆ meshCutter_

hexRef8 meshCutter_
private

Refinement object.

Definition at line 113 of file backgroundMeshDecomposition.H.

◆ boundaryFacesPtr_

autoPtr<bPatch> boundaryFacesPtr_
private

Patch containing an independent representation of the surface of the.

mesh of this processor

Definition at line 117 of file backgroundMeshDecomposition.H.

◆ bFTreePtr_

autoPtr<indexedOctree<treeDataBPatch> > bFTreePtr_
private

Search tree for the boundaryFaces_ patch.

Definition at line 120 of file backgroundMeshDecomposition.H.

◆ allBackgroundMeshBounds_

treeBoundBoxList allBackgroundMeshBounds_
private

The bounds of all background meshes on all processors.

Definition at line 123 of file backgroundMeshDecomposition.H.

◆ globalBackgroundBounds_

treeBoundBox globalBackgroundBounds_
private

The overall bounds of all of the background meshes, used to test if.

a point that is not found on any processor is in the domain at all

Definition at line 127 of file backgroundMeshDecomposition.H.

◆ mergeDist_

scalar mergeDist_
private

merge distance required by fvMeshDistribute

Definition at line 130 of file backgroundMeshDecomposition.H.

◆ spanScale_

scalar spanScale_
private

Scale of a cell span vs cell size used to decide to refine a cell.

Definition at line 133 of file backgroundMeshDecomposition.H.

◆ minCellSizeLimit_

scalar minCellSizeLimit_
private

Smallest minimum cell size allowed, i.e. to avoid high initial.

refinement of areas of small size

Definition at line 137 of file backgroundMeshDecomposition.H.

◆ minLevels_

label minLevels_
private

Minimum normal level of refinement.

Definition at line 140 of file backgroundMeshDecomposition.H.

◆ volRes_

label volRes_
private

How fine should the initial sample of the volume a box be to.

investigate the local cell size

Definition at line 144 of file backgroundMeshDecomposition.H.

◆ maxCellWeightCoeff_

scalar maxCellWeightCoeff_
private

Allowed factor above the average cell weight before a background.

cell needs to be split

Definition at line 148 of file backgroundMeshDecomposition.H.


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