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 VRWGraph & | pointTets () const |
const LongList< direction > & | smoothVertex () const |
const labelLongList & | nodeLabelInOrigMesh () const |
const VRWGraph & | internalPointOrdering () const |
const VRWGraph & | boundaryPointOrdering () const |
return vertex ordering for boundary points More... | |
const labelLongList & | globalPointLabel () const |
const VRWGraph & | pointAtProcs () const |
const Map< label > & | globalToLocalPointAddressing () const |
const DynList< label > & | neiProcs () const |
const labelLongList & | pointsAtProcessorBoundaries () const |
const labelLongList & | bufferLayerPoints () 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 | |
polyMeshGen & | origMesh_ |
reference to the original mesh More... | |
LongList< point > | points_ |
points in the tet mesh More... | |
LongList< partTet > | tets_ |
tetrahedra making the mesh More... | |
labelLongList | nodeLabelInOrigMesh_ |
label of node in the polyMeshGen More... | |
LongList< direction > | smoothVertex_ |
shall a node be used for smoothing or not More... | |
VRWGraph | pointTets_ |
addressing data More... | |
VRWGraph * | internalPointsOrderPtr_ |
internal point ordering for parallel runs More... | |
VRWGraph * | boundaryPointsOrderPtr_ |
boundary point ordering for parallel runs More... | |
labelLongList * | globalPointLabelPtr_ |
global point label More... | |
VRWGraph * | pAtProcsPtr_ |
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... | |
labelLongList * | pAtParallelBoundariesPtr_ |
labels of points at parallel boundaries More... | |
labelLongList * | pAtBufferLayersPtr_ |
labels of points serving as buffer layers on other processors More... | |
Definition at line 59 of file partTetMesh.H.
enum vertexTypes |
Enumerator | |
---|---|
NONE | |
SMOOTH | |
FACECENTRE | |
CELLCENTRE | |
PARALLELBOUNDARY | |
BOUNDARY | |
LOCKED |
Definition at line 158 of file partTetMesh.H.
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.
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().
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().
~partTetMesh | ( | ) |
Definition at line 330 of file partTetMesh.C.
References partTetMesh::boundaryPointsOrderPtr_, Foam::deleteDemandDrivenData(), partTetMesh::globalPointLabelPtr_, partTetMesh::globalToLocalPointAddressingPtr_, partTetMesh::internalPointsOrderPtr_, partTetMesh::neiProcsPtr_, partTetMesh::pAtBufferLayersPtr_, partTetMesh::pAtParallelBoundariesPtr_, and partTetMesh::pAtProcsPtr_.
|
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().
|
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().
|
private |
create buffer layers
create the map
go through the tets and add the ones having vertices at parallel boundaries for sending
append tet
insert the global labels of the buffer points into the globalToLocal map
Definition at line 318 of file partTetMeshParallelAddressing.C.
References LongList< T, Offset >::append(), DynList< T, staticSize >::append(), VRWGraph::append(), DynList< T, staticSize >::appendIfNotIn(), VRWGraph::appendIfNotIn(), VRWGraph::appendList(), LongList< T, Offset >::clear(), coordinates(), Foam::endl(), Foam::help::exchangeMap(), forAll, forAllConstIter(), forAllRow, partTetMesh::globalPointLabelPtr_, partTetMesh::globalToLocalPointAddressingPtr_, UPstream::myProcNo(), partTetMesh::neiProcs(), partTetMesh::neiProcsPtr_, partTetMesh::nodeLabelInOrigMesh_, partTetMesh::NONE, UPstream::nProcs(), partTetMesh::PARALLELBOUNDARY, partTetMesh::pAtBufferLayersPtr_, partTetMesh::pAtProcsPtr_, partTetMesh::points_, partTetMesh::pointTets_, Foam::Pout, Foam::returnReduce(), DynList< T, staticSize >::size(), VRWGraph::size(), VRWGraph::sizeOfRow(), partTetMesh::smoothVertex_, and partTetMesh::tets_.
|
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().
|
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().
access to points, tets and other data
Definition at line 174 of file partTetMesh.H.
References partTetMesh::points_.
Referenced by tetMeshOptimisation::optimiseUsingKnuppMetric(), tetMeshOptimisation::optimiseUsingMeshUntangler(), partTetMeshSimplex::partTetMeshSimplex(), meshOptimizer::untangleMeshFV(), and tetMeshOptimisation::updateBufferLayerPoints().
Definition at line 179 of file partTetMesh.H.
References partTetMesh::tets_.
Referenced by tetMeshOptimisation::optimiseUsingKnuppMetric(), tetMeshOptimisation::optimiseUsingMeshUntangler(), partTetMeshSimplex::partTetMeshSimplex(), and meshOptimizer::untangleMeshFV().
|
inline |
Definition at line 184 of file partTetMesh.H.
References partTetMesh::pointTets_.
Referenced by partTetMeshSimplex::partTetMeshSimplex(), and meshOptimizer::untangleMeshFV().
Definition at line 189 of file partTetMesh.H.
References partTetMesh::smoothVertex_.
Referenced by tetMeshOptimisation::optimiseUsingKnuppMetric(), tetMeshOptimisation::optimiseUsingMeshUntangler(), tetMeshOptimisation::optimiseUsingVolumeOptimizer(), tetMeshOptimisation::unifyNegativePoints(), and meshOptimizer::untangleMeshFV().
|
inline |
Definition at line 194 of file partTetMesh.H.
References partTetMesh::nodeLabelInOrigMesh_.
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().
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().
|
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().
|
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().
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().
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().
|
inline |
Definition at line 242 of file partTetMesh.H.
References Foam::abort(), Foam::FatalError, UPstream::parRun(), and partTetMesh::pAtParallelBoundariesPtr_.
Referenced by tetMeshOptimisation::unifyNegativePoints().
|
inline |
Definition at line 250 of file partTetMesh.H.
References Foam::abort(), Foam::FatalError, UPstream::parRun(), and partTetMesh::pAtBufferLayersPtr_.
Referenced by tetMeshOptimisation::updateBufferLayerPoints().
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().
void updateVerticesSMP | ( | const List< LongList< labelledPoint > > & | np | ) |
move vertices to their new positions intended for SMP parallelisation
Definition at line 454 of file partTetMesh.C.
References Foam::constant::universal::c, partTetMesh::CELLCENTRE, partTet::centroid(), labelledPoint::coordinates(), partTetMesh::FACECENTRE, forAll, forAllRow, partTet::mag(), Foam::mag(), labelledPoint::pointLabel(), partTetMesh::points_, partTetMesh::pointTets_, partTet::Sd(), partTetMesh::smoothVertex_, partTetMesh::tets_, and Vector< scalar >::zero.
Referenced by tetMeshOptimisation::optimiseUsingKnuppMetric(), tetMeshOptimisation::optimiseUsingMeshUntangler(), and tetMeshOptimisation::optimiseUsingVolumeOptimizer().
void updateOrigMesh | ( | boolList * | changedFacePtr = NULL | ) |
updates the vertices of the original polyMeshGen
make sure that neighbouring processors get the same information
update geometry information
Definition at line 535 of file partTetMesh.C.
References polyMeshGenCells::addressingData(), LongList< T, Offset >::append(), UPstream::blocking, LongList< T, Offset >::byteSize(), Foam::constant::universal::c, cells, polyMeshGenCells::cells(), forAll, forAllRow, partTetMesh::nodeLabelInOrigMesh_, partTetMesh::origMesh_, polyMeshGenAddressing::pointCells(), polyMeshGenPoints::points(), partTetMesh::points_, polyMeshGenFaces::procBoundaries(), and pointFieldPMG::size().
Referenced by meshOptimizer::optimizeLowQualityFaces(), meshOptimizer::optimizeMeshFVBestQuality(), meshOptimizer::optimizeMeshNearBoundaries(), and meshOptimizer::untangleMeshFV().
void createPolyMesh | ( | polyMeshGen & | pmg | ) | const |
creates polyMeshGen from this partTetMesh
face 0
face 1
face 2
face 3
store points into subsets
Definition at line 634 of file partTetMesh.C.
References polyMeshGenModifier::addCells(), polyMeshGenPoints::addPointSubset(), polyMeshGenPoints::addPointToSubset(), VRWGraphList::appendGraph(), partTetMesh::BOUNDARY, partTetMesh::boundaryPointOrdering(), partTetMesh::CELLCENTRE, partTetMesh::FACECENTRE, forAll, forAllRow, partTetMesh::internalPointOrdering(), Foam::name(), partTetMesh::points_, polyMeshGenModifier::pointsAccess(), polyMeshGenModifier::reorderBoundaryFaces(), Foam::help::scalarToText(), pointFieldPMG::setSize(), partTetMesh::SMOOTH, partTetMesh::smoothVertex_, and partTetMesh::tets_.
Referenced by meshOptimizer::untangleMeshFV().
|
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_.
|
private |
reference to the original mesh
Definition at line 63 of file partTetMesh.H.
Referenced by partTetMesh::updateOrigMesh().
points in the tet mesh
Definition at line 66 of file partTetMesh.H.
Referenced by partTetMesh::createBOUNDARYPointsOrdering(), partTetMesh::createBufferLayers(), partTetMesh::createPolyMesh(), partTetMesh::createSMOOTHPointsOrdering(), partTetMesh::points(), partTetMesh::updateOrigMesh(), partTetMesh::updateVertex(), and partTetMesh::updateVerticesSMP().
tetrahedra making the mesh
Definition at line 69 of file partTetMesh.H.
Referenced by partTetMesh::createBOUNDARYPointsOrdering(), partTetMesh::createBufferLayers(), partTetMesh::createPolyMesh(), partTetMesh::createSMOOTHPointsOrdering(), partTetMesh::tets(), partTetMesh::updateVertex(), and partTetMesh::updateVerticesSMP().
|
private |
label of node in the polyMeshGen
Definition at line 72 of file partTetMesh.H.
Referenced by partTetMesh::createBufferLayers(), partTetMesh::nodeLabelInOrigMesh(), and partTetMesh::updateOrigMesh().
shall a node be used for smoothing or not
Definition at line 75 of file partTetMesh.H.
Referenced by partTetMesh::createBOUNDARYPointsOrdering(), partTetMesh::createBufferLayers(), partTetMesh::createPolyMesh(), partTetMesh::createSMOOTHPointsOrdering(), partTetMesh::lockPoints(), partTetMesh::smoothVertex(), partTetMesh::updateVertex(), and partTetMesh::updateVerticesSMP().
|
private |
addressing data
Definition at line 78 of file partTetMesh.H.
Referenced by partTetMesh::createBOUNDARYPointsOrdering(), partTetMesh::createBufferLayers(), partTetMesh::createSMOOTHPointsOrdering(), partTetMesh::pointTets(), partTetMesh::updateVertex(), and partTetMesh::updateVerticesSMP().
|
mutableprivate |
internal point ordering for parallel runs
Definition at line 81 of file partTetMesh.H.
Referenced by partTetMesh::createSMOOTHPointsOrdering(), partTetMesh::internalPointOrdering(), and partTetMesh::~partTetMesh().
|
mutableprivate |
boundary point ordering for parallel runs
Definition at line 84 of file partTetMesh.H.
Referenced by partTetMesh::boundaryPointOrdering(), partTetMesh::createBOUNDARYPointsOrdering(), and partTetMesh::~partTetMesh().
|
mutableprivate |
global point label
Definition at line 88 of file partTetMesh.H.
Referenced by partTetMesh::createBufferLayers(), partTetMesh::globalPointLabel(), and partTetMesh::~partTetMesh().
|
mutableprivate |
processor for containing points
Definition at line 91 of file partTetMesh.H.
Referenced by partTetMesh::createBufferLayers(), partTetMesh::pointAtProcs(), and partTetMesh::~partTetMesh().
mapping between global and local point labels
Definition at line 94 of file partTetMesh.H.
Referenced by partTetMesh::createBufferLayers(), partTetMesh::globalToLocalPointAddressing(), and partTetMesh::~partTetMesh().
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().
|
mutableprivate |
labels of points at parallel boundaries
Definition at line 100 of file partTetMesh.H.
Referenced by partTetMesh::pointsAtProcessorBoundaries(), and partTetMesh::~partTetMesh().
|
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().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.