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

Public Types

enum  vertexTypes {
  NONE = 0, SMOOTH = 1, FACECENTRE = 2, CELLCENTRE = 4,
  PARALLELBOUNDARY = 8, BOUNDARY = 16, LOCKED = 32
}
 

Public Member Functions

 partTetMesh (polyMeshGen &mesh, const labelLongList &lockedPoints)
 construct from polyMeshGen and locked points More...
 
 partTetMesh (polyMeshGen &mesh, const labelLongList &lockedPoints, const direction nLayers=2)
 
 partTetMesh (polyMeshGen &mesh, const labelLongList &lockedPoints, labelHashSet &badFaces, const direction additionalLayers=0)
 
 ~partTetMesh ()
 
const LongList< point > & points () const
 access to points, tets and other data More...
 
const LongList< partTet > & tets () const
 
const VRWGraphpointTets () const
 
const LongList< direction > & smoothVertex () const
 
const labelLongListnodeLabelInOrigMesh () const
 
const VRWGraphinternalPointOrdering () const
 
const VRWGraphboundaryPointOrdering () const
 return vertex ordering for boundary points More...
 
const labelLongListglobalPointLabel () const
 
const VRWGraphpointAtProcs () const
 
const Map< label > & globalToLocalPointAddressing () const
 
const DynList< label > & neiProcs () const
 
const labelLongListpointsAtProcessorBoundaries () const
 
const labelLongListbufferLayerPoints () const
 
void updateVertex (const label pointI, const point &newP)
 move the vertex to a new position More...
 
void updateVerticesSMP (const List< LongList< labelledPoint > > &)
 
void updateOrigMesh (boolList *changedFacePtr=NULL)
 updates the vertices of the original polyMeshGen More...
 
void createPolyMesh (polyMeshGen &pmg) const
 creates polyMeshGen from this partTetMesh More...
 
template<class labelListType >
void lockPoints (const labelListType &l)
 add the LOCKED flag to mesh points which shall not move More...
 

Private Member Functions

void createPointsAndTets (const List< direction > &usedCells, const boolList &lockedPoints)
 create points and tets More...
 
void createParallelAddressing (const labelLongList &nodeLabelForPoint, const labelLongList &nodeLabelForFace, const labelLongList &nodeLabelForCell)
 create parallel addressing More...
 
void createBufferLayers ()
 create buffer layers More...
 
void createSMOOTHPointsOrdering () const
 create ordering of internal points for parallel execution More...
 
void createBOUNDARYPointsOrdering () const
 create order of boundary points for parallel execution More...
 

Private Attributes

polyMeshGenorigMesh_
 reference to the original mesh More...
 
LongList< pointpoints_
 points in the tet mesh More...
 
LongList< partTettets_
 tetrahedra making the mesh More...
 
labelLongList nodeLabelInOrigMesh_
 label of node in the polyMeshGen More...
 
LongList< directionsmoothVertex_
 shall a node be used for smoothing or not More...
 
VRWGraph pointTets_
 addressing data More...
 
VRWGraphinternalPointsOrderPtr_
 internal point ordering for parallel runs More...
 
VRWGraphboundaryPointsOrderPtr_
 boundary point ordering for parallel runs More...
 
labelLongListglobalPointLabelPtr_
 global point label More...
 
VRWGraphpAtProcsPtr_
 processor for containing points More...
 
Map< label > * globalToLocalPointAddressingPtr_
 mapping between global and local point labels More...
 
DynList< label > * neiProcsPtr_
 processors which should communicate with the current one More...
 
labelLongListpAtParallelBoundariesPtr_
 labels of points at parallel boundaries More...
 
labelLongListpAtBufferLayersPtr_
 labels of points serving as buffer layers on other processors More...
 

Detailed Description

Definition at line 59 of file partTetMesh.H.

Member Enumeration Documentation

◆ vertexTypes

Enumerator
NONE 
SMOOTH 
FACECENTRE 
CELLCENTRE 
PARALLELBOUNDARY 
BOUNDARY 
LOCKED 

Definition at line 158 of file partTetMesh.H.

Constructor & Destructor Documentation

◆ partTetMesh() [1/3]

partTetMesh ( polyMeshGen mesh,
const labelLongList lockedPoints 
)

construct from polyMeshGen and locked points

Definition at line 50 of file partTetMesh.C.

References partTetMesh::createPointsAndTets(), forAll, and mesh.

Here is the call graph for this function:

◆ partTetMesh() [2/3]

partTetMesh ( polyMeshGen mesh,
const labelLongList lockedPoints,
const direction  nLayers = 2 
)

construct from polyMeshGen, locked points and the number of layers from the boundary

select cells containing at least one vertex of the bad faces

add additional layer of cells

exchange data with other processors

Definition at line 77 of file partTetMesh.C.

References Foam::constant::universal::c, cells, primitiveMesh::cells(), Foam::help::exchangeMap(), f(), polyMesh::faces(), forAll, forAllConstIter(), forAllRow, mesh, UPstream::myProcNo(), fvMesh::owner(), UPstream::parRun(), primitiveMesh::pointCells(), polyMesh::points(), and List::size().

Here is the call graph for this function:

◆ partTetMesh() [3/3]

partTetMesh ( polyMeshGen mesh,
const labelLongList lockedPoints,
labelHashSet badFaces,
const direction  additionalLayers = 0 
)

construct from polyMeshGen, bad faces and the number of additional layers

select cells containing at least one vertex of the bad faces

add additional layer of cells

exchange data with other processors

Definition at line 204 of file partTetMesh.C.

References Foam::constant::universal::c, cells, primitiveMesh::cells(), Foam::help::exchangeMap(), f(), polyMesh::faces(), forAll, forAllConstIter(), forAllRow, HashTable::found(), mesh, UPstream::myProcNo(), UPstream::parRun(), primitiveMesh::pointCells(), polyMesh::points(), and List::size().

Here is the call graph for this function:

◆ ~partTetMesh()

Member Function Documentation

◆ createPointsAndTets()

void createPointsAndTets ( const List< direction > &  usedCells,
const boolList lockedPoints 
)
private

create points and tets

check how many neighbours of a face are marked for smoothing

mark faces

send data at processor boundaries

receive data at proc boundaries

create BOUNDARY points

create face centre

add face corners

create points at processor boundaries

create face centre

add face corners

create points for internal faces

create face centre

add face corners

create tets

add tet

create node labels in origMesh_

lock mesh vertices

create pointTets_

create addressing for parallel runs

Definition at line 45 of file partTetMeshAddressing.C.

References Foam::abort(), LongList< T, Offset >::append(), List::append(), UPstream::blocking, LongList< T, Offset >::byteSize(), Foam::constant::universal::c, cells, Foam::endl(), f(), Foam::FatalError, FatalErrorIn, forAll, Foam::Info, Foam::mag(), tetMatcher::matchShape(), UPstream::parRun(), boundaryPatchBase::patchSize(), boundaryPatchBase::patchStart(), points, faceListPMG::size(), List::size(), LongList< T, Offset >::size(), and cellMatcher::vertLabels().

Referenced by partTetMesh::partTetMesh().

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

◆ createParallelAddressing()

void createParallelAddressing ( const labelLongList nodeLabelForPoint,
const labelLongList nodeLabelForFace,
const labelLongList nodeLabelForCell 
)
private

create parallel addressing

vertices marked as SMOOTH and BOUNDARY are used by the smoother

allocate global point labels

allocated point-processors addressing

allocate global-to-local point addressing

allocate storage for points at parallel boundaries

create point-processors addressing

make sure that the same vertices are marked for smoothing on all procs this is performed by sending the labels of vertices which are not used for tet mesh creation and the tet mesh vertices which are not moved

exchange data with other processors

set the values according to other processors

start creating global-to-local addressing find the starting point labels

count the number of points at processor boundaries

create global labels for points at processor boundaries

the following information is sent to other processor 1. global point label in the original mesh 2. global point label in the tet mesh

exchange data with other processors

set global labels for remaining points

create global to local mapping

mark vertices at parallel boundaries

create neighbour processors addressing

Definition at line 47 of file partTetMeshParallelAddressing.C.

References Foam::abort(), LongList< T, Offset >::append(), DynList< T, staticSize >::append(), VRWGraph::append(), LongList< T, Offset >::clear(), Foam::endl(), Foam::help::exchangeMap(), Foam::FatalError, forAll, forAllConstIter(), forAllRow, Pstream::gatherList(), polyMeshGenAddressing::globalToLocalPointAddressing(), Foam::min(), UPstream::myProcNo(), UPstream::nProcs(), partTetMesh::PARALLELBOUNDARY, pMin(), polyMeshGenAddressing::pointAtProcs(), polyMeshGenAddressing::pointNeiProcs(), Foam::Pout, Foam::returnReduce(), Pstream::scatterList(), Foam::Serr, LongList< T, Offset >::setSize(), VRWGraph::setSize(), List::size(), LongList< T, Offset >::size(), VRWGraph::size(), and VRWGraph::sizeOfRow().

Here is the call graph for this function:

◆ createBufferLayers()

void createBufferLayers ( )
private

◆ createSMOOTHPointsOrdering()

void createSMOOTHPointsOrdering ( ) const
private

create ordering of internal points for parallel execution

find neighbouring FACECENTRE and CELLCENTRE points

find neighbouring SMOOTH points

select the point and mark neighbouring SMOOTH points

Definition at line 403 of file partTetMeshAddressing.C.

References LongList< T, Offset >::append(), DynList< T, staticSize >::appendIfNotIn(), VRWGraph::appendList(), partTetMesh::CELLCENTRE, partTetMesh::FACECENTRE, forAll, forAllRow, found, partTetMesh::internalPointsOrderPtr_, partTetMesh::points_, partTetMesh::pointTets_, VRWGraph::setSize(), LongList< T, Offset >::size(), VRWGraph::size(), partTetMesh::SMOOTH, partTetMesh::smoothVertex_, and partTetMesh::tets_.

Referenced by partTetMesh::internalPointOrdering().

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

◆ createBOUNDARYPointsOrdering()

void createBOUNDARYPointsOrdering ( ) const
private

create order of boundary points for parallel execution

find neighbouring FACECENTRE and CELLCENTRE points

find neighbouring BOUNDARY points

select the point and mark neighbouring BOUNDARY points

Definition at line 478 of file partTetMeshAddressing.C.

References LongList< T, Offset >::append(), DynList< T, staticSize >::appendIfNotIn(), VRWGraph::appendList(), partTetMesh::BOUNDARY, partTetMesh::boundaryPointsOrderPtr_, partTetMesh::CELLCENTRE, partTetMesh::FACECENTRE, forAll, forAllRow, found, partTetMesh::points_, partTetMesh::pointTets_, VRWGraph::setSize(), LongList< T, Offset >::size(), VRWGraph::size(), partTetMesh::smoothVertex_, and partTetMesh::tets_.

Referenced by partTetMesh::boundaryPointOrdering().

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

◆ points()

const LongList<point>& points ( ) const
inline

◆ tets()

const LongList<partTet>& tets ( ) const
inline

◆ pointTets()

const VRWGraph& pointTets ( ) const
inline

Definition at line 184 of file partTetMesh.H.

References partTetMesh::pointTets_.

Referenced by partTetMeshSimplex::partTetMeshSimplex(), and meshOptimizer::untangleMeshFV().

Here is the caller graph for this function:

◆ smoothVertex()

const LongList<direction>& smoothVertex ( ) const
inline

◆ nodeLabelInOrigMesh()

const labelLongList& nodeLabelInOrigMesh ( ) const
inline

Definition at line 194 of file partTetMesh.H.

References partTetMesh::nodeLabelInOrigMesh_.

◆ internalPointOrdering()

const VRWGraph & internalPointOrdering ( ) const

return vertex ordering which can be executed in parallel the points in each row can be treated in parallel make sure that points added to different rows of this graph are not treated concurrently

Definition at line 344 of file partTetMesh.C.

References partTetMesh::createSMOOTHPointsOrdering(), Foam::exit(), Foam::FatalError, FatalErrorIn, and partTetMesh::internalPointsOrderPtr_.

Referenced by partTetMesh::createPolyMesh().

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

◆ boundaryPointOrdering()

const VRWGraph & boundaryPointOrdering ( ) const

return vertex ordering for boundary points

Definition at line 363 of file partTetMesh.C.

References partTetMesh::boundaryPointsOrderPtr_, partTetMesh::createBOUNDARYPointsOrdering(), Foam::exit(), Foam::FatalError, and FatalErrorIn.

Referenced by partTetMesh::createPolyMesh().

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

◆ globalPointLabel()

const labelLongList& globalPointLabel ( ) const
inline

Definition at line 210 of file partTetMesh.H.

References Foam::abort(), Foam::FatalError, partTetMesh::globalPointLabelPtr_, and UPstream::parRun().

Referenced by tetMeshOptimisation::unifyNegativePoints(), and tetMeshOptimisation::updateBufferLayerPoints().

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

◆ pointAtProcs()

const VRWGraph& pointAtProcs ( ) const
inline

Definition at line 218 of file partTetMesh.H.

References Foam::abort(), Foam::FatalError, UPstream::parRun(), and partTetMesh::pAtProcsPtr_.

Referenced by tetMeshOptimisation::unifyNegativePoints(), and tetMeshOptimisation::updateBufferLayerPoints().

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

◆ globalToLocalPointAddressing()

const Map<label>& globalToLocalPointAddressing ( ) const
inline

Definition at line 226 of file partTetMesh.H.

References Foam::abort(), Foam::FatalError, partTetMesh::globalToLocalPointAddressingPtr_, and UPstream::parRun().

Referenced by tetMeshOptimisation::unifyNegativePoints(), and tetMeshOptimisation::updateBufferLayerPoints().

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

◆ neiProcs()

const DynList<label>& neiProcs ( ) const
inline

Definition at line 234 of file partTetMesh.H.

References Foam::abort(), Foam::FatalError, partTetMesh::neiProcsPtr_, and UPstream::parRun().

Referenced by partTetMesh::createBufferLayers(), tetMeshOptimisation::unifyNegativePoints(), and tetMeshOptimisation::updateBufferLayerPoints().

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

◆ pointsAtProcessorBoundaries()

const labelLongList& pointsAtProcessorBoundaries ( ) const
inline

Definition at line 242 of file partTetMesh.H.

References Foam::abort(), Foam::FatalError, UPstream::parRun(), and partTetMesh::pAtParallelBoundariesPtr_.

Referenced by tetMeshOptimisation::unifyNegativePoints().

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

◆ bufferLayerPoints()

const labelLongList& bufferLayerPoints ( ) const
inline

Definition at line 250 of file partTetMesh.H.

References Foam::abort(), Foam::FatalError, UPstream::parRun(), and partTetMesh::pAtBufferLayersPtr_.

Referenced by tetMeshOptimisation::updateBufferLayerPoints().

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

◆ updateVertex()

void updateVertex ( const label  pointI,
const point newP 
)

move the vertex to a new position

find face centres attached

update coordinates of FACECENTRE vertices

find cell centres attached

update coordinates of CELLCENTRE vertices

Definition at line 381 of file partTetMesh.C.

References DynList< T, staticSize >::appendIfNotIn(), Foam::constant::universal::c, partTetMesh::CELLCENTRE, partTet::centroid(), DynList< T, staticSize >::clear(), Foam::endl(), partTetMesh::FACECENTRE, forAll, forAllRow, partTet::mag(), Foam::mag(), partTetMesh::points_, partTetMesh::pointTets_, partTet::Sd(), partTetMesh::smoothVertex_, partTetMesh::tets_, Foam::Warning, and Vector< scalar >::zero.

Referenced by tetMeshOptimisation::updateBufferLayerPoints().

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

◆ updateVerticesSMP()

void updateVerticesSMP ( const List< LongList< labelledPoint > > &  np)

◆ updateOrigMesh()

void updateOrigMesh ( boolList changedFacePtr = NULL)

◆ createPolyMesh()

void createPolyMesh ( polyMeshGen pmg) const

◆ lockPoints()

void lockPoints ( const labelListType &  l)
inline

add the LOCKED flag to mesh points which shall not move

Definition at line 275 of file partTetMesh.H.

References forAll, partTetMesh::LOCKED, and partTetMesh::smoothVertex_.

Field Documentation

◆ origMesh_

polyMeshGen& origMesh_
private

reference to the original mesh

Definition at line 63 of file partTetMesh.H.

Referenced by partTetMesh::updateOrigMesh().

◆ points_

LongList<point> points_
private

◆ tets_

LongList<partTet> tets_
private

◆ nodeLabelInOrigMesh_

labelLongList nodeLabelInOrigMesh_
private

◆ smoothVertex_

LongList<direction> smoothVertex_
private

◆ pointTets_

VRWGraph pointTets_
private

◆ internalPointsOrderPtr_

VRWGraph* internalPointsOrderPtr_
mutableprivate

internal point ordering for parallel runs

Definition at line 81 of file partTetMesh.H.

Referenced by partTetMesh::createSMOOTHPointsOrdering(), partTetMesh::internalPointOrdering(), and partTetMesh::~partTetMesh().

◆ boundaryPointsOrderPtr_

VRWGraph* boundaryPointsOrderPtr_
mutableprivate

boundary point ordering for parallel runs

Definition at line 84 of file partTetMesh.H.

Referenced by partTetMesh::boundaryPointOrdering(), partTetMesh::createBOUNDARYPointsOrdering(), and partTetMesh::~partTetMesh().

◆ globalPointLabelPtr_

labelLongList* globalPointLabelPtr_
mutableprivate

global point label

Definition at line 88 of file partTetMesh.H.

Referenced by partTetMesh::createBufferLayers(), partTetMesh::globalPointLabel(), and partTetMesh::~partTetMesh().

◆ pAtProcsPtr_

VRWGraph* pAtProcsPtr_
mutableprivate

processor for containing points

Definition at line 91 of file partTetMesh.H.

Referenced by partTetMesh::createBufferLayers(), partTetMesh::pointAtProcs(), and partTetMesh::~partTetMesh().

◆ globalToLocalPointAddressingPtr_

Map<label>* globalToLocalPointAddressingPtr_
mutableprivate

mapping between global and local point labels

Definition at line 94 of file partTetMesh.H.

Referenced by partTetMesh::createBufferLayers(), partTetMesh::globalToLocalPointAddressing(), and partTetMesh::~partTetMesh().

◆ neiProcsPtr_

DynList<label>* neiProcsPtr_
mutableprivate

processors which should communicate with the current one

Definition at line 97 of file partTetMesh.H.

Referenced by partTetMesh::createBufferLayers(), partTetMesh::neiProcs(), and partTetMesh::~partTetMesh().

◆ pAtParallelBoundariesPtr_

labelLongList* pAtParallelBoundariesPtr_
mutableprivate

labels of points at parallel boundaries

Definition at line 100 of file partTetMesh.H.

Referenced by partTetMesh::pointsAtProcessorBoundaries(), and partTetMesh::~partTetMesh().

◆ pAtBufferLayersPtr_

labelLongList* pAtBufferLayersPtr_
mutableprivate

labels of points serving as buffer layers on other processors

Definition at line 103 of file partTetMesh.H.

Referenced by partTetMesh::bufferLayerPoints(), partTetMesh::createBufferLayers(), and partTetMesh::~partTetMesh().


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