mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: decompositionMethod : move storage of dictionary to those classes that need it
This commit is contained in:
@ -53,7 +53,7 @@ protected:
|
|||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
const dictionary decompositionDict_;
|
const dictionary& decompositionDict_;
|
||||||
label nProcessors_;
|
label nProcessors_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -312,13 +312,12 @@ void Foam::multiLevelDecomp::decompose
|
|||||||
|
|
||||||
Foam::multiLevelDecomp::multiLevelDecomp(const dictionary& decompositionDict)
|
Foam::multiLevelDecomp::multiLevelDecomp(const dictionary& decompositionDict)
|
||||||
:
|
:
|
||||||
decompositionMethod(decompositionDict)
|
decompositionMethod(decompositionDict),
|
||||||
|
methodsDict_(decompositionDict_.subDict(typeName + "Coeffs"))
|
||||||
{
|
{
|
||||||
const dictionary& myDict = decompositionDict_.subDict(typeName + "Coeffs");
|
methods_.setSize(methodsDict_.size());
|
||||||
|
|
||||||
methods_.setSize(myDict.size());
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(dictionary, myDict, iter)
|
forAllConstIter(dictionary, methodsDict_, iter)
|
||||||
{
|
{
|
||||||
methods_.set(i++, decompositionMethod::New(iter().dict()));
|
methods_.set(i++, decompositionMethod::New(iter().dict()));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,6 +50,8 @@ class multiLevelDecomp
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
dictionary methodsDict_;
|
||||||
|
|
||||||
PtrList<decompositionMethod> methods_;
|
PtrList<decompositionMethod> methods_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,12 +49,12 @@ namespace Foam
|
|||||||
|
|
||||||
Foam::structuredDecomp::structuredDecomp(const dictionary& decompositionDict)
|
Foam::structuredDecomp::structuredDecomp(const dictionary& decompositionDict)
|
||||||
:
|
:
|
||||||
decompositionMethod(decompositionDict)
|
decompositionMethod(decompositionDict),
|
||||||
|
methodDict_(decompositionDict_.subDict(typeName + "Coeffs"))
|
||||||
{
|
{
|
||||||
dictionary myDict = decompositionDict_.subDict(typeName + "Coeffs");
|
methodDict_.set("numberOfSubdomains", nDomains());
|
||||||
myDict.set("numberOfSubdomains", nDomains());
|
method_ = decompositionMethod::New(methodDict_);
|
||||||
method_ = decompositionMethod::New(myDict);
|
patches_ = wordList(methodDict_.lookup("patches"));
|
||||||
patches_ = wordList(myDict.lookup("patches"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -50,6 +50,8 @@ class structuredDecomp
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
dictionary methodDict_;
|
||||||
|
|
||||||
autoPtr<decompositionMethod> method_;
|
autoPtr<decompositionMethod> method_;
|
||||||
|
|
||||||
wordList patches_;
|
wordList patches_;
|
||||||
@ -57,32 +59,6 @@ class structuredDecomp
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Given connectivity across processors work out connectivity
|
|
||||||
// for a (consistent) subset
|
|
||||||
void subsetGlobalCellCells
|
|
||||||
(
|
|
||||||
const label nDomains,
|
|
||||||
const label domainI,
|
|
||||||
const labelList& dist,
|
|
||||||
|
|
||||||
const labelListList& cellCells,
|
|
||||||
const labelList& set,
|
|
||||||
labelListList& subCellCells,
|
|
||||||
labelList& cutConnections
|
|
||||||
) const;
|
|
||||||
|
|
||||||
//- Decompose level methodI without addressing
|
|
||||||
void decompose
|
|
||||||
(
|
|
||||||
const labelListList& pointPoints,
|
|
||||||
const pointField& points,
|
|
||||||
const scalarField& pointWeights,
|
|
||||||
const labelList& pointMap, // map back to original points
|
|
||||||
const label levelI,
|
|
||||||
|
|
||||||
labelField& finalDecomp
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct and assignment
|
//- Disallow default bitwise copy construct and assignment
|
||||||
void operator=(const structuredDecomp&);
|
void operator=(const structuredDecomp&);
|
||||||
structuredDecomp(const structuredDecomp&);
|
structuredDecomp(const structuredDecomp&);
|
||||||
|
|||||||
Reference in New Issue
Block a user