Go to the documentation of this file.
46 Info <<
"Adding processor faces" <<
endl;
52 ++nAddedFaces[facePatches[fI]];
55 newPatchStart[0] = procBoundaries[0].patchStart();
56 for(
label i=1;i<procBoundaries.
size();++i)
59 procBoundaries[i-1].patchSize() + nAddedFaces[i-1];
66 label endProcFaces(0);
76 if( endProcFaces != nFaces )
78 for(
label faceI=nFaces-1;faceI>=endProcFaces;--faceI)
80 newFaceLabel[faceI] = faceI+facePatches.
size();
81 faces[faceI+facePatches.size()].
transfer(faces[faceI]);
86 for(
label patchI=procBoundaries.
size()-1;patchI>=0;--patchI)
88 const label start = procBoundaries[patchI].patchStart();
89 const label end = start + procBoundaries[patchI].patchSize();
90 const label shift = newPatchStart[patchI] - start;
94 for(
label faceI=end-1;faceI>=start;--faceI)
96 faces[faceI+shift].
transfer(faces[faceI]);
97 newFaceLabel[faceI] = faceI+shift;
102 procBoundaries[patchI].patchStart() = newPatchStart[patchI];
104 newPatchStart[patchI] + procBoundaries[patchI].patchSize();
105 procBoundaries[patchI].patchSize() += nAddedFaces[patchI];
113 f[pI] = procFaces(fI, pI);
115 faces[faceIndex[facePatches[fI]]++].
transfer(
f);
121 # pragma omp parallel for schedule(guided)
128 if( newFaceLabel[
c[fI]] != -1 )
129 c[fI] = newFaceLabel[
c[fI]];
134 mesh_.updateFaceSubsets(newFaceLabel);
136 Info <<
"Finished adding processor faces" <<
endl;
146 procBoundaries.
setSize(nProcPatches + 1);
148 std::ostringstream ss;
150 std::ostringstream ssNei;
151 ssNei << otherProcLabel;
152 const word name(
"processor"+ss.str()+
"to"+ssNei.str());
176 label nValidPatches(0);
177 forAll(procBoundaries, patchI)
179 if( procBoundaries[patchI].patchSize() != 0 )
183 if( nValidPatches == procBoundaries.
size() )
189 forAll(procBoundaries, patchI)
191 if( procBoundaries[patchI].patchSize() != 0 )
193 newProcBoundaries.
set
201 procBoundaries.
transfer(newProcBoundaries);
A class for handling words, derived from string.
bool removeEmptyProcessorPatches()
remove empty processor patch
#define forAll(list, i)
Loop across all elements in list.
Template functions to aid in the implementation of demand driven data.
label addProcessorPatch(const label otherProcLabel)
add new processor patch and return its label
void addProcessorFaces(const VRWGraph &procFaces, const labelLongList &facePatches)
add additional faces into processor patches
Ostream & endl(Ostream &os)
Add newline and flush stream.
label size() const
Size of the active part of the list.
polyMeshGen & mesh_
reference to the mesh
bool set(const label) const
Is element set.
PtrList< processorBoundaryPatch > & procBoundariesAccess()
access to processor boundary data
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label size() const
Returns the number of rows.
void setSize(const label nElmts)
set the number of used elements
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
void transfer(PtrList< T > &)
Transfer the contents of the argument PtrList into this PtrList.
label sizeOfRow(const label rowI) const
Returns the number of elements in the given row.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
label size() const
return the number of used elements
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label size() const
Return the number of elements in the PtrList.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
const PtrList< processorBoundaryPatch > & procBoundaries() const
inter-processor boundaries
const dimensionedScalar c
Speed of light in a vacuum.
A face is a list of labels corresponding to mesh vertices.
A cell is defined as a list of faces with extra functionality.
word name(const complex &)
Return a string representation of a complex.
void transfer(faceList &)