Go to the documentation of this file.
57 int main(
int argc,
char *argv[])
61 "Agglomerate boundary faces using the pairPatchAgglomeration"
62 " algorithm. Writes a map of fine to coarse grid."
79 const bool writeAgglom(agglomDict.get<
bool>(
"writeFacesAgglomeration"));
97 label nCoarseFaces = 0;
99 for (
const entry& dEntry : agglomDict)
103 for (
const label patchi : patchids)
109 Info <<
"\nAgglomerating patch : " << pp.
name() <<
endl;
115 agglomDict.subDict(pp.
name())
118 agglomObject.agglomerate();
120 finalAgglom[patchi] =
121 agglomObject.restrictTopBottomAddressing();
123 if (finalAgglom[patchi].size())
125 nCoarseFaces +=
max(finalAgglom[patchi] + 1);
135 if (finalAgglom[patchi].size() == 0)
149 finalAgglom[patchi] =
identity(pp.size());
153 nbrAgglom[agglomi] = finalAgglom[patchi][i];
162 if (pp.
coupled() && !refCast<const coupledPolyPatch>(pp).owner())
167 finalAgglom[patchi][i] = nbrAgglom[agglomi];
181 "facesAgglomeration",
192 facesAgglomeration.boundaryFieldRef();
194 label coarsePatchIndex = 0;
201 facesAgglomerationBf[patchi];
203 forAll(bFacesAgglomeration, j)
205 bFacesAgglomeration[j] =
209 finalAgglom[patchi][j] + coarsePatchIndex
213 coarsePatchIndex +=
max(finalAgglom[patchi]) + 1;
217 Info<<
"\nWriting facesAgglomeration" <<
endl;
218 facesAgglomeration.
write();
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
A keyword and a list of tokens is an 'entry'.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A class for handling words, derived from Foam::string.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
static constexpr const zero Zero
const word dictName("faMeshDefinition")
virtual bool coupled() const
static word timeName(const scalar t, const int precision=precision_)
static void addNote(const string ¬e)
Primitive patch pair agglomerate method.
const fileName & facesInstance() const
Unit conversion functions.
const polyBoundaryMesh & boundaryMesh() const
Ostream & endl(Ostream &os)
A patch is a list of labels that address the faces in the global face list.
label nBoundaryFaces() const noexcept
label max(const labelHashSet &set, label maxValue=labelMin)
Generic dimensioned Type class.
const List< face_type > & localFaces() const
virtual bool write(const token &tok)=0
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
const Field< point_type > & localPoints() const
static int myProcNo(const label communicator=worldComm)
label nInternalFaces() const noexcept
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
labelList identity(const label len, label start=0)
const Time & time() const
const word & name() const noexcept
Generic GeometricField class.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
const dimensionSet dimless