ENH: multiLevel decomposition method.

This commit is contained in:
mattijs
2010-06-04 15:31:19 +01:00
parent c9f9d384e5
commit dafbfb5c20
30 changed files with 1140 additions and 828 deletions

View File

@ -19,6 +19,7 @@ FoamFile
numberOfSubdomains 4;
//- Keep owner and neighbour on same processor for faces in zones:
// preserveFaceZones (heater solid1 solid3);
@ -28,15 +29,40 @@ numberOfSubdomains 4;
//preservePatches (cyclic_half0 cyclic_half1);
method scotch;
// method scotch;
// method hierarchical;
// method simple;
// method metis;
// method manual;
method multiLevel;
multiLevelCoeffs
{
level0
{
numberOfSubdomains 2;
method simple;
simpleCoeffs
{
n (2 1 1);
delta 0.001;
}
}
level1
{
numberOfSubdomains 2;
method scotch;
}
}
// Desired output
simpleCoeffs
{
n (2 2 1);
n (2 1 1);
delta 0.001;
}

View File

@ -109,13 +109,12 @@ void Foam::domainDecomposition::distributeCells()
autoPtr<decompositionMethod> decomposePtr = decompositionMethod::New
(
decompositionDict_,
*this
decompositionDict_
);
if (sameProcFaces.empty())
{
cellToProc_ = decomposePtr().decompose(cellCentres());
cellToProc_ = decomposePtr().decompose(*this, cellCentres());
}
else
{
@ -174,7 +173,12 @@ void Foam::domainDecomposition::distributeCells()
// Do decomposition on agglomeration
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cellToProc_ = decomposePtr().decompose(globalRegion, regionCentres);
cellToProc_ = decomposePtr().decompose
(
*this,
globalRegion,
regionCentres
);
}
Info<< "\nFinished decomposition in "