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