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.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual const labelList & faceNeighbour() const
Return face neighbour.
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.
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.
A topoSetSource to select faces based on usage in another faceSet.
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.
Detects baffles and keeps owner and neighbour on same processor.
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.
virtual const labelList & faceOwner() const
Return face owner.
Pair< label > labelPair
Label pair.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
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)
const Type & second() const
Return second.
const vectorField & faceCentres() const
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...
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
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.
const Type & first() const
Return first.
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)