STYLE: GAMGAgglomeration: move starting mesh interface setting into base class

This commit is contained in:
mattijs
2013-05-03 09:27:26 +01:00
parent ec7ceed1e2
commit e0b972606b
5 changed files with 4 additions and 13 deletions

View File

@ -117,6 +117,7 @@ Foam::GAMGAgglomeration::GAMGAgglomeration
( (
readLabel(controlDict.lookup("nCellsInCoarsestLevel")) readLabel(controlDict.lookup("nCellsInCoarsestLevel"))
), ),
meshInterfaces_(mesh.interfaces()),
procAgglomeratorPtr_ procAgglomeratorPtr_
( (
( (

View File

@ -73,10 +73,10 @@ protected:
//- Number of cells in coarsest level //- Number of cells in coarsest level
const label nCellsInCoarsestLevel_; const label nCellsInCoarsestLevel_;
autoPtr<GAMGProcAgglomeration> procAgglomeratorPtr_;
//- Cached mesh interfaces //- Cached mesh interfaces
lduInterfacePtrsList meshInterfaces_; const lduInterfacePtrsList meshInterfaces_;
autoPtr<GAMGProcAgglomeration> procAgglomeratorPtr_;
//- The number of cells in each level //- The number of cells in each level
labelList nCells_; labelList nCells_;

View File

@ -52,9 +52,6 @@ Foam::dummyAgglomeration::dummyAgglomeration
GAMGAgglomeration(mesh, controlDict), GAMGAgglomeration(mesh, controlDict),
nLevels_(readLabel(controlDict.lookup("nLevels"))) nLevels_(readLabel(controlDict.lookup("nLevels")))
{ {
// Get the finest-level interfaces from the mesh
meshInterfaces_ = mesh.interfaces();
const label nCoarseCells = mesh.lduAddr().size(); const label nCoarseCells = mesh.lduAddr().size();
for for

View File

@ -204,9 +204,6 @@ void Foam::pairGAMGAgglomeration::agglomerate
const scalarField& faceWeights const scalarField& faceWeights
) )
{ {
// Get the finest-level interfaces from the mesh
meshInterfaces_ = mesh.interfaces();
// Start geometric agglomeration from the given faceWeights // Start geometric agglomeration from the given faceWeights
scalarField* faceWeightsPtr = const_cast<scalarField*>(&faceWeights); scalarField* faceWeightsPtr = const_cast<scalarField*>(&faceWeights);

View File

@ -57,10 +57,6 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration
label minSize(readLabel(controlDict.lookup("minSize"))); label minSize(readLabel(controlDict.lookup("minSize")));
label maxSize(readLabel(controlDict.lookup("maxSize"))); label maxSize(readLabel(controlDict.lookup("maxSize")));
// Get the finest-level interfaces from the mesh
meshInterfaces_(fvMesh_.boundary().interfaces());
// Start geometric agglomeration from the cell volumes and areas of the mesh // Start geometric agglomeration from the cell volumes and areas of the mesh
scalarField* VPtr = const_cast<scalarField*>(&fvMesh_.cellVolumes()); scalarField* VPtr = const_cast<scalarField*>(&fvMesh_.cellVolumes());
vectorField* SfPtr = const_cast<vectorField*>(&fvMesh_.faceAreas()); vectorField* SfPtr = const_cast<vectorField*>(&fvMesh_.faceAreas());