Go to the documentation of this file.
55 nodeLabelInOrigMesh_(),
58 internalPointsOrderPtr_(NULL),
59 boundaryPointsOrderPtr_(NULL),
60 globalPointLabelPtr_(NULL),
62 globalToLocalPointAddressingPtr_(NULL),
64 pAtParallelBoundariesPtr_(NULL),
65 pAtBufferLayersPtr_(NULL)
71 lockedPoint[lockedPoints[i]] =
true;
86 nodeLabelInOrigMesh_(),
89 internalPointsOrderPtr_(NULL),
90 boundaryPointsOrderPtr_(NULL),
91 globalPointLabelPtr_(NULL),
93 globalToLocalPointAddressingPtr_(NULL),
95 pAtParallelBoundariesPtr_(NULL),
96 pAtBufferLayersPtr_(NULL)
107 forAll(boundaries, patchI)
109 const label start = boundaries[patchI].patchStart();
110 const label size = boundaries[patchI].patchSize();
112 for(
label fI=0;fI<size;++fI)
114 useCell[owner[start+fI]] = 1;
119 for(
direction layerI=1;layerI<(nLayers+1);++layerI)
122 if( useCell[cI] == layerI )
128 const face&
f = faces[
c[fI]];
134 const label cLabel = pointCells(
f[pI], pcI);
135 if( !useCell[cLabel] )
136 useCell[cLabel] = layerI + 1;
145 mesh.addressingData().globalPointLabel();
146 const VRWGraph& pProcs =
mesh.addressingData().pointAtProcs();
148 mesh.addressingData().globalToLocalPointAddressing();
150 std::map<label, LongList<label> > eData;
153 const label pointI = iter();
157 const label neiProc = pProcs(pointI, procI);
161 if( eData.find(neiProc) == eData.end() )
170 if( useCell[pointCells(pointI, pcI)] == layerI )
172 eData[neiProc].append(globalPointLabel[pointI]);
184 const label pointI = globalToLocal[receivedData[i]];
188 const label cLabel = pointCells(pointI, pcI);
189 if( !useCell[cLabel] )
190 useCell[cLabel] = layerI + 1;
198 lockedPoint[lockedPoints[i]] =
true;
200 createPointsAndTets(useCell, lockedPoint);
214 nodeLabelInOrigMesh_(),
217 internalPointsOrderPtr_(NULL),
218 boundaryPointsOrderPtr_(NULL),
219 globalPointLabelPtr_(NULL),
221 globalToLocalPointAddressingPtr_(NULL),
223 pAtParallelBoundariesPtr_(NULL),
224 pAtBufferLayersPtr_(NULL)
234 if( badFaces.
found(faceI) )
236 const face&
f = faces[faceI];
241 useCell[pointCells(
f[pI], pcI)] = 1;
246 for(
direction layerI=1;layerI<(additionalLayers+1);++layerI)
249 if( useCell[cI] == layerI )
255 const face&
f = faces[
c[fI]];
261 const label cLabel = pointCells(
f[pI], pcI);
262 if( !useCell[cLabel] )
263 useCell[cLabel] = layerI + 1;
272 mesh.addressingData().globalPointLabel();
273 const VRWGraph& pProcs =
mesh.addressingData().pointAtProcs();
275 mesh.addressingData().globalToLocalPointAddressing();
277 std::map<label, LongList<label> > eData;
280 const label pointI = iter();
284 const label neiProc = pProcs(pointI, procI);
288 if( eData.find(neiProc) == eData.end() )
297 if( useCell[pointCells(pointI, pcI)] == layerI )
299 eData[neiProc].append(globalPointLabel[pointI]);
311 const label pointI = globalToLocal[receivedData[i]];
315 const label cLabel = pointCells(pointI, pcI);
316 if( !useCell[cLabel] )
317 useCell[cLabel] = layerI + 1;
325 lockedPoint[lockedPoints[i]] =
true;
327 createPointsAndTets(useCell, lockedPoint);
347 if( omp_in_parallel() )
351 "const VRWGraph& partTetMesh::internalPointOrdering() const"
352 ) <<
"Calculating addressing inside a parallel region."
366 if( omp_in_parallel() )
370 "const VRWGraph& partTetMesh::boundaryPointOrdering() const"
371 ) <<
"Calculating addressing inside a parallel region."
387 Warning <<
"Smoothing auxiliary vertex."
388 <<
" This has no effect on the original mesh" <<
endl;
404 const label centreI = helper[i];
407 scalar faceArea(0.0);
412 for(
label i=0;i<3;++i)
421 points_[centreI] = centre / faceArea;
436 const label centreI = helper[i];
450 points_[centreI] = centre / cellVol;
459 # pragma omp parallel num_threads(np.size())
489 # pragma omp flush(updateType)
492 # pragma omp for schedule(dynamic, 20)
510 points_[pI] = centre / cellVol;
515 scalar faceArea(0.0);
520 for(
label i=0;i<3;++i)
529 points_[pI] = centre / faceArea;
542 # pragma omp parallel for if( pts.size() > 1000 ) \
561 # pragma omp parallel for if( pointCells.size() > 100 ) \
562 schedule(dynamic, 20)
564 forAll(pointCells, pointI)
566 if( changedNode[pointI] )
570 const cell&
c =
cells[pointCells(pointI, pcI)];
582 const label start = pBnd[patchI].patchStart();
583 const label size = pBnd[patchI].patchSize();
586 for(
label faceI=0;faceI<size;++faceI)
588 if( chF[start+faceI] )
595 pBnd[patchI].neiProcNo(),
599 toOtherProc << sendData;
609 pBnd[patchI].neiProcNo()
612 fromOtherProc >> receivedData;
614 const label start = pBnd[patchI].patchStart();
616 chF[start+receivedData[i]] =
true;
623 ).updateGeometry(chF);
652 tetFaces[0][0] = tet[0];
653 tetFaces[0][1] = tet[2];
654 tetFaces[0][2] = tet[1];
657 tetFaces[1][0] = tet[0];
658 tetFaces[1][1] = tet[1];
659 tetFaces[1][2] = tet[3];
662 tetFaces[2][0] = tet[0];
663 tetFaces[2][1] = tet[3];
664 tetFaces[2][2] = tet[2];
667 tetFaces[3][0] = tet[1];
668 tetFaces[3][1] = tet[2];
669 tetFaces[3][2] = tet[3];
698 forAll(internalOrdering, i)
707 forAll(boundaryOrdering, i)
virtual const pointField & points() const
Return raw points.
DynList< label > * neiProcsPtr_
processors which should communicate with the current one
const polyMeshGenAddressing & addressingData() const
addressing which may be needed
void append(const T &e)
Append an element at the end of the list.
LongList< direction > smoothVertex_
shall a node be used for smoothing or not
const point & coordinates() const
return point coordinates
A class for handling words, derived from string.
void createPolyMesh(polyMeshGen &pmg) const
creates polyMeshGen from this partTetMesh
#define forAll(list, i)
Loop across all elements in list.
labelLongList * pAtParallelBoundariesPtr_
labels of points at parallel boundaries
VRWGraph * boundaryPointsOrderPtr_
boundary point ordering for parallel runs
Output inter-processor communications stream.
Template functions to aid in the implementation of demand driven data.
word scalarToText(const scalar s)
convert the scalar value into text
static bool & parRun()
Is this a parallel run?
const cellList & cells() const
Ostream & endl(Ostream &os)
Add newline and flush stream.
const pointFieldPMG & points() const
access to points
LongList< partTet > tets_
tetrahedra making the mesh
const VRWGraph & pointCells() const
labelLongList * globalPointLabelPtr_
global point label
dimensioned< scalar > mag(const dimensioned< Type > &)
partTetMesh(polyMeshGen &mesh, const labelLongList &lockedPoints)
construct from polyMeshGen and locked points
void appendGraph(const GraphType &l)
Append a graph at the end of the graphList.
vector Sd(const PointField &) const
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
point centroid(const PointField &) const
Return centroid of the tetrahedron.
void deleteDemandDrivenData(DataPtr &dataPtr)
VRWGraph * internalPointsOrderPtr_
internal point ordering for parallel runs
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void reorderBoundaryFaces()
VRWGraph * pAtProcsPtr_
processor for containing points
const cellListPMG & cells() const
access to cells
void updateOrigMesh(boolList *changedFacePtr=NULL)
updates the vertices of the original polyMeshGen
void appendIfNotIn(const T &e)
void createSMOOTHPointsOrdering() const
create ordering of internal points for parallel execution
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
#define forAllRow(graph, rowI, index)
label size() const
return the number of used elements
void createPointsAndTets(const List< direction > &usedCells, const boolList &lockedPoints)
create points and tets
void addPointToSubset(const label, const label)
pointFieldPMG & pointsAccess()
access to mesh points
void setSize(const label nElmts)
set the number of used elements
bool found(const Key &) const
Return true if hashedEntry is found in table.
labelLongList * pAtBufferLayersPtr_
labels of points serving as buffer layers on other processors
Map< label > * globalToLocalPointAddressingPtr_
mapping between global and local point labels
const labelUList & owner() const
Internal face owner.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
scalar mag(const PointField &) const
Return volume.
void createBOUNDARYPointsOrdering() const
create order of boundary points for parallel execution
virtual const faceList & faces() const
Return raw faces.
VRWGraph pointTets_
addressing data
label byteSize() const
Return the binary size in number of characters of the UList.
polyMeshGen & origMesh_
reference to the original mesh
A 1D vector of objects of type <T> with a fixed size <Size>.
labelLongList nodeLabelInOrigMesh_
label of node in the polyMeshGen
void exchangeMap(const std::map< label, ListType > &m, LongList< T > &data, const Pstream::commsTypes commsType)
const labelListList & pointCells() const
const VRWGraph & boundaryPointOrdering() const
return vertex ordering for boundary points
const PtrList< processorBoundaryPatch > & procBoundaries() const
inter-processor boundaries
void addCells(const LongList< faceList > &cellFaces)
add cells (vertices must be added)
const dimensionedScalar c
Speed of light in a vacuum.
const VRWGraph & internalPointOrdering() const
LongList< point > points_
points in the tet mesh
Input inter-processor communications stream.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A face is a list of labels corresponding to mesh vertices.
void updateVerticesSMP(const List< LongList< labelledPoint > > &)
void size(const label)
Override size to be inconsistent with allocated storage.
label addPointSubset(const word &)
point subsets
A cell is defined as a list of faces with extra functionality.
void clear()
Clear the list, i.e. set next free to zero.
word name(const complex &)
Return a string representation of a complex.
void updateVertex(const label pointI, const point &newP)
move the vertex to a new position
label pointLabel() const
return point label