49 int main(
int argc,
char *argv[])
57 const word dictName(
"viewFactorsDict");
62 bool writeAgglom =
readBool(agglomDict.lookup(
"writeFacesAgglomeration"));
81 label nCoarseFaces = 0;
96 agglomDict.subDict(pp.
name())
98 agglomObject.agglomerate();
100 agglomObject.restrictTopBottomAddressing();
102 if (finalAgglom[
patchi].size())
104 nCoarseFaces +=
max(finalAgglom[
patchi] + 1);
114 if (finalAgglom[patchid].size() == 0)
121 labelList nbrAgglom(mesh.nFaces() - mesh.nInternalFaces(), -1);
131 nbrAgglom[pp.
start() - mesh.nInternalFaces() + i] =
132 finalAgglom[patchid][i];
141 if (pp.
coupled() && !refCast<const coupledPolyPatch>(pp).owner())
145 finalAgglom[patchid][i] =
146 nbrAgglom[pp.
start() - mesh.nInternalFaces() + i];
160 "facesAgglomeration",
171 facesAgglomeration.boundaryFieldRef();
173 label coarsePatchIndex = 0;
180 facesAgglomerationBf[patchid];
182 forAll(bFacesAgglomeration, j)
184 bFacesAgglomeration[j] =
188 finalAgglom[patchid][j] + coarsePatchIndex
192 coarsePatchIndex +=
max(finalAgglom[patchid]) + 1;
196 Info<<
"\nWriting facesAgglomeration" <<
endl;
197 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 keyword definitions, which are a keyword followed by any number of values (e....
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.
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.
A class for handling words, derived from string.
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.
IOdictionary systemDict(const word &dictName, const argList &args, const objectRegistry &ob, const word ®ionName=polyMesh::defaultRegion)
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.
faceListList boundary(nPatches)
Foam::argList args(argc, argv)