Go to the documentation of this file.
40 int main(
int argc,
char *argv[])
42 argList::addBoolOption
45 "write obj files of agglomeration"
47 argList::addBoolOption
50 "normalise agglomeration (0..1)"
93 fld[cellI] = cellToCoarse[cellI];
97 scalarAgglomeration.write();
99 Info<<
"Writing initial cell distribution to "
100 << runTime.timeName() <<
endl;
104 for (
label level = 0; level < agglom.
size(); level++)
108 Info<<
"Time = " << runTime.timeName() <<
nl <<
endl;
115 <<
" current size : "
117 <<
" agglomerated size : "
121 label newCoarseSize = 0;
122 bool ok = GAMGAgglomeration::checkRestriction
134 <<
"At level " << level
135 <<
" there are " << coarseSize
136 <<
" agglomerated cells but " << newCoarseSize
137 <<
" disconnected regions" <<
endl
138 <<
" This means that some agglomerations (coarse cells)"
139 <<
" consist of multiple disconnected regions."
146 const labelList& cellLabels = coarseToCell[fineI];
149 cellToCoarse[cellLabels[i]] = addr[fineI];
172 fld[cellI] = cellToCoarse[cellI];
179 scalarAgglomeration.write();
184 OFstream str(runTime.path()/runTime.timeName()/
"aggomeration.obj");
195 forAll(coarseToCell, coarseI)
197 const labelList& cellLabels = coarseToCell[coarseI];
208 label cellI = cellLabels[i];
210 str <<
"l " << cellI+1 <<
' ' << vertI <<
nl;
vectorField pointField
pointField is a vectorField.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Geometric agglomerated algebraic multigrid agglomeration class.
#define forAll(list, i)
Loop across all elements in list.
void writeOBJ(Ostream &os, label &vertI, const tetPoints &tet)
labelListList invertOneToMany(const label len, const labelUList &)
Invert one-to-many map. Unmapped elements will be size 0.
const lduMesh & meshLevel(const label leveli) const
Return LDU mesh of given level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< GeometricField< Type, fvPatchField, volMesh > > average(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Area-weighted average a surfaceField creating a volField.
const labelField & restrictAddressing(const label leveli) const
Return cell restrict addressing of given level.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
Selector class for finite volume solution solution. fvMesh is derived from fvSolution so that all fie...
InternalField & internalField()
Return internal field.
int main(int argc, char *argv[])
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
A list of keyword definitions, which are a keyword followed by any number of values (e....
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Generic dimensioned Type class.
void writeObj(Ostream &os, const pointField &points)
void correctBoundaryConditions()
Correct boundary field.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const vectorField & cellCentres() const
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool optionFound(const word &opt) const
Return true if the named option is found.
void size(const label)
Override size to be inconsistent with allocated storage.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Generic GeometricField class.
Foam::argList args(argc, argv)
#define WarningInFunction
Report a warning using Foam::Warning.
virtual const lduAddressing & lduAddr() const =0
Return ldu addressing.