59 zones_(coeffDict_.get<
wordRes>(
"zones"))
61 if (decompositionConstraint::debug)
63 Info<<
type() <<
" : adding constraints to keep owner and neighbour"
64 <<
" of faces in zones " << zones_
65 <<
" 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;
106 for (
const label zonei :
zoneIDs)
110 for (
const label meshFacei : fz)
112 if (blockedFace[meshFacei])
114 blockedFace[meshFacei] =
false;
120 if (decompositionConstraint::debug & 2)
151 getMinBoundaryValue(
mesh, decomposition, destProc);
162 for (
const label zonei :
zoneIDs)
166 for (
const label facei : fz)
168 const label own =
mesh.faceOwner()[facei];
170 if (
mesh.isInternalFace(facei))
172 const label nei =
mesh.faceNeighbour()[facei];
173 if (decomposition[nei] < decomposition[own])
175 decomposition[own] = decomposition[nei];
181 const label bFaceI = facei-
mesh.nInternalFaces();
182 if (destProc[bFaceI] < decomposition[own])
184 decomposition[own] = destProc[bFaceI];
191 if (decompositionConstraint::debug & 2)
193 Info<<
type() <<
" : changed decomposition on "
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(label n)
Alias for resize().
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
wordList names() const
A list of the zone names.
Abstract class for handling decomposition constraints.
dictionary coeffDict_
Constraint coefficients dictionary.
void getMinBoundaryValue(const polyMesh &mesh, const labelList &decomposition, labelList &destProc) const
Get minimum label across coupled boundary faces.
decompositionConstraint(const decompositionConstraint &)=delete
No copy construct.
Constraint to keep/move owner and neighbour of faceZone onto same processor.
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.
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my constraints to list of constraints.
preserveFaceZones(const dictionary &dict)
Construct with constraint dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A subset of mesh faces organised as a primitive patch.
Mesh consisting of general polyhedral cells.
A List of wordRe with additional matching capabilities.
#define defineTypeName(Type)
Define the typeName.
const labelIOList & zoneIDs
bool returnReduceOr(const bool value, const int communicator=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
ZoneMesh< faceZone, polyMesh > faceZoneMesh
A ZoneMesh with faceZone content on a polyMesh.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< bool > boolList
A List of bools.