34 namespace decompositionConstraints
58 zones_(coeffDict_.lookup(
"zones"))
60 if (decompositionConstraint::debug)
62 Info<<
type() <<
" : adding constraints to keep owner and neighbour"
63 <<
" of faces in zones " << zones_
64 <<
" on same processor" <<
endl;
78 if (decompositionConstraint::debug)
80 Info<<
type() <<
" : adding constraints to keep owner and neighbour"
81 <<
" of faces in zones " << zones_
82 <<
" on same processor" <<
endl;
104 label nUnblocked = 0;
108 const faceZone& fz = fZones[zoneIDs[i]];
112 if (blockedFace[fz[i]])
114 blockedFace[fz[i]] =
false;
120 if (decompositionConstraint::debug & 2)
123 Info<<
type() <<
" : unblocked " << nUnblocked <<
" faces" <<
endl;
160 destProc[bFaceI] = decomposition[faceCells[i]];
178 const faceZone& fz = fZones[zoneIDs[i]];
189 if (decomposition[own] != decomposition[nei])
191 decomposition[nei] = decomposition[own];
198 if (decomposition[own] != destProc[bFaceI])
200 decomposition[own] = destProc[bFaceI];
207 if (decompositionConstraint::debug & 2)
210 Info<<
type() <<
" : changed decomposition on " << nChanged
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
wordList toc() const
Return the table of contents.
void setSize(const label)
Reset size of List.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
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.
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my constraints to list of constraints.
preserveFaceZonesConstraint(const dictionary &constraintsDict, const word &type)
Construct with generic dictionary with optional entry for type.
A list of keyword definitions, which are a keyword followed by any number of values (e....
A subset of mesh faces organised as a primitive patch.
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
const faceZoneList & faceZones() const
Return face zones.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const labelList & faceNeighbour() const
Return face neighbour.
A patch is a list of labels that address the faces in the global face list.
label start() const
Return start label of this patch in the polyMesh face list.
const labelUList & faceCells() const
Return face-cell addressing.
label nInternalFaces() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
A class for handling words, derived from string.
defineTypeName(preserveBafflesConstraint)
addToRunTimeSelectionTable(decompositionConstraint, preserveBafflesConstraint, dictionary)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
static const label labelMax
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.