50 dict_(renumberDict.optionalSubDict(typeName+
"Coeffs")),
51 maxCo_(dict_.
lookup<scalar>(
"maxCo")),
53 freezeFraction_(dict_.
lookup<scalar>(
"freezeFraction"))
75 return renumber(cellCells(), points);
91 position[celli] = celli;
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]];
121 sumForce[celli] += (position[nbrCelli]-position[celli]);
133 scalar deltaT = maxCo /
max(
mag(sumForce));
135 Info<<
"Iter:" << iter
136 <<
" maxCo:" << maxCo
137 <<
" deltaT:" << deltaT
151 position += displacement;
152 position -=
min(position);
153 position *= (position.size()-1)/
max(position);
156 maxCo *= freezeFraction_;
void shuffle(UList< T > &)
void inplaceReorder(const labelUList &oldToNew, ListType &)
Inplace reorder the elements of a list.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
Macros for easy insertion into run-time selection tables.
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.
Abstract base class for renumbering.
stressControl lookup("compactNormalStress") >> compactNormalStress
labelList invert(const label len, const labelUList &)
Invert one-to-one map. Unmapped elements will be -1.
springRenumber(const dictionary &renumberDict)
Construct given the renumber dictionary.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
A packed storage unstructured matrix of objects of type <T> using an offset table for access...
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.