50 int main(
int argc,
char *argv[])
63 bool writeAgglom =
readBool(agglomDict.lookup(
"writeFacesAgglomeration"));
82 label nCoarseFaces = 0;
86 labelList patchids = boundary.findIndices(iter().keyword());
89 label patchi = patchids[i];
97 agglomDict.subDict(pp.
name())
99 agglomObject.agglomerate();
101 agglomObject.restrictTopBottomAddressing();
103 if (finalAgglom[patchi].size())
105 nCoarseFaces +=
max(finalAgglom[patchi] + 1);
115 if (finalAgglom[patchid].size() == 0)
117 finalAgglom[patchid] =
identity(boundary[patchid].size());
129 finalAgglom[patchid] =
identity(pp.size());
133 finalAgglom[patchid][i];
142 if (pp.
coupled() && !refCast<const coupledPolyPatch>(pp).owner())
146 finalAgglom[patchid][i] =
161 "facesAgglomeration",
171 volScalarField::Boundary& facesAgglomerationBf =
174 label coarsePatchIndex = 0;
181 facesAgglomerationBf[patchid];
183 forAll(bFacesAgglomeration, j)
185 bFacesAgglomeration[j] =
189 finalAgglom[patchid][j] + coarsePatchIndex
193 coarsePatchIndex +=
max(finalAgglom[patchid]) + 1;
197 Info<<
"\nWriting facesAgglomeration" <<
endl;
198 facesAgglomeration.
write();
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
virtual Ostream & write(const char)=0
Write character.
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 dimensionSet dimless
const Time & time() const
Return the top-level database.
IOdictionary systemDict(const word &dictName, const argList &args, const objectRegistry &ob, const word ®ionName=polyMesh::defaultRegion)
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.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
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.
A patch is a list of labels that address the faces in the global face list.
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const word dictName("noiseDict")