Go to the documentation of this file.
56 const label start = boundaries[patchI].patchStart();
57 const label end = start + boundaries[patchI].patchSize();
59 for(
label faceI=start;faceI<end;++faceI)
61 const face&
f = faces[faceI];
69 FatalError <<
"Wrong label " <<
f[pI] <<
" in face "
90 forAll(procBoundaries, patchI)
92 const label start = procBoundaries[patchI].patchStart();
93 const label end = start + procBoundaries[patchI].patchSize();
99 for(
label faceI=start;faceI<end;++faceI)
101 const face&
f = faces[faceI];
114 bndVertsToSend[i] = dts[i];
120 procBoundaries[patchI].neiProcNo(),
121 bndVertsToSend.byteSize()
123 toOtherProc << bndVertsToSend;
128 forAll(procBoundaries, patchI)
134 procBoundaries[patchI].neiProcNo()
136 fromOtherProc >> receivedBndNodes;
137 const label start = procBoundaries[patchI].patchStart();
140 while( entryI < receivedBndNodes.size() )
142 const label fI = receivedBndNodes[entryI++];
143 const label pI = receivedBndNodes[entryI++];
145 const face&
f = faces[start+fI];
169 forAll(boundaries, patchI)
171 const label start = boundaries[patchI].patchStart();
172 const label end = start + boundaries[patchI].patchSize();
174 for(
label faceI=start;faceI<end;++faceI)
181 Info <<
"Morphing internal faces" <<
endl;
187 if( zipCellsBefore.
size() )
190 Serr <<
"Cells " << zipCellsBefore <<
" are not zipped!!" <<
endl;
209 forAll(boundaries, patchI)
211 const label start = boundaries[patchI].patchStart();
212 const label end = start + boundaries[patchI].patchSize();
214 for(
label faceI=start;faceI<end;++faceI)
223 for(
label faceI=0;faceI<nIntFaces;++faceI)
226 Info <<
"Morphing internal face " << faceI <<
endl;
229 const face&
f = faces[faceI];
243 removeFaceVertex[pI] =
true;
246 Info <<
"Removing vertex " <<
f[pI] <<
" from face "
263 Info <<
"Removing edges " << removeEdge <<
endl;
264 Info <<
"Face label " << faceI <<
" owner " << owner[faceI]
265 <<
" neighbour " << neighbour[faceI] <<
endl;
266 Info <<
"Internal face " <<
f <<
" has been shrinked into "
275 if( !nodeMaterial[nI] && removeFaceVertex[nI] )
286 const label fLabel = front[pI];
287 if( nodeMaterial[fLabel] )
289 nodeMaterial[fLabel] = mat;
293 f.faceEdge(
f.rcIndex(fLabel))
296 if( removeFaceVertex[
f.rcIndex(fLabel)] )
297 newFront.
append(
f.rcIndex(fLabel));
298 if( removeFaceVertex[
f.fcIndex(fLabel)] )
299 newFront.
append(
f.fcIndex(fLabel));
303 while( front.
size() != 0 );
315 Info <<
"Adding face " << newBf <<
" as boundary faces" <<
endl;
316 Info <<
"Owner and neighbour are " << owner[faceI] <<
" and "
317 << neighbour[faceI] <<
endl;
329 const_cast<face&
>(faces[faceI]) = newF;
339 forAll(procBoundaries, patchI)
341 const label start = procBoundaries[patchI].patchStart();
342 const label end = start + procBoundaries[patchI].patchSize();
343 const bool isOwner = procBoundaries[patchI].owner();
345 for(
label faceI=start;faceI<end;++faceI)
354 copy = faces[faceI].reverseFace();
357 const face&
f = copy;
371 removeFaceVertex[pI] =
true;
374 Info <<
"Removing vertex " <<
f[pI] <<
" from face "
391 Info <<
"Removing edges " << removeEdge <<
endl;
392 Info <<
"Face label " << faceI <<
" owner " << owner[faceI]
393 <<
" neighbour " << neighbour[faceI] <<
endl;
394 Info <<
"Internal face " <<
f <<
" has been shrinked into "
403 if( !nodeMaterial[nI] && removeFaceVertex[nI] )
414 const label fLabel = front[pI];
415 if( nodeMaterial[fLabel] )
continue;
416 nodeMaterial[fLabel] = mat;
423 f.faceEdge(
f.rcIndex(fLabel))
426 if( removeFaceVertex[
f.rcIndex(fLabel)] )
427 newFront.
append(
f.rcIndex(fLabel));
428 if( removeFaceVertex[
f.fcIndex(fLabel)] )
429 newFront.
append(
f.fcIndex(fLabel));
433 while( front.
size() != 0 );
447 Info <<
"Adding face " << newBf
448 <<
" as boundary faces" <<
endl;
449 Info <<
"Owner and neighbour are "
450 << owner[faceI] <<
endl;
465 if( isOwner || (newF.
size() < 3) )
467 const_cast<face&
>(faces[faceI]) = newF;
502 const face&
f = faces[
c[fI]];
520 if( nAppearances[eI] != 2 )
522 Warning <<
"Cell " << cI <<
" is not closed" <<
endl;
525 Serr <<
"Face " <<
c[fI] <<
" is "
526 << faces[
c[fI]] <<
endl;
535 for(
label faceI=0;faceI<nIntFaces;++faceI)
536 if( faces[faceI].size() < 3 )
538 removeFace[faceI] =
true;
547 forAll(procBoundaries, patchI)
549 const label start = procBoundaries[patchI].patchStart();
550 const label end = start + procBoundaries[patchI].patchSize();
551 for(
label faceI=start;faceI<end;++faceI)
552 if( faces[faceI].size() < 3 )
554 removeFace[faceI] =
true;
570 if( zipCells.
size() )
574 Serr <<
"Cells " << zipCells <<
" are not zipped!!" <<
endl;
579 Info <<
"Finished morphing internal faces" <<
endl;
const labelList & neighbour() const
const labelList & owner() const
owner and neighbour cells for faces
List< direction > cellFlags_
true for cells which are at the boundary
face reverseFace() const
Return face with reverse direction.
const polyMeshGenAddressing & addressingData() const
addressing which may be needed
void append(const T &e)
Append an element at the end of the list.
polyMeshGen & mesh_
mesh modifier
void removeFaces(const boolList &removeFace)
remove faces
void findBoundaryCells()
find boundary cells
#define forAll(list, i)
Loop across all elements in list.
Output inter-processor communications stream.
void findBoundaryVertices()
find surface vertices
Template functions to aid in the implementation of demand driven data.
static bool & parRun()
Is this a parallel run?
Ostream & endl(Ostream &os)
Add newline and flush stream.
const pointFieldPMG & points() const
access to points
face createFaceFromRemovedPart(const face &fOrig, const face &fCut)
create a face from the removed part
label size() const
Size of the active part of the list.
void shrink()
Shrink the List<T> to the number of elements used.
const faceListPMG & faces() const
access to faces
label nInternalFaces() const
return number of internal faces
void setSize(const label)
Reset size of List.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Given list of faces to remove insert all the topology changes. Contains helper function to get consis...
VRWGraph newBoundaryFaces_
new boundary faces and owner cells
const cellListPMG & cells() const
access to cells
void clearAddressingData() const
clear addressing data
OSstream Serr(cerr, "Serr")
void appendIfNotIn(const T &e)
bool morphInternalFaces()
morph internal faces
void setSize(const label)
Reset 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...
face removeEdgesFromFace(const face &fOrig, const DynList< edge > &removeEdges)
remove edges from face
label size() const
return the number of used elements
label size() const
Return number of elements in table.
bool found(const Key &) const
Return true if hashedEntry is found in table.
errorManip< error > abort(error &err)
labelLongList newBoundaryPatches_
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
void setSize(const label)
Reset size of List.
label containsAtPosition(const T &e) const
label size() const
return the number of used elements
void appendList(const ListType &l)
Append a list as a row at the end of the graph.
const PtrList< boundaryPatch > & boundaries() const
ordinary boundaries
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
labelLongList newBoundaryOwners_
bool insert(const Key &key)
Insert a new entry.
const PtrList< processorBoundaryPatch > & procBoundaries() const
inter-processor boundaries
boolList boundaryVertex_
true for vertices which are at the boundary
const dimensionedScalar c
Speed of light in a vacuum.
Input inter-processor communications stream.
A face is a list of labels corresponding to mesh vertices.
void size(const label)
Override size to be inconsistent with allocated storage.
A cell is defined as a list of faces with extra functionality.
label size() const
return the number of used elements
void replaceMeshBoundary()
replace the boundary of the mesh with the newly created one
void append(const T &e)
Append an element at the end of the list.
dimensionedScalar pos(const dimensionedScalar &ds)