38 #ifndef Foam_decompositionMethod_H 39 #define Foam_decompositionMethod_H 61 bool constraintCompat(
const word& modelType)
const;
64 void readConstraints();
111 const word& coeffsName,
112 int select = selectionType::DEFAULT
129 const word& coeffsName,
130 int select = selectionType::DEFAULT
227 virtual bool geometric()
const {
return false; }
255 const polyMesh&
mesh,
387 const label nLocalCoarse,
400 const label nLocalCoarse,
selectionType
Selection type when handling the coefficients dictionary.
declareRunTimeSelectionTable(autoPtr, decompositionMethod, dictionary,(const dictionary &decompDict, const word ®ionName),(decompDict, regionName))
virtual bool parallelAware() const =0
Is method parallel aware?
static void calcCellCells(const polyMesh &mesh, const labelList &agglom, const label nLocalCoarse, const bool parallel, CompactListList< label > &cellCells)
Determine (local or global) cellCells from mesh agglomeration.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
label nDomains_
Number of domains for the decomposition.
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
List< bool > select(const label n, const labelUList &locations)
Construct a selection list of bools (all false) with the given pre-size, subsequently add specified l...
void setConstraints(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Helper: extract constraints:
virtual bool geometric() const
True if the method is purely geometric, often using cell centre points.
PtrList< decompositionConstraint > constraints_
Optional constraints.
void applyConstraints(const polyMesh &mesh, const boolList &blockedFace, const PtrList< labelList > &specifiedProcessorFaces, const labelList &specifiedProcessor, const List< labelPair > &explicitConnections, labelList &finalDecomp) const
Helper: apply constraints to a decomposition.
vectorField pointField
pointField is a vectorField.
const dictionary & decompRegionDict_
Region-specific decomposition dictionary information.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
TypeName("decompositionMethod")
Runtime type information.
Abstract base class for domain decomposition.
#define FOAM_DEPRECATED_STRICT(since, replacement)
static 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.
void operator=(const decompositionMethod &)=delete
No copy assignment.
A packed storage of objects of type <T> using an offset table for access.
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.
virtual ~decompositionMethod()=default
Destructor.
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
static const Field< scalar > & null()
Return nullObject reference Field.
static const dictionary & optionalRegionDict(const dictionary &decompDict, const word ®ionName)
Return an optional region-specific dictionary from "regions" sub-dictionary, or dictionary::null on f...
const dictionary & decompDict_
Top-level decomposition dictionary (eg, decomposeParDict)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
No fallback to "coeffs" if main name not found.
virtual labelList decompose(const pointField &points, const scalarField &pointWeights=scalarField::null()) const
Return the wanted processor number for every coordinate, using uniform or specified point weights...