58 coeffsDict_(
dict.optionalSubDict(typeName +
"Coeffs")),
60 nLayers_(coeffsDict_.getOrDefault<label>(
"nLayers",
labelMax)),
61 depthFirst_(coeffsDict_.
get<bool>(
"depthFirst")),
62 reverse_(coeffsDict_.
get<bool>(
"reverse")),
69 bool Foam::structuredRenumber::layerLess::operator()
132 return order_[a] < order_[
b];
140 const polyMesh&
mesh,
147 <<
"Number of points " <<
points.size()
148 <<
" should equal the number of cells " <<
mesh.nCells()
152 const polyBoundaryMesh&
pbm =
mesh.boundaryMesh();
158 nFaces +=
pbm[patchi].size();
169 label nTotalSeeds =
returnReduce(patchCells.size(), sumOp<label>());
171 label nTotalCells =
mesh.globalData().nTotalCells();
172 const label nLayers = nTotalCells/nTotalSeeds;
174 Info<<
type() <<
" : seeding " << nTotalSeeds
175 <<
" cells on (estimated) " << nLayers <<
" layers" <<
nl 185 fvMeshSubset subsetter
187 dynamic_cast<const fvMesh&>(
mesh),
190 const fvMesh& subMesh = subsetter.subMesh();
199 globalIndex globalSubCells(subOrder.size());
204 orderedToOld[subsetter.cellMap()[i]] =
205 globalSubCells.toGlobal(subOrigToOrdered[i]);
212 List<topoDistanceData<label>> patchData(nFaces);
216 const polyPatch&
pp =
pbm[patchi];
220 patchFaces[nFaces] =
pp.start()+i;
221 patchData[nFaces] = topoDistanceData<label>
231 List<topoDistanceData<label>> cellData(
mesh.nCells());
232 List<topoDistanceData<label>> faceData(
mesh.nFaces());
235 OppositeFaceCellWave<topoDistanceData<label>> deltaCalc
247 Info<<
type() <<
" : did not visit " 248 << deltaCalc.nUnvisitedCells()
249 <<
" cells out of " << nTotalCells
250 <<
"; using " <<
method_().type() <<
" renumbering for these" <<
endl;
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
const polyBoundaryMesh & pbm
const labelList patchIDs(pbm.patchSet(polyPatchNames, false, true).sortedToc())
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Macros for easy insertion into run-time selection tables.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Abstract base class for renumbering.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
structuredRenumber(const structuredRenumber &)=delete
No copy construct.
const autoPtr< renumberMethod > method_
A List of wordRe with additional matching capabilities.
void reverse(UList< T > &list, const label n)
Reverse the first n elements of the list.
bool valid(TrackingData &td) const
Changed or contains original (invalid) value.
defineTypeNameAndDebug(combustionModel, 0)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
labelList invert(const label len, const labelUList &map)
Create an inverse one-to-one mapping.
For use with FaceCellWave. Determines topological distance to starting faces. Templated on passive tr...
messageStream Info
Information stream (stdout output on master, null elsewhere)
List< label > labelList
A List of labels.
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited (ie. from ordered back to original cell label)...
const Type & data() const
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())