Go to the documentation of this file.
47 Info <<
"Starting creating layer cells" <<
endl;
77 if( treatPatches[boundaryFacePatches[bfI]] )
79 const face&
f = bFaces[bfI];
86 cellFaces[fI++] =
f.reverseFace();
92 cellFaces[fI++] = newF;
95 newBoundaryOwners.
append(cellsToAdd.
size() + nOldCells);
96 newBoundaryPatches.
append(boundaryFacePatches[bfI]);
103 newF[1] =
f.nextLabel(pI);
107 cellFaces[fI++] = newF;
111 const label edgeI = faceEdges(bfI, pI);
114 label neiFace = edgeFaces(edgeI, 0);
116 neiFace = edgeFaces(edgeI, 1);
118 if( !treatPatches[boundaryFacePatches[neiFace]] )
121 newBoundaryOwners.
append(cellsToAdd.
size() + nOldCells);
122 newBoundaryPatches.
append(boundaryFacePatches[neiFace]);
125 else if( edgeFaces.
sizeOfRow(edgeI) == 1 )
127 const Map<label>& otherProcPatch = *otherProcPatchPtr;
128 if( !treatPatches[otherProcPatch[edgeI]] )
131 newBoundaryOwners.
append(cellsToAdd.
size() + nOldCells);
132 newBoundaryPatches.
append(otherProcPatch[edgeI]);
142 Info <<
"Storing original boundary face "
143 << bfI <<
" into patch " << boundaryFacePatches[bfI] <<
endl;
147 newBoundaryOwners.
append(faceOwners[bfI]);
148 newBoundaryPatches.
append(boundaryFacePatches[bfI]);
166 forAll(boundaries, patchI)
167 boundaries[patchI].patchType() =
patchTypes_[patchI];
176 Info <<
"Finished creating layer cells" <<
endl;
202 forAll(mesh_.procBoundaries(), patchI)
205 otherProcToProcPatch.insert(wp.
neiProcNo(), patchI);
208 label nTreatedEdges(0);
213 iter!=globalToLocal.end();
217 const label beI = iter();
223 treatPatches[boundaryFacePatches[edgeFaces(beI, 0)]] &&
224 treatPatches[otherProcPatch[beI]]
228 treatEdge[beI] =
true;
233 labelList treatedEdgeLabels(nTreatedEdges);
238 treatedEdgeLabels[nTreatedEdges++] = globalEdgeLabel[beI];
240 treatedEdgeLabels.
setSize(nTreatedEdges);
242 sort(treatedEdgeLabels);
245 forAll(treatedEdgeLabels, eI)
247 const label beI = globalToLocal[treatedEdgeLabels[eI]];
249 if( !otherProcToProcPatch.found(otherFaceProc[beI]) )
251 otherProcToProcPatch.insert
266 forAll(treatedEdgeLabels, geI)
268 const label beI = globalToLocal[treatedEdgeLabels[geI]];
273 const label bfI = edgeFaces(beI, 0);
275 const edge e = bFaces[bfI].faceEdge(
pos);
281 if( patchKey_.size() != 0 )
284 findNewNodeLabel(
e.end(), patchKey_[otherProcPatch[beI]]);
286 findNewNodeLabel(
e.start(), patchKey_[otherProcPatch[beI]]);
290 newF[2] = newLabelForVertex_[
e.end()];
291 newF[3] = newLabelForVertex_[
e.start()];
297 if( patchKey_.size() != 0 )
303 patchKey_[boundaryFacePatches[bfI]]
309 patchKey_[boundaryFacePatches[bfI]]
314 newF[1] = newLabelForVertex_[
e.end()];
315 newF[2] = newLabelForVertex_[
e.start()];
321 faceProcPatch.
append(otherProcToProcPatch[otherFaceProc[beI]]);
const polyMeshGenAddressing & addressingData() const
addressing which may be needed
void append(const T &e)
Append an element at the end of the list.
wordList patchNames_
patch names
const meshSurfaceEngine & surfaceEngine() const
Return const reference to meshSurfaceEngine.
const Map< label > & globalToLocalBndEdgeAddressing() const
global boundary edge label to local label. Only for processor edges
const labelList & globalBoundaryEdgeLabel() const
global boundary edge label
label size() const
Returns the number of graphs.
#define forAll(list, i)
Loop across all elements in list.
polyMeshGen & mesh_
Reference to the mesh.
Template functions to aid in the implementation of demand driven data.
wordList patchTypes_
patch types
A List obtained as a section of another List.
void addProcessorFaces(const VRWGraph &procFaces, const labelLongList &facePatches)
add additional faces into processor patches
static bool & parRun()
Is this a parallel run?
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
const labelList & boundaryFacePatches() const
patch label for each boundary face
const VRWGraph & faceEdges() const
void replaceBoundary(const wordList &patchNames, const VRWGraph &boundaryFaces, const labelLongList &faceOwners, const labelLongList &facePatches)
replace the boundary with new boundary faces
labelLongList newLabelForVertex_
label of a new node (helper)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void appendGraph(const GraphType &l)
Append a graph at the end of the graphList.
PtrList< boundaryPatch > & boundariesAccess()
access to boundary data
const faceList::subList & boundaryFaces() const
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()
const cellListPMG & cells() const
access to cells
const Map< label > & otherEdgeFaceAtProc() const
label size() const
Returns the number of rows.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
label sizeOfRow(const label rowI) const
Returns the number of elements in the given row.
const VRWGraph & edgeFaces() const
const double e
Elementary charge.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
void clearOut()
delete meshSurfaceEngine
void setSize(const label)
Reset size of List.
label containsAtPosition(const label rowI, const label e) const
label neiProcNo() const
return the neighbour processor
void clear()
Clear the graph.
void appendList(const ListType &l)
Append a list as a row at the end of the graph.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void createNewFacesParallel(const boolList &treatPatches)
void addCells(const LongList< faceList > &cellFaces)
add cells (vertices must be added)
A face is a list of labels corresponding to mesh vertices.
void createNewFacesAndCells(const boolList &treatPatches)
create a layer of cells
const Map< label > & otherEdgeFacePatch() const
label size() const
return the number of used elements
const labelList & faceOwners() const
dimensionedScalar pos(const dimensionedScalar &ds)