49 int main(
int argc,
char *argv[])
64 bool writeAgglom =
readBool(agglomDict.lookup(
"writeFacesAgglomeration"));
83 label nCoarseFaces = 0;
87 labelList patchids = boundary.findIndices(iter().keyword());
90 label patchi = patchids[i];
98 agglomDict.subDict(pp.
name())
100 agglomObject.agglomerate();
102 agglomObject.restrictTopBottomAddressing();
104 if (finalAgglom[patchi].size())
106 nCoarseFaces +=
max(finalAgglom[patchi] + 1);
116 if (finalAgglom[patchid].size() == 0)
118 finalAgglom[patchid] =
identity(boundary[patchid].size());
130 finalAgglom[patchid] =
identity(pp.size());
134 finalAgglom[patchid][i];
143 if (pp.
coupled() && !refCast<const coupledPolyPatch>(pp).owner())
147 finalAgglom[patchid][i] =
162 "facesAgglomeration",
172 volScalarField::Boundary& facesAgglomerationBf =
175 label coarsePatchIndex = 0;
182 facesAgglomerationBf[patchid];
184 forAll(bFacesAgglomeration, j)
186 bFacesAgglomeration[j] =
190 finalAgglom[patchid][j] + coarsePatchIndex
194 coarsePatchIndex +=
max(finalAgglom[patchid]) + 1;
198 Info<<
"\nWriting facesAgglomeration" <<
endl;
199 facesAgglomeration.
write();
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.
const word & name() const
Return name.
const fileName & facesInstance() const
Return the current instance directory for faces.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
label nInternalFaces() const
Unit conversion functions.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const Time & time() const
Return the top-level database.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
A class for handling words, derived from string.
const word dictName("particleTrackDict")
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
IOobject dictIO(dictName, runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Primitive patch pair agglomerate method.
label start() const
Return start label of this patch in the polyMesh face list.
virtual Ostream & write(const token &)=0
Write next token to stream.
A patch is a list of labels that address the faces in the global face list.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...