Go to the documentation of this file.
34 namespace decompositionConstraints
39 decompositionConstraint,
57 zones_(coeffDict_.lookup(
"zones"))
59 if (decompositionConstraint::debug)
61 Info<<
type() <<
" : adding constraints to keep owner and neighbour"
62 <<
" of faces in zones " << zones_
63 <<
" on same processor" <<
endl;
77 if (decompositionConstraint::debug)
79 Info<<
type() <<
" : adding constraints to keep owner and neighbour"
80 <<
" of faces in zones " << zones_
81 <<
" on same processor" <<
endl;
103 label nUnblocked = 0;
107 const faceZone& fz = fZones[zoneIDs[i]];
111 if (blockedFace[fz[i]])
113 blockedFace[fz[i]] =
false;
119 if (decompositionConstraint::debug & 2)
122 Info<<
type() <<
" : unblocked " << nUnblocked <<
" faces" <<
endl;
159 destProc[bFaceI] = decomposition[faceCells[i]];
177 const faceZone& fz = fZones[zoneIDs[i]];
185 if (
mesh.isInternalFace(faceI))
188 if (decomposition[own] != decomposition[nei])
190 decomposition[nei] = decomposition[own];
196 label bFaceI = faceI-
mesh.nInternalFaces();
197 if (decomposition[own] != destProc[bFaceI])
199 decomposition[own] = destProc[bFaceI];
206 if (decompositionConstraint::debug & 2)
209 Info<<
type() <<
" : changed decomposition on " << nChanged
preserveFaceZonesConstraint(const dictionary &constraintsDict, const word &type)
Construct with generic dictionary with optional entry for type.
A class for handling words, derived from string.
addToRunTimeSelectionTable(decompositionConstraint, preserveBafflesConstraint, dictionary)
#define forAll(list, i)
Loop across all elements in list.
defineTypeName(preserveBafflesConstraint)
static const label labelMax
Ostream & endl(Ostream &os)
Add newline and flush stream.
Constraint to keep/move owner and neighbour of faceZone onto same processor.
virtual void apply(const polyMesh &mesh, const boolList &blockedFace, const PtrList< labelList > &specifiedProcessorFaces, const labelList &specifiedProcessor, const List< labelPair > &explicitConnections, labelList &decomposition) const
Apply any additional post-decomposition constraints.
Mesh consisting of general polyhedral cells.
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.
A subset of mesh faces organised as a primitive patch.
A patch is a list of labels that address the faces in the global face list.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
const labelUList & faceCells() const
Return face-cell addressing.
label start() const
Return start label of this patch in the polyMesh face list.
wordList names() const
Return a list of zone names.
void setSize(const label)
Reset size of List.
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my constraints to list of constraints.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.