56 methodDict_(renumberDict.optionalSubDict(typeName +
"Coeffs")),
57 patches_(methodDict_.lookup(
"patches")),
58 nLayers_(methodDict_.lookupOrDefault<
label>(
"nLayers",
labelMax)),
59 depthFirst_(methodDict_.lookup(
"depthFirst")),
61 reverse_(methodDict_.lookup(
"reverse"))
67 bool Foam::structuredRenumber::layerLess::operator()
130 return order_[a] < order_[
b];
146 <<
" should equal the number of cells " << mesh.
nCells()
156 nFaces += pbm[iter.key()].
size();
164 const labelUList& fc = pbm[iter.key()].faceCells();
174 const label nLayers = nTotalCells/nTotalSeeds;
176 Info<<
type() <<
" : seeding " << nTotalSeeds
177 <<
" cells on (estimated) " << nLayers <<
" layers" <<
nl
203 orderedToOld[subsetter.
cellMap()[i]] =
204 globalSubCells.
toGlobal(subOrigToOrdered[i]);
219 patchFaces[nFaces] = pp.
start()+i;
246 Info<<
type() <<
" : did not visit "
248 <<
" cells out of " << nTotalCells
249 <<
"; using " << method_().type() <<
" renumbering for these" <<
endl;
269 layerLess(depthFirst_, oldToOrdered, cellData)
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
label getUnsetCells() const
Get number of unvisited cells, i.e. cells that were not (yet)
virtual label iterate(const label maxIter)
Iterate until no changes or maxIter reached. Returns actual.
bool insert(const Key &key)
Insert a new entry.
label size() const
Return number of elements in table.
void size(const label)
Override size to be inconsistent with allocated storage.
Version of FaceCellWave that walks through prismatic cells only.
label size() const
Return the number of elements in the UPtrList.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Post-processing mesh subset tool. Given the original mesh and the list of selected cells,...
const labelList & cellMap() const
Return cell map.
void setLargeCellSubset(const labelList ®ion, const label currentRegion, const label patchID=-1, const bool syncCouples=true)
Set the subset from all cells with region == currentRegion.
const fvMesh & subMesh() const
Return reference to subset mesh.
Mesh data needed to do the Finite Volume discretisation.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label toGlobal(const label i) const
From local to global.
label nTotalCells() const
Return total number of cells in decomposed mesh.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool usePatchGroups=true) const
Return the set of patch indices corresponding to the given names.
Mesh consisting of general polyhedral cells.
const globalMeshData & globalData() const
Return parallel info.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
label start() const
Return start label of this patch in the polyMesh face list.
const labelUList & faceCells() const
Return face-cell addressing.
Abstract base class for renumbering.
Less function class that can be used for sorting according to.
Renumbering according to mesh layers. depthFirst = true: first column gets ids 0.....
structuredRenumber(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.
For use with FaceCellWave. Determines topological distance to starting faces.
bool valid(TrackingData &td) const
Check whether origin has been changed at all or.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
ListType renumber(const labelUList &oldToNew, const ListType &)
Renumber the values (not the indices) of a list.
void reverse(UList< T > &, const label n)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
defineTypeNameAndDebug(combustionModel, 0)
static const label labelMax
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.