35 namespace decompositionConstraints
60 if (decompositionConstraint::debug)
62 Info<<
type() <<
" : setting constraints to preserve baffles" 74 if (decompositionConstraint::debug)
76 Info<<
type() <<
" : setting constraints to preserve baffles" 99 if (decompositionConstraint::debug & 2)
101 Info<<
type() <<
" : setting constraints to preserve " 103 <<
" baffles" <<
endl;
111 forAll(explicitConnections, i)
137 <<
"When adding baffle between faces " 141 <<
" : face " << p[0] <<
" already is connected to face " 142 << p0Slave <<
" at " << mesh.
faceCentres()[p0Slave]
143 <<
" and face " << p[1] <<
" already is connected to face " 144 << p1Slave <<
" at " << mesh.
faceCentres()[p1Slave]
154 if (otherFaceI != -1 && faceI < otherFaceI)
160 explicitConnections.
setSize(n);
165 if (otherFaceI != -1 && faceI < otherFaceI)
167 explicitConnections[n++] =
labelPair(faceI, otherFaceI);
174 forAll(explicitConnections, i)
176 blockedFace[explicitConnections[i].
first()] =
false;
177 blockedFace[explicitConnections[i].second()] =
false;
202 const labelPair& baffle = bafflePairs[i];
211 if (decomposition[nei0] != procI)
213 decomposition[nei0] = procI;
219 if (decomposition[own1] != procI)
221 decomposition[own1] = procI;
227 if (decomposition[nei1] != procI)
229 decomposition[nei1] = procI;
234 if (decompositionConstraint::debug & 2)
237 Info<<
type() <<
" : changed decomposition on " << nChanged
#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...
void size(const label)
Override size to be inconsistent with allocated storage.
static int compare(const Pair< Type > &a, const Pair< Type > &b)
Compare Pairs.
const Type & second() const
Return second.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
const Type & first() const
Return first.
A topoSetSource to select faces based on usage in another faceSet.
const vectorField & faceCentres() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
T & first()
Return the first element of the list.
Macros for easy insertion into run-time selection tables.
static labelPairList findDuplicateFacePairs(const polyMesh &)
Helper routine to find all baffles (two boundary faces.
addToRunTimeSelectionTable(decompositionConstraint, preserveBafflesConstraint, dictionary)
An ordered pair of two objects of type <T> with first() and second() elements.
A class for handling words, derived from string.
Pair< label > labelPair
Label pair.
dictionary coeffDict_
Model coefficients dictionary.
preserveBafflesConstraint()
Construct from components.
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.
virtual const labelList & faceNeighbour() const
Return face neighbour.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my constraints to list of constraints.
defineTypeName(preserveBafflesConstraint)