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

Public Types

enum  vertexTypes {
  NONE = 0, SMOOTH = 1, FACECENTRE = 2, PARALLELBOUNDARY = 8,
  BOUNDARY = 16, FEATUREEDGE = 32, CORNER = 64
}
 

Public Member Functions

 partTriMesh (const meshSurfacePartitioner &mPart)
 construct from meshSurfacePartitioner More...
 
 partTriMesh (const meshSurfacePartitioner &mPart, const labelHashSet &invertedPoints, const label additionalLayers=0)
 
 ~partTriMesh ()
 
const pointFieldpoints () const
 access to points, tets and other data More...
 
const LongList< labelledTri > & triangles () const
 
const VRWGraphpointTriangles () const
 
const LongList< direction > & pointType () const
 
const labelLongListpointLabelInMeshSurface () const
 
const labelListmeshSurfacePointLabelInTriMesh () const
 
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 updateVertices ()
 
void updateVertices (const labelLongList &)
 
const triSurfgetTriSurf () const
 return triSurf from this partTriMesh More...
 

Private Member Functions

void createPointsAndTrias (const List< direction > &)
 create surface triangulation More...
 
void createParallelAddressing (const labelList &nodeLabelForPoint, const labelList &nodeLabelForFace)
 create parallel addressing More...
 
void createBufferLayers ()
 create buffer layers More...
 
void updateBufferLayers ()
 update buffer layer points More...
 
void operator= (const partTriMesh &)
 disallow bitwise assignment More...
 
 partTriMesh (const partTriMesh &)
 disallow bitwise copy construct More...
 

Private Attributes

const meshSurfacePartitionermPart_
 const reference to the meshSurfacePartitioner More...
 
triSurf surf_
 surface triangulation created from More...
 
labelLongList pointLabelInMeshSurface_
 label of point in the mesh surface More...
 
labelList meshSurfacePointLabelInTriMesh_
 label of mesh surface point in the partTriMesh More...
 
LongList< directionpointType_
 shall a node be used for smoothing or not 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 partTriMesh.H.

Member Enumeration Documentation

◆ vertexTypes

Enumerator
NONE 
SMOOTH 
FACECENTRE 
PARALLELBOUNDARY 
BOUNDARY 
FEATUREEDGE 
CORNER 

Definition at line 137 of file partTriMesh.H.

Constructor & Destructor Documentation

◆ partTriMesh() [1/3]

partTriMesh ( const partTriMesh )
private

disallow bitwise copy construct

◆ partTriMesh() [2/3]

partTriMesh ( const meshSurfacePartitioner mPart)

construct from meshSurfacePartitioner

Definition at line 50 of file partTriMesh.C.

References meshSurfaceEngine::boundaryFaces(), partTriMesh::createPointsAndTrias(), UList::size(), and meshSurfacePartitioner::surfaceEngine().

Here is the call graph for this function:

◆ partTriMesh() [3/3]

partTriMesh ( const meshSurfacePartitioner mPart,
const labelHashSet invertedPoints,
const label  additionalLayers = 0 
)

construct from meshSurfacePartitioner, inverted points 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 71 of file partTriMesh.C.

References meshSurfaceEngine::boundaryFaces(), meshSurfaceEngine::boundaryPoints(), meshSurfaceEngine::bp(), meshSurfaceEngine::bpAtProcs(), Foam::help::exchangeMap(), forAll, forAllConstIter(), forAllRow, HashTable::found(), meshSurfaceEngine::globalBoundaryPointLabel(), meshSurfaceEngine::globalToLocalBndPointAddressing(), UPstream::myProcNo(), UPstream::parRun(), meshSurfaceEngine::pointFaces(), UList::size(), and meshSurfacePartitioner::surfaceEngine().

Here is the call graph for this function:

◆ ~partTriMesh()

Member Function Documentation

◆ createPointsAndTrias()

void createPointsAndTrias ( const List< direction > &  useFace)
private

create surface triangulation

create a point in the face centre

create points at face points

create triangles

add a triangle connected to face centre

add a triangle for shape

face is a triangle

add a triangle for shape

add points

set CORNER and FEATUREEDGE flags to surface points

create addressing for parallel runs

calculate point facets addressing

Definition at line 44 of file partTriMeshAddressing.C.

References meshSurfaceEngine::boundaryFaces(), meshSurfaceEngine::boundaryPoints(), meshSurfaceEngine::bp(), meshSurfaceEngine::faceCentres(), forAll, forAllConstIter(), face::nextLabel(), UPstream::parRun(), points, meshSurfaceEngine::points(), triSurfModifier::pointsAccess(), face::prevLabel(), List::size(), and UList::size().

Referenced by partTriMesh::partTriMesh().

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

◆ createParallelAddressing()

void createParallelAddressing ( const labelList nodeLabelForPoint,
const labelList nodeLabelForFace 
)
private

create parallel addressing

vertices marked as SMOOTH 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 48 of file partTriMeshParallelAddressing.C.

References LongList< T, Offset >::append(), DynList< T, staticSize >::append(), VRWGraph::append(), meshSurfaceEngine::bpAtProcs(), meshSurfaceEngine::bpNeiProcs(), LongList< T, Offset >::clear(), Foam::help::exchangeMap(), forAll, forAllConstIter(), forAllRow, Pstream::gatherList(), meshSurfaceEngine::globalToLocalBndPointAddressing(), Foam::min(), UPstream::myProcNo(), UPstream::nProcs(), pMin(), Pstream::scatterList(), LongList< T, Offset >::setSize(), VRWGraph::setSize(), LongList< T, Offset >::size(), and VRWGraph::sizeOfRow().

Here is the call graph for this function:

◆ createBufferLayers()

void createBufferLayers ( )
private

create buffer layers

create the map

loop over triangles and add the ones having vertices at parallel boundaries for sending

receive triangles sent to this processor

add triangles into the mesh and update the addressing

point already exists in the triangulation

point is already added into the triangulation

point does not exist in the triangulation and is not yet added in

append tet

store newly added points

insert the global labels of the buffer points into the globalToLocal map

update addressing of the surface mesh

Definition at line 259 of file partTriMeshParallelAddressing.C.

References LongList< T, Offset >::append(), DynList< T, staticSize >::append(), DynList< T, staticSize >::appendIfNotIn(), VRWGraph::appendIfNotIn(), VRWGraph::appendList(), triSurfFacets::appendTriangle(), LongList< T, Offset >::clear(), triSurfAddressing::clearAddressing(), Foam::help::exchangeMap(), forAll, forAllConstIter(), forAllRow, parTriFace::globalLabelOfPoint(), partTriMesh::globalPointLabel(), partTriMesh::globalPointLabelPtr_, partTriMesh::globalToLocalPointAddressingPtr_, UPstream::myProcNo(), partTriMesh::neiProcs(), partTriMesh::neiProcsPtr_, partTriMesh::NONE, nPoints, partTriMesh::PARALLELBOUNDARY, partTriMesh::pAtBufferLayersPtr_, partTriMesh::pAtProcsPtr_, partTriMesh::pointLabelInMeshSurface_, triSurfModifier::pointsAccess(), partTriMesh::pointType_, DynList< T, staticSize >::size(), VRWGraph::sizeOfRow(), partTriMesh::surf_, tp(), and parTriFace::trianglePoints().

Here is the call graph for this function:

◆ updateBufferLayers()

void updateBufferLayers ( )
private

◆ operator=()

void operator= ( const partTriMesh )
private

disallow bitwise assignment

◆ points()

const pointField& points ( ) const
inline

access to points, tets and other data

Definition at line 153 of file partTriMesh.H.

References triSurfPoints::points(), and partTriMesh::surf_.

Referenced by boundaryLayerOptimisation::calculateNormalVectorsSmother(), partTriMeshSimplex::partTriMeshSimplex(), partTriMesh::updateBufferLayers(), and partTriMesh::updateVertices().

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

◆ triangles()

const LongList<labelledTri>& triangles ( ) const
inline

Definition at line 158 of file partTriMesh.H.

References triSurfFacets::facets(), and partTriMesh::surf_.

Referenced by boundaryLayerOptimisation::calculateNormalVectorsSmother(), and partTriMeshSimplex::partTriMeshSimplex().

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

◆ pointTriangles()

const VRWGraph& pointTriangles ( ) const
inline

Definition at line 163 of file partTriMesh.H.

References triSurfAddressing::pointFacets(), and partTriMesh::surf_.

Referenced by boundaryLayerOptimisation::calculateNormalVectorsSmother(), and partTriMeshSimplex::partTriMeshSimplex().

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

◆ pointType()

const LongList<direction>& pointType ( ) const
inline

Definition at line 168 of file partTriMesh.H.

References partTriMesh::pointType_.

Referenced by partTriMeshSimplex::partTriMeshSimplex().

Here is the caller graph for this function:

◆ pointLabelInMeshSurface()

const labelLongList& pointLabelInMeshSurface ( ) const
inline

Definition at line 173 of file partTriMesh.H.

References partTriMesh::pointLabelInMeshSurface_.

Referenced by boundaryLayerOptimisation::calculateNormalVectorsSmother().

Here is the caller graph for this function:

◆ meshSurfacePointLabelInTriMesh()

const labelList& meshSurfacePointLabelInTriMesh ( ) const
inline

return indices of mesh sutrface points in the surface triangulation additional points which do not exist in mesh surface are labelled -1

Definition at line 180 of file partTriMesh.H.

References partTriMesh::meshSurfacePointLabelInTriMesh_.

Referenced by boundaryLayerOptimisation::calculateNormalVectorsSmother(), meshSurfaceOptimizer::calculateTrianglesAndAddressing(), and meshSurfaceOptimizer::transformIntoPlane().

Here is the caller graph for this function:

◆ globalPointLabel()

const labelLongList& globalPointLabel ( ) const
inline

Definition at line 186 of file partTriMesh.H.

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

Referenced by partTriMesh::createBufferLayers(), partTriMesh::updateBufferLayers(), partTriMesh::updateVertices(), and partTriMesh::updateVerticesSMP().

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 194 of file partTriMesh.H.

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

Referenced by partTriMesh::updateBufferLayers(), partTriMesh::updateVertices(), and partTriMesh::updateVerticesSMP().

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 202 of file partTriMesh.H.

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

Referenced by partTriMesh::updateBufferLayers(), partTriMesh::updateVertices(), and partTriMesh::updateVerticesSMP().

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 210 of file partTriMesh.H.

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

Referenced by partTriMesh::createBufferLayers(), partTriMesh::updateBufferLayers(), partTriMesh::updateVertices(), and partTriMesh::updateVerticesSMP().

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 218 of file partTriMesh.H.

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

Here is the call graph for this function:

◆ bufferLayerPoints()

const labelLongList& bufferLayerPoints ( ) const
inline

Definition at line 226 of file partTriMesh.H.

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

Referenced by partTriMesh::updateBufferLayers(), partTriMesh::updateVertices(), and partTriMesh::updateVerticesSMP().

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

Definition at line 196 of file partTriMesh.C.

References DynList< T, staticSize >::appendIfNotIn(), Foam::constant::universal::c, Foam::endl(), partTriMesh::FACECENTRE, forAll, forAllRow, triFace::mag(), triSurfAddressing::pointFacets(), triSurfModifier::pointsAccess(), partTriMesh::pointType_, partTriMesh::surf_, Foam::Warning, and Vector< scalar >::zero.

Referenced by partTriMesh::updateBufferLayers().

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

◆ updateVerticesSMP()

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

◆ updateVertices() [1/2]

void updateVertices ( )

update coordinates of points in partTriMesh to match the coordinates in the mesh surface

Definition at line 370 of file partTriMesh.C.

References meshSurfaceEngine::boundaryPoints(), forAll, partTriMesh::mPart_, List::size(), and meshSurfacePartitioner::surfaceEngine().

Referenced by meshSurfaceOptimizer::updateTriMesh().

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

◆ updateVertices() [2/2]

void updateVertices ( const labelLongList movedPoints)

◆ getTriSurf()

const triSurf& getTriSurf ( ) const
inline

return triSurf from this partTriMesh

Definition at line 252 of file partTriMesh.H.

References partTriMesh::surf_.

Field Documentation

◆ mPart_

const meshSurfacePartitioner& mPart_
private

const reference to the meshSurfacePartitioner

Definition at line 63 of file partTriMesh.H.

Referenced by partTriMesh::updateVertices().

◆ surf_

triSurf surf_
private

◆ pointLabelInMeshSurface_

labelLongList pointLabelInMeshSurface_
private

label of point in the mesh surface

Definition at line 69 of file partTriMesh.H.

Referenced by partTriMesh::createBufferLayers(), and partTriMesh::pointLabelInMeshSurface().

◆ meshSurfacePointLabelInTriMesh_

labelList meshSurfacePointLabelInTriMesh_
private

label of mesh surface point in the partTriMesh

Definition at line 72 of file partTriMesh.H.

Referenced by partTriMesh::meshSurfacePointLabelInTriMesh(), and partTriMesh::updateVertices().

◆ pointType_

LongList<direction> pointType_
private

◆ globalPointLabelPtr_

labelLongList* globalPointLabelPtr_
mutableprivate

global point label

Definition at line 79 of file partTriMesh.H.

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

◆ pAtProcsPtr_

VRWGraph* pAtProcsPtr_
mutableprivate

processor for containing points

Definition at line 82 of file partTriMesh.H.

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

◆ globalToLocalPointAddressingPtr_

Map<label>* globalToLocalPointAddressingPtr_
mutableprivate

mapping between global and local point labels

Definition at line 85 of file partTriMesh.H.

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

◆ neiProcsPtr_

DynList<label>* neiProcsPtr_
mutableprivate

processors which should communicate with the current one

Definition at line 88 of file partTriMesh.H.

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

◆ pAtParallelBoundariesPtr_

labelLongList* pAtParallelBoundariesPtr_
mutableprivate

labels of points at parallel boundaries

Definition at line 91 of file partTriMesh.H.

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

◆ pAtBufferLayersPtr_

labelLongList* pAtBufferLayersPtr_
mutableprivate

labels of points serving as buffer layers on other processors

Definition at line 94 of file partTriMesh.H.

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


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