50 dict_(renumberDict.optionalSubDict(typeName+
"Coeffs")),
51 maxCo_(dict_.
lookup<scalar>(
"maxCo")),
53 freezeFraction_(dict_.
lookup<scalar>(
"freezeFraction"))
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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
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...
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
List< Container > list() const
Convert to List<Container>
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.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
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< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.