Go to the documentation of this file.
38 namespace decompositionConstraints
44 decompositionConstraint,
64 <<
" : setting constraints to preserve baffles"
78 <<
" : setting constraints to preserve baffles"
103 Info<<
type() <<
" : setting constraints to preserve "
105 <<
" baffles" <<
endl;
113 for (
const labelPair&
p : explicitConnections)
136 <<
"When adding baffle between faces "
137 <<
p[0] <<
" at " <<
mesh.faceCentres()[
p[0]]
139 <<
p[1] <<
" at " <<
mesh.faceCentres()[
p[1]]
140 <<
" : face " <<
p[0] <<
" already is connected to face "
141 << p0Slave <<
" at " <<
mesh.faceCentres()[p0Slave]
142 <<
" and face " <<
p[1] <<
" already is connected to face "
143 << p1Slave <<
" at " <<
mesh.faceCentres()[p1Slave]
153 if (otherFaceI != -1 && faceI < otherFaceI)
159 explicitConnections.setSize(
n);
164 if (otherFaceI != -1 && faceI < otherFaceI)
166 explicitConnections[
n++] =
labelPair(faceI, otherFaceI);
173 for (
const labelPair&
p : explicitConnections)
175 blockedFace[
p.first()] =
false;
176 blockedFace[
p.second()] =
false;
199 for (
const labelPair& baffle : bafflePairs)
201 const label f0 = baffle.first();
202 const label f1 = baffle.second();
204 const label procI = decomposition[
mesh.faceOwner()[f0]];
206 if (
mesh.isInternalFace(f0))
208 const label nei0 =
mesh.faceNeighbour()[f0];
209 if (decomposition[nei0] != procI)
211 decomposition[nei0] = procI;
216 const label own1 =
mesh.faceOwner()[f1];
217 if (decomposition[own1] != procI)
219 decomposition[own1] = procI;
222 if (
mesh.isInternalFace(f1))
224 const label nei1 =
mesh.faceNeighbour()[f1];
225 if (decomposition[nei1] != procI)
227 decomposition[nei1] = procI;
235 Info<<
type() <<
" : changed decomposition on " << nChanged
int debug
Static debugging option.
Abstract class for handling decomposition constraints.
defineTypeName(geometric)
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.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
preserveBaffles()
Construct from components.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
Pair< label > labelPair
A pair of labels.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
static int compare(const Pair< label > &a, const Pair< label > &b)
Compare Pairs.
A topoSetFaceSource to select faces based on usage in another faceSet.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void setSize(const label n)
Alias for resize()
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
addToRunTimeSelectionTable(decompositionConstraint, geometric, dictionary)
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my constraints to list of constraints.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
static labelPairList findDuplicateFacePairs(const polyMesh &)
Helper routine to find all baffles (two boundary faces.