34 namespace decompositionConstraints
40 decompositionConstraint,
41 preservePatchesConstraint,
58 patches_(coeffDict_.lookup(
"patches"))
60 if (decompositionConstraint::debug)
62 Info<<
type() <<
" : adding constraints to keep owner of faces" 63 <<
" in patches " << patches_
64 <<
" on same processor. This only makes sense for cyclics." <<
endl;
78 if (decompositionConstraint::debug)
80 Info<<
type() <<
" : adding constraints to keep owner of faces" 81 <<
" in patches " << patches_
82 <<
" on same processor. This only makes sense for cyclics." <<
endl;
104 label nUnblocked = 0;
112 if (blockedFace[pp.
start() + i])
114 blockedFace[pp.
start() + i] =
false;
120 if (decompositionConstraint::debug & 2)
123 Info<<
type() <<
" : unblocked " << nUnblocked <<
" faces" <<
endl;
159 destProc[bFaceI] = decomposition[faceCells[i]];
183 if (decomposition[faceCells[i]] != destProc[bFaceI])
185 decomposition[faceCells[i]] = destProc[bFaceI];
191 if (decompositionConstraint::debug & 2)
194 Info<<
type() <<
" : changed decomposition on " << nChanged
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
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 list of keyword definitions, which are a keyword followed by any number of values (e...
label nInternalFaces() const
Ostream & endl(Ostream &os)
Add newline and flush stream.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool usePatchGroups=true) const
Return the set of patch IDs corresponding to the given names.
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my constraints to list of constraints.
Macros for easy insertion into run-time selection tables.
addToRunTimeSelectionTable(decompositionConstraint, preserveBafflesConstraint, dictionary)
const labelUList & faceCells() const
Return face-cell addressing.
A class for handling words, derived from string.
static const label labelMax
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
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...
List< Key > sortedToc() const
Return the table of contents as a sorted list.
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.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
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.
preservePatchesConstraint(const dictionary &constraintsDict, const word &type)
Construct with generic dictionary with optional entry for type.
defineTypeName(preserveBafflesConstraint)