50 dict_(renumberDict.optionalSubDict(typeName+
"Coeffs")),
51 maxCo_(dict_.lookup<scalar>(
"maxCo")),
52 maxIter_(dict_.lookup<
label>(
"maxIter")),
53 freezeFraction_(dict_.lookup<scalar>(
"freezeFraction"))
98 for (
label iter = 0; iter < maxIter_; iter++)
112 forAll(cellCells, oldCelli)
114 const labelList& cCells = cellCells[oldCelli];
115 label celli = oldToNew[oldCelli];
119 label nbrCelli = oldToNew[cCells[i]];
135 Info<<
"Iter:" << iter
136 <<
" maxCo:" <<
maxCo
137 <<
" deltaT:" << deltaT
156 maxCo *= freezeFraction_;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
void size(const label)
Override size to be inconsistent with allocated storage.
List< Container > list() const
Convert to List<Container>
static direction size()
Return the number of elements in the VectorSpace = Ncmpts.
static void calcCellCells(const polyMesh &mesh, const labelList &agglom, const label nLocalCoarse, const bool global, CompactListList< label > &cellCells)
Helper: determine (local or global) cellCells from mesh.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Mesh consisting of general polyhedral cells.
Abstract base class for renumbering.
Use spring analogy - attract neighbouring cells according to the distance of their cell indices.
springRenumber(const dictionary &renumberDict)
Construct given the renumber dictionary.
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
point position(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label facei, const label faceTrii, const scalar stepFraction)
Return the position given the coordinates and tet topology.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
labelList invert(const label len, const labelUList &)
Invert one-to-one map. Unmapped elements will be -1.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
ListType renumber(const labelUList &oldToNew, const ListType &)
Renumber the values (not the indices) of a list.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
void inplaceReorder(const labelUList &oldToNew, ListType &)
Inplace reorder the elements of a list.