34 namespace decompositionConstraints
40 decompositionConstraint,
41 preserveFaceZonesConstraint,
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
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
A list of keyword definitions, which are a keyword followed by any number of values (e...
label nInternalFaces() const
virtual const labelList & faceNeighbour() const
Return face neighbour.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Macros for easy insertion into run-time selection tables.
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
wordList names() const
Return a list of zone names.
addToRunTimeSelectionTable(decompositionConstraint, preserveBafflesConstraint, dictionary)
const labelUList & faceCells() const
Return face-cell addressing.
A class for handling words, derived from string.
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my constraints to list of constraints.
virtual const labelList & faceOwner() const
Return face owner.
static const label labelMax
preserveFaceZonesConstraint(const dictionary &constraintsDict, const word &type)
Construct with generic dictionary with optional entry for type.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
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...
const meshFaceZones & faceZones() const
Return face zones.
label start() const
Return start label of this patch in the polyMesh face list.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
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.
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.
defineTypeName(preserveBafflesConstraint)