58 methodDict_(findCoeffsDict(
typeName +
"Coeffs", selectionType::MANDATORY)),
59 patches_(methodDict_.get<
wordRes>(
"patches"))
61 methodDict_.set(
"numberOfSubdomains",
nDomains());
70 return method_().parallelAware();
87 nFaces +=
pbm[patchi].size();
94 patchCells.insert(
pbm[patchi].faceCells());
103 const fvMesh& subMesh = subsetter.subMesh();
108 subWeights =
scalarField(cWeights, subsetter.cellMap());
112 labelList subDecomp(method_().decompose(subMesh, subCc, subWeights));
119 finalDecomp[subsetter.cellMap()[i]] = subDecomp[i];
136 patchFaces[nFaces] =
pp.start()+i;
154 bool haveWarned =
false;
155 forAll(finalDecomp, celli)
157 if (!cellData[celli].valid(deltaCalc.data()))
162 <<
"Did not visit some cells, e.g. cell " << celli
164 <<
"Assigning these cells to domain 0." <<
endl;
167 finalDecomp[celli] = 0;
171 finalDecomp[celli] = cellData[celli].data();
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const polyBoundaryMesh & pbm
Wave propagation of information through grid. Every iteration information goes through one layer of c...
const TrackingData & data() const noexcept
Additional data to be passed into container.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
T * data() noexcept
Return pointer to the underlying array serving as data storage.
void size(const label n)
Older name for setAddressableSize.
Abstract base class for domain decomposition.
selectionType
Selection type when handling the coefficients dictionary.
@ MANDATORY
Fatal if dictionary could not be found.
decompositionMethod(const label numDomains)
Construct with specified number of domains, no coefficients or constraints.
static autoPtr< decompositionMethod > New(const dictionary &decompDict, const word ®ionName="")
Return a reference to the selected decomposition method, optionally region-specific.
static FOAM_NO_DANGLING_REFERENCE const dictionary & findCoeffsDict(const dictionary &dict, const word &coeffsName, int select=selectionType::DEFAULT)
Locate coeffsName dictionary or the fallback "coeffs" dictionary within an enclosing dictionary.
label nDomains() const noexcept
Number of domains.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Smooth ATC in cells next to a set of patches supplied by type.
Holds a reference to the original mesh (the baseMesh) and optionally to a subset of that mesh (the su...
const labelList & cellMap() const
Return cell map.
const fvMesh & subMesh() const
Return reference to subset mesh.
Mesh data needed to do the Finite Volume discretisation.
label nTotalCells() const noexcept
Total global number of mesh cells.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
Mesh consisting of general polyhedral cells.
const globalMeshData & globalData() const
Return parallel info (demand-driven).
A patch is a list of labels that address the faces in the global face list.
const vectorField & cellCentres() const
label nCells() const noexcept
Number of mesh cells.
label nFaces() const noexcept
Number of mesh faces.
Walk out decomposition of patch cells mesh - selectable as structured.
structuredDecomp(const structuredDecomp &)=delete
No copy construct.
virtual bool parallelAware() const
Is method parallel aware.
virtual labelList decompose(const polyMesh &mesh, const pointField &points, const scalarField &pointWeights=scalarField::null()) const
Return for every coordinate the wanted processor number.
For use with FaceCellWave. Determines topological distance to starting faces. Templated on passive tr...
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
#define WarningInFunction
Report a warning using Foam::Warning.
List< label > labelList
A List of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.