49 int main(
int argc,
char *argv[])
58 const word dictName(
"viewFactorsDict");
63 bool writeAgglom =
readBool(agglomDict.lookup(
"writeFacesAgglomeration"));
82 label nCoarseFaces = 0;
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)
133 finalAgglom[patchid][i];
142 if (pp.
coupled() && !refCast<const coupledPolyPatch>(pp).owner())
146 finalAgglom[patchid][i] =
161 "facesAgglomeration",
172 facesAgglomeration.boundaryFieldRef();
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();
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Generic GeometricBoundaryField class.
Generic GeometricField class.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void size(const label)
Override size to be inconsistent with allocated storage.
virtual Ostream & write(const char)=0
Write character.
label size() const
Return the number of elements in the UList.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
const word & name() const
Return const reference to name.
const Time & time() const
Return the top-level database.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Primitive patch pair agglomerate method.
const word & name() const
Return name.
const fileName & facesInstance() const
Return the current instance directory for faces.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
label start() const
Return start label of this patch in the polyMesh face list.
label nInternalFaces() const
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
int main(int argc, char *argv[])
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
IOdictionary systemDict(const word &dictName, const argList &args, const objectRegistry &ob, const word ®ionName=polyMesh::defaultRegion, const fileName &path=fileName::null)
faceListList boundary(nPatches)
Foam::argList args(argc, argv)