49 Foam::structuredRenumber::structuredRenumber
55 methodDict_(renumberDict.
subDict(typeName +
"Coeffs")),
56 patches_(methodDict_.lookup(
"patches")),
58 depthFirst_(methodDict_.lookup(
"depthFirst")),
60 reverse_(methodDict_.lookup(
"reverse"))
75 <<
"Number of points " << points.
size()
76 <<
" should equal the number of cells " << mesh.
nCells()
86 nFaces += pbm[iter.key()].
size();
94 const labelUList& fc = pbm[iter.key()].faceCells();
104 const label nLayers = nTotalCells/nTotalSeeds;
106 Info<<
type() <<
" : seeding " << nTotalSeeds
107 <<
" cells on " << nLayers <<
" layers" <<
nl 122 fvMeshSubset subsetter(dynamic_cast<const fvMesh&>(mesh));
136 orderedToOld[subsetter.
cellMap()[i]] = subOrigToOrdered[i];
151 patchFaces[nFaces] = pp.
start()+i;
182 bool haveWarned =
false;
183 forAll(orderedToOld, celli)
185 if (!cellData[celli].valid(deltaCalc.
data()))
190 <<
"Did not visit some cells, e.g. cell " << celli
192 <<
"Assigning these cells to domain 0." <<
endl;
195 orderedToOld[celli] = 0;
199 label layerI = cellData[celli].distance();
202 orderedToOld[nLayers*cellData[celli].data()+layerI] = celli;
206 orderedToOld[cellData[celli].data()+nLayers*layerI] = celli;
ListType renumber(const labelUList &oldToNew, const ListType &)
Renumber the values (not the indices) 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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Wave propagation of information through grid. Every iteration information goes through one layer of c...
static autoPtr< renumberMethod > New(const dictionary &renumberDict)
Return a reference to the selected renumbering method.
label size() const
Return number of elements in table.
bool insert(const Key &key)
Insert a new entry.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const fvMesh & subMesh() const
Return reference to subset mesh.
Macros for easy insertion into run-time selection tables.
Abstract base class for renumbering.
labelList invert(const label len, const labelUList &)
Invert one-to-one map. Unmapped elements will be -1.
label start() const
Return start label of this patch in the polyMesh face list.
const vectorField & cellCentres() const
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool usePatchGroups=true) const
Return the set of patch IDs corresponding to the given names.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const globalMeshData & globalData() const
Return parallel info.
void reverse(UList< T > &, const label n)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
Post-processing mesh subset tool. Given the original mesh and the list of selected cells...
const labelList & cellMap() const
Return cell map.
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
T * data()
Return a pointer to the first data element,.
static bool & parRun()
Is this a parallel run?
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
#define WarningInFunction
Report a warning using Foam::Warning.
const labelUList & faceCells() const
Return face-cell addressing.
Mesh data needed to do the Finite Volume discretisation.
For use with FaceCellWave. Determines topological distance to starting faces.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
label nTotalCells() const
Return total number of cells in decomposed mesh.
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.
label size() const
Return the number of elements in the UPtrList.