diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C similarity index 99% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C rename to src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C index f8631b4b2..e8ed52513 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "GAMGAgglomeration.H" -#include "GAMGInterface.H" +#include "AMGInterface.H" #include "FieldFields.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -289,7 +289,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing coarseInterfaces.set ( inti, - GAMGInterface::New + AMGInterface::New ( meshLevels_[fineLevelIndex], fineInterfaces[inti], diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C similarity index 100% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C rename to src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H similarity index 100% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H rename to src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C similarity index 100% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C rename to src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/algebraicPairGAMGAgglomeration/algebraicPairGAMGAgglomeration.C b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/algebraicPairGAMGAgglomeration/algebraicPairGAMGAgglomeration.C similarity index 100% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/algebraicPairGAMGAgglomeration/algebraicPairGAMGAgglomeration.C rename to src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/algebraicPairGAMGAgglomeration/algebraicPairGAMGAgglomeration.C diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/algebraicPairGAMGAgglomeration/algebraicPairGAMGAgglomeration.H b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/algebraicPairGAMGAgglomeration/algebraicPairGAMGAgglomeration.H similarity index 100% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/algebraicPairGAMGAgglomeration/algebraicPairGAMGAgglomeration.H rename to src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/algebraicPairGAMGAgglomeration/algebraicPairGAMGAgglomeration.H diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C similarity index 100% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C rename to src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C similarity index 100% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C rename to src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.H b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.H similarity index 97% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.H rename to src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.H index 85690e112..37aa3dbb6 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.H @@ -45,7 +45,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class pairGAMGAgglomeration Declaration + Class pairGAMGAgglomeration Declaration \*---------------------------------------------------------------------------*/ class pairGAMGAgglomeration diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerationCombineLevels.C b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerationCombineLevels.C similarity index 95% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerationCombineLevels.C rename to src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerationCombineLevels.C index 09d58ca8e..ee0665ff6 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerationCombineLevels.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/AMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerationCombineLevels.C @@ -25,7 +25,7 @@ License #include "pairGAMGAgglomeration.H" #include "lduInterfacePtrsList.H" -#include "GAMGInterface.H" +#include "AMGInterface.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -82,10 +82,10 @@ void Foam::pairGAMGAgglomeration::combineLevels(const label curLevel) { if (prevInterLevel.set(inti)) { - refCast(const_cast + refCast(const_cast ( prevInterLevel[inti] - )).combine(refCast(curInterLevel[inti])); + )).combine(refCast(curInterLevel[inti])); delete curInterLevel(inti); } diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGSolver.C b/src/foam/matrices/lduMatrix/solvers/AMG/GAMGSolver.C similarity index 100% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGSolver.C rename to src/foam/matrices/lduMatrix/solvers/AMG/GAMGSolver.C diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H b/src/foam/matrices/lduMatrix/solvers/AMG/GAMGSolver.H similarity index 100% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H rename to src/foam/matrices/lduMatrix/solvers/AMG/GAMGSolver.H diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C b/src/foam/matrices/lduMatrix/solvers/AMG/GAMGSolverAgglomerateMatrix.C similarity index 92% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C rename to src/foam/matrices/lduMatrix/solvers/AMG/GAMGSolverAgglomerateMatrix.C index 00003920e..fde9b84ec 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/GAMGSolverAgglomerateMatrix.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "GAMGSolver.H" -#include "GAMGInterfaceField.H" +#include "AMGInterfaceField.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -74,7 +74,7 @@ void Foam::GAMGSolver::agglomerateMatrix(const label fineLevelIndex) new lduInterfaceFieldPtrsList(fineInterfaces.size()) ); - lduInterfaceFieldPtrsList& coarseInterfaces = + lduInterfaceFieldPtrsList& coarseInterfaceFields = interfaceLevels_[fineLevelIndex]; // Set coarse-level boundary coefficients @@ -100,16 +100,16 @@ void Foam::GAMGSolver::agglomerateMatrix(const label fineLevelIndex) { if (fineInterfaces.set(inti)) { - const GAMGInterface& coarseInterface = - refCast + const AMGInterface& coarseInterface = + refCast ( agglomeration_.interfaceLevel(fineLevelIndex + 1)[inti] ); - coarseInterfaces.set + coarseInterfaceFields.set ( inti, - GAMGInterfaceField::New + AMGInterfaceField::New ( coarseInterface, fineInterfaces[inti] @@ -119,13 +119,19 @@ void Foam::GAMGSolver::agglomerateMatrix(const label fineLevelIndex) coarseInterfaceBouCoeffs.set ( inti, - coarseInterface.agglomerateCoeffs(fineInterfaceBouCoeffs[inti]) + coarseInterface.agglomerateCoeffs + ( + fineInterfaceBouCoeffs[inti] + ) ); coarseInterfaceIntCoeffs.set ( inti, - coarseInterface.agglomerateCoeffs(fineInterfaceIntCoeffs[inti]) + coarseInterface.agglomerateCoeffs + ( + fineInterfaceIntCoeffs[inti] + ) ); } } diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGSolverScalingFactor.C b/src/foam/matrices/lduMatrix/solvers/AMG/GAMGSolverScalingFactor.C similarity index 100% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGSolverScalingFactor.C rename to src/foam/matrices/lduMatrix/solvers/AMG/GAMGSolverScalingFactor.C diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C b/src/foam/matrices/lduMatrix/solvers/AMG/GAMGSolverSolve.C similarity index 100% rename from src/foam/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C rename to src/foam/matrices/lduMatrix/solvers/AMG/GAMGSolverSolve.C diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceField.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/AMGInterfaceField/AMGInterfaceField.C similarity index 90% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceField.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/AMGInterfaceField/AMGInterfaceField.C index 7909e63c3..d2928924f 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceField.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/AMGInterfaceField/AMGInterfaceField.C @@ -23,15 +23,15 @@ License \*---------------------------------------------------------------------------*/ -#include "GAMGInterfaceField.H" +#include "AMGInterfaceField.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(GAMGInterfaceField, 0); - defineRunTimeSelectionTable(GAMGInterfaceField, lduInterface); + defineTypeNameAndDebug(AMGInterfaceField, 0); + defineRunTimeSelectionTable(AMGInterfaceField, lduInterface); } // ************************************************************************* // diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceField.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/AMGInterfaceField/AMGInterfaceField.H similarity index 75% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceField.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/AMGInterfaceField/AMGInterfaceField.H index 583966fad..0cac18f9a 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceField.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/AMGInterfaceField/AMGInterfaceField.H @@ -22,22 +22,22 @@ License along with foam-extend. If not, see . Class - Foam::GAMGInterfaceField + Foam::AMGInterfaceField Description - Abstract base class for GAMG agglomerated interface fields. + Abstract base class for AMG agglomerated interface fields. SourceFiles - GAMGInterfaceField.C + AMGInterfaceField.C newAmgInterfaceField.C \*---------------------------------------------------------------------------*/ -#ifndef GAMGInterfaceField_H -#define GAMGInterfaceField_H +#ifndef AMGInterfaceField_H +#define AMGInterfaceField_H #include "lduInterfaceField.H" -#include "GAMGInterface.H" +#include "AMGInterface.H" #include "autoPtr.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,32 +46,32 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class GAMGInterfaceField Declaration + Class AMGInterfaceField Declaration \*---------------------------------------------------------------------------*/ -class GAMGInterfaceField +class AMGInterfaceField : public lduInterfaceField { // Private data //- Local reference cast into the interface - const GAMGInterface& interface_; + const AMGInterface& interface_; // Private Member Functions //- Disallow default bitwise copy construct - GAMGInterfaceField(const GAMGInterfaceField&); + AMGInterfaceField(const AMGInterfaceField&); //- Disallow default bitwise assignment - void operator=(const GAMGInterfaceField&); + void operator=(const AMGInterfaceField&); public: //- Runtime type information - TypeName("GAMGInterfaceField"); + TypeName("AMGInterfaceField"); // Declare run-time constructor selection tables @@ -79,13 +79,13 @@ public: declareRunTimeSelectionTable ( autoPtr, - GAMGInterfaceField, + AMGInterfaceField, lduInterface, ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterface ), - (GAMGCp, fineInterface) + (AMGCp, fineInterface) ); @@ -93,24 +93,24 @@ public: //- Return a pointer to a new interface created on freestore given // the fine interface - static autoPtr New + static autoPtr New ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterface ); // Constructors - //- Construct from GAMG interface and fine level interface field - GAMGInterfaceField + //- Construct from AMG interface and fine level interface field + AMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& ) : - lduInterfaceField(GAMGCp), - interface_(GAMGCp) + lduInterfaceField(AMGCp), + interface_(AMGCp) {} }; diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/newGAMGInterfaceField.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/AMGInterfaceField/newAMGInterfaceField.C similarity index 81% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/newGAMGInterfaceField.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/AMGInterfaceField/newAMGInterfaceField.C index da1db92fc..74df7d1a2 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/newGAMGInterfaceField.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/AMGInterfaceField/newAMGInterfaceField.C @@ -23,13 +23,13 @@ License \*---------------------------------------------------------------------------*/ -#include "GAMGInterfaceField.H" +#include "AMGInterfaceField.H" // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::GAMGInterfaceField::New +Foam::autoPtr Foam::AMGInterfaceField::New ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterface ) { @@ -42,16 +42,16 @@ Foam::autoPtr Foam::GAMGInterfaceField::New { FatalErrorIn ( - "GAMGInterfaceField::New" - "(const GAMGInterface& GAMGCp, " + "AMGInterfaceField::New" + "(const AMGInterface& AMGCp, " "const lduInterfaceField& fineInterface)" - ) << "Unknown GAMGInterfaceField type " << coupleType << ".\n" - << "Valid GAMGInterfaceField types are :" + ) << "Unknown AMGInterfaceField type " << coupleType << ".\n" + << "Valid AMGInterfaceField types are :" << lduInterfaceConstructorTablePtr_->sortedToc() << exit(FatalError); } - return autoPtr(cstrIter()(GAMGCp, fineInterface)); + return autoPtr(cstrIter()(AMGCp, fineInterface)); } diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicAMGInterfaceField/cyclicAMGInterfaceField.C similarity index 85% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicAMGInterfaceField/cyclicAMGInterfaceField.C index 3e483912c..e615691a1 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicAMGInterfaceField/cyclicAMGInterfaceField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "cyclicGAMGInterfaceField.H" +#include "cyclicAMGInterfaceField.H" #include "addToRunTimeSelectionTable.H" #include "lduMatrix.H" @@ -31,11 +31,11 @@ License namespace Foam { - defineTypeNameAndDebug(cyclicGAMGInterfaceField, 0); + defineTypeNameAndDebug(cyclicAMGInterfaceField, 0); addToRunTimeSelectionTable ( - GAMGInterfaceField, - cyclicGAMGInterfaceField, + AMGInterfaceField, + cyclicAMGInterfaceField, lduInterface ); } @@ -43,14 +43,14 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::cyclicGAMGInterfaceField::cyclicGAMGInterfaceField +Foam::cyclicAMGInterfaceField::cyclicAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterface ) : - GAMGInterfaceField(GAMGCp, fineInterface), - cyclicInterface_(refCast(GAMGCp)), + AMGInterfaceField(AMGCp, fineInterface), + cyclicInterface_(refCast(AMGCp)), doTransform_(false), rank_(0) { @@ -64,13 +64,13 @@ Foam::cyclicGAMGInterfaceField::cyclicGAMGInterfaceField // * * * * * * * * * * * * * * * * Desstructor * * * * * * * * * * * * * * * // -Foam::cyclicGAMGInterfaceField::~cyclicGAMGInterfaceField() +Foam::cyclicAMGInterfaceField::~cyclicAMGInterfaceField() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::cyclicGAMGInterfaceField::updateInterfaceMatrix +void Foam::cyclicAMGInterfaceField::updateInterfaceMatrix ( const scalarField& psiInternal, scalarField& result, diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicAMGInterfaceField/cyclicAMGInterfaceField.H similarity index 84% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicAMGInterfaceField/cyclicAMGInterfaceField.H index 0d9f046b5..f41212713 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicAMGInterfaceField/cyclicAMGInterfaceField.H @@ -22,21 +22,21 @@ License along with foam-extend. If not, see . Class - Foam::cyclicGAMGInterfaceField + Foam::cyclicAMGInterfaceField Description - GAMG agglomerated cyclic interface field. + AMG agglomerated cyclic interface field. SourceFiles - cyclicGAMGInterfaceField.C + cyclicAMGInterfaceField.C \*---------------------------------------------------------------------------*/ -#ifndef cyclicGAMGInterfaceField_H -#define cyclicGAMGInterfaceField_H +#ifndef cyclicAMGInterfaceField_H +#define cyclicAMGInterfaceField_H -#include "GAMGInterfaceField.H" -#include "cyclicGAMGInterface.H" +#include "AMGInterfaceField.H" +#include "cyclicAMGInterface.H" #include "cyclicLduInterfaceField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,18 +45,18 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class cyclicGAMGInterfaceField Declaration + Class cyclicAMGInterfaceField Declaration \*---------------------------------------------------------------------------*/ -class cyclicGAMGInterfaceField +class cyclicAMGInterfaceField : - public GAMGInterfaceField, + public AMGInterfaceField, virtual public cyclicLduInterfaceField { // Private data //- Local reference cast into the cyclic interface - const cyclicGAMGInterface& cyclicInterface_; + const cyclicAMGInterface& cyclicInterface_; //- Is the transform required bool doTransform_; @@ -68,10 +68,10 @@ class cyclicGAMGInterfaceField // Private Member Functions //- Disallow default bitwise copy construct - cyclicGAMGInterfaceField(const cyclicGAMGInterfaceField&); + cyclicAMGInterfaceField(const cyclicAMGInterfaceField&); //- Disallow default bitwise assignment - void operator=(const cyclicGAMGInterfaceField&); + void operator=(const cyclicAMGInterfaceField&); public: @@ -82,17 +82,17 @@ public: // Constructors - //- Construct from GAMG interface and fine level interface field - cyclicGAMGInterfaceField + //- Construct from AMG interface and fine level interface field + cyclicAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterfaceField ); // Destructor - virtual ~cyclicGAMGInterfaceField(); + virtual ~cyclicAMGInterfaceField(); // Member Functions diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGgiGAMGInterfaceField/cyclicGgiGAMGInterfaceField.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicGgiAMGInterfaceField/cyclicGgiAMGInterfaceField.C similarity index 82% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGgiGAMGInterfaceField/cyclicGgiGAMGInterfaceField.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicGgiAMGInterfaceField/cyclicGgiAMGInterfaceField.C index 933cde192..bb6bb0932 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGgiGAMGInterfaceField/cyclicGgiGAMGInterfaceField.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicGgiAMGInterfaceField/cyclicGgiAMGInterfaceField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "cyclicGgiGAMGInterfaceField.H" +#include "cyclicGgiAMGInterfaceField.H" #include "addToRunTimeSelectionTable.H" #include "lduMatrix.H" @@ -31,11 +31,11 @@ License namespace Foam { - defineTypeNameAndDebug(cyclicGgiGAMGInterfaceField, 0); + defineTypeNameAndDebug(cyclicGgiAMGInterfaceField, 0); addToRunTimeSelectionTable ( - GAMGInterfaceField, - cyclicGgiGAMGInterfaceField, + AMGInterfaceField, + cyclicGgiAMGInterfaceField, lduInterface ); } @@ -43,19 +43,19 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::cyclicGgiGAMGInterfaceField::cyclicGgiGAMGInterfaceField +Foam::cyclicGgiAMGInterfaceField::cyclicGgiAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterface ) : - ggiGAMGInterfaceField(GAMGCp, fineInterface) + ggiAMGInterfaceField(AMGCp, fineInterface) {} // * * * * * * * * * * * * * * * * Desstructor * * * * * * * * * * * * * * * // -Foam::cyclicGgiGAMGInterfaceField::~cyclicGgiGAMGInterfaceField() +Foam::cyclicGgiAMGInterfaceField::~cyclicGgiAMGInterfaceField() {} diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGgiGAMGInterfaceField/cyclicGgiGAMGInterfaceField.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicGgiAMGInterfaceField/cyclicGgiAMGInterfaceField.H similarity index 77% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGgiGAMGInterfaceField/cyclicGgiGAMGInterfaceField.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicGgiAMGInterfaceField/cyclicGgiAMGInterfaceField.H index 9b6d974e1..ae4866239 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGgiGAMGInterfaceField/cyclicGgiGAMGInterfaceField.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/cyclicGgiAMGInterfaceField/cyclicGgiAMGInterfaceField.H @@ -22,24 +22,24 @@ License along with foam-extend. If not, see . Class - Foam::cyclicGgiGAMGInterfaceField + Foam::cyclicGgiAMGInterfaceField Description - GAMG agglomerated cyclicGgi interface field. + AMG agglomerated cyclicGgi interface field. Author Hrvoje Jasak, Wikki Ltd. All rights reserved. SourceFiles - cyclicGgiGAMGInterfaceField.C + cyclicGgiAMGInterfaceField.C \*---------------------------------------------------------------------------*/ -#ifndef cyclicGgiGAMGInterfaceField_H -#define cyclicGgiGAMGInterfaceField_H +#ifndef cyclicGgiAMGInterfaceField_H +#define cyclicGgiAMGInterfaceField_H -#include "GAMGInterfaceField.H" -#include "ggiGAMGInterfaceField.H" +#include "AMGInterfaceField.H" +#include "ggiAMGInterfaceField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,12 +47,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class cyclicGgiGAMGInterfaceField Declaration + Class cyclicGgiAMGInterfaceField Declaration \*---------------------------------------------------------------------------*/ -class cyclicGgiGAMGInterfaceField +class cyclicGgiAMGInterfaceField : - public ggiGAMGInterfaceField + public ggiAMGInterfaceField { public: @@ -62,17 +62,17 @@ public: // Constructors - //- Construct from GAMG interface and fine level interface field - cyclicGgiGAMGInterfaceField + //- Construct from AMG interface and fine level interface field + cyclicGgiAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterfaceField ); // Destructor - virtual ~cyclicGgiGAMGInterfaceField(); + virtual ~cyclicGgiAMGInterfaceField(); }; diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/ggiGAMGInterfaceField/ggiGAMGInterfaceField.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/ggiAMGInterfaceField/ggiAMGInterfaceField.C similarity index 77% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/ggiGAMGInterfaceField/ggiGAMGInterfaceField.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/ggiAMGInterfaceField/ggiAMGInterfaceField.C index e1148d909..6dd94bc79 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/ggiGAMGInterfaceField/ggiGAMGInterfaceField.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/ggiAMGInterfaceField/ggiAMGInterfaceField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "ggiGAMGInterfaceField.H" +#include "ggiAMGInterfaceField.H" #include "addToRunTimeSelectionTable.H" #include "lduMatrix.H" @@ -33,11 +33,11 @@ License namespace Foam { - defineTypeNameAndDebug(ggiGAMGInterfaceField, 0); + defineTypeNameAndDebug(ggiAMGInterfaceField, 0); addToRunTimeSelectionTable ( - GAMGInterfaceField, - ggiGAMGInterfaceField, + AMGInterfaceField, + ggiAMGInterfaceField, lduInterface ); } @@ -45,17 +45,16 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::ggiGAMGInterfaceField::ggiGAMGInterfaceField +Foam::ggiAMGInterfaceField::ggiAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterface ) : - GAMGInterfaceField(GAMGCp, fineInterface), - ggiInterface_(refCast(GAMGCp)), + AMGInterfaceField(AMGCp, fineInterface), + ggiInterface_(refCast(AMGCp)), doTransform_(false), - rank_(0), - transferBuffer_() + rank_(0) { const ggiLduInterfaceField& p = refCast(fineInterface); @@ -67,13 +66,13 @@ Foam::ggiGAMGInterfaceField::ggiGAMGInterfaceField // * * * * * * * * * * * * * * * * Desstructor * * * * * * * * * * * * * * * // -Foam::ggiGAMGInterfaceField::~ggiGAMGInterfaceField() +Foam::ggiAMGInterfaceField::~ggiAMGInterfaceField() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::ggiGAMGInterfaceField::initInterfaceMatrixUpdate +void Foam::ggiAMGInterfaceField::initInterfaceMatrixUpdate ( const scalarField& psiInternal, scalarField& result, @@ -89,7 +88,7 @@ void Foam::ggiGAMGInterfaceField::initInterfaceMatrixUpdate } -void Foam::ggiGAMGInterfaceField::updateInterfaceMatrix +void Foam::ggiAMGInterfaceField::updateInterfaceMatrix ( const scalarField& psiInternal, scalarField& result, @@ -102,18 +101,18 @@ void Foam::ggiGAMGInterfaceField::updateInterfaceMatrix { // Get expanded data to zone size. No global reduce allowed // HJ, 15/May/2009 - scalarField zonePnf = + scalarField pnf = ggiInterface_.internalFieldTransfer(commsType, psiInternal); - transformCoupleField(zonePnf, cmpt); + transformCoupleField(pnf, cmpt); const unallocLabelList& faceCells = ggiInterface_.faceCells(); // New treatment. HJ, 26/Jun/2011 - if (zonePnf.size() != faceCells.size()) + if (pnf.size() != faceCells.size()) { - FatalErrorIn("ggiGAMGInterfaceField::updateInterfaceMatrix") + FatalErrorIn("ggiAMGInterfaceField::updateInterfaceMatrix") << "Error in interface update: incorrect size of zone fields" << nl - << "Field size = " << zonePnf.size() + << "Field size = " << pnf.size() << " Zone size = " << faceCells.size() << abort(FatalError); } @@ -122,14 +121,14 @@ void Foam::ggiGAMGInterfaceField::updateInterfaceMatrix { forAll(faceCells, elemI) { - result[faceCells[elemI]] += coeffs[elemI]*zonePnf[elemI]; + result[faceCells[elemI]] += coeffs[elemI]*pnf[elemI]; } } else { forAll(faceCells, elemI) { - result[faceCells[elemI]] -= coeffs[elemI]*zonePnf[elemI]; + result[faceCells[elemI]] -= coeffs[elemI]*pnf[elemI]; } } } diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/ggiGAMGInterfaceField/ggiGAMGInterfaceField.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/ggiAMGInterfaceField/ggiAMGInterfaceField.H similarity index 85% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/ggiGAMGInterfaceField/ggiGAMGInterfaceField.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/ggiAMGInterfaceField/ggiAMGInterfaceField.H index 15e865e1d..a699c9509 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/ggiGAMGInterfaceField/ggiGAMGInterfaceField.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/ggiAMGInterfaceField/ggiAMGInterfaceField.H @@ -22,24 +22,24 @@ License along with foam-extend. If not, see . Class - Foam::ggiGAMGInterfaceField + Foam::ggiAMGInterfaceField Description - GAMG agglomerated ggi interface field. + AMG agglomerated ggi interface field. Author Hrvoje Jasak, Wikki Ltd. All rights reserved. SourceFiles - ggiGAMGInterfaceField.C + ggiAMGInterfaceField.C \*---------------------------------------------------------------------------*/ -#ifndef ggiGAMGInterfaceField_H -#define ggiGAMGInterfaceField_H +#ifndef ggiAMGInterfaceField_H +#define ggiAMGInterfaceField_H -#include "GAMGInterfaceField.H" -#include "ggiGAMGInterface.H" +#include "AMGInterfaceField.H" +#include "ggiAMGInterface.H" #include "ggiLduInterfaceField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,18 +48,18 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class ggiGAMGInterfaceField Declaration + Class ggiAMGInterfaceField Declaration \*---------------------------------------------------------------------------*/ -class ggiGAMGInterfaceField +class ggiAMGInterfaceField : - public GAMGInterfaceField, + public AMGInterfaceField, virtual public ggiLduInterfaceField { // Private data //- Local reference cast into the ggi interface - const ggiGAMGInterface& ggiInterface_; + const ggiAMGInterface& ggiInterface_; //- Is the transform required bool doTransform_; @@ -67,17 +67,14 @@ class ggiGAMGInterfaceField //- Rank of component for transformation int rank_; - //- Transfer buffer - mutable scalarField transferBuffer_; - // Private Member Functions //- Disallow default bitwise copy construct - ggiGAMGInterfaceField(const ggiGAMGInterfaceField&); + ggiAMGInterfaceField(const ggiAMGInterfaceField&); //- Disallow default bitwise assignment - void operator=(const ggiGAMGInterfaceField&); + void operator=(const ggiAMGInterfaceField&); public: @@ -88,17 +85,16 @@ public: // Constructors - //- Construct from GAMG interface and fine level interface field - ggiGAMGInterfaceField + //- Construct from AMG interface and fine level interface field + ggiAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterfaceField ); - // Destructor - - virtual ~ggiGAMGInterfaceField(); + //- Destructor + virtual ~ggiAMGInterfaceField(); // Member Functions diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/mixingPlaneGAMGInterfaceField/mixingPlaneGAMGInterfaceField.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/mixingPlaneAMGInterfaceField/mixingPlaneAMGInterfaceField.C similarity index 84% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/mixingPlaneGAMGInterfaceField/mixingPlaneGAMGInterfaceField.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/mixingPlaneAMGInterfaceField/mixingPlaneAMGInterfaceField.C index 55019fafb..3337ab1b4 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/mixingPlaneGAMGInterfaceField/mixingPlaneGAMGInterfaceField.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/mixingPlaneAMGInterfaceField/mixingPlaneAMGInterfaceField.C @@ -29,7 +29,7 @@ Contributor \*---------------------------------------------------------------------------*/ -#include "mixingPlaneGAMGInterfaceField.H" +#include "mixingPlaneAMGInterfaceField.H" #include "addToRunTimeSelectionTable.H" #include "lduMatrix.H" @@ -39,11 +39,11 @@ Contributor namespace Foam { - defineTypeNameAndDebug(mixingPlaneGAMGInterfaceField, 0); + defineTypeNameAndDebug(mixingPlaneAMGInterfaceField, 0); addToRunTimeSelectionTable ( - GAMGInterfaceField, - mixingPlaneGAMGInterfaceField, + AMGInterfaceField, + mixingPlaneAMGInterfaceField, lduInterface ); } @@ -51,14 +51,14 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::mixingPlaneGAMGInterfaceField::mixingPlaneGAMGInterfaceField +Foam::mixingPlaneAMGInterfaceField::mixingPlaneAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterface ) : - GAMGInterfaceField(GAMGCp, fineInterface), - mixingPlaneInterface_(refCast(GAMGCp)), + AMGInterfaceField(AMGCp, fineInterface), + mixingPlaneInterface_(refCast(AMGCp)), doTransform_(false), rank_(0), transferBuffer_() @@ -73,13 +73,13 @@ Foam::mixingPlaneGAMGInterfaceField::mixingPlaneGAMGInterfaceField // * * * * * * * * * * * * * * * * Desstructor * * * * * * * * * * * * * * * // -Foam::mixingPlaneGAMGInterfaceField::~mixingPlaneGAMGInterfaceField() +Foam::mixingPlaneAMGInterfaceField::~mixingPlaneAMGInterfaceField() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::mixingPlaneGAMGInterfaceField::initInterfaceMatrixUpdate +void Foam::mixingPlaneAMGInterfaceField::initInterfaceMatrixUpdate ( const scalarField& psiInternal, scalarField&, @@ -94,7 +94,7 @@ void Foam::mixingPlaneGAMGInterfaceField::initInterfaceMatrixUpdate } -void Foam::mixingPlaneGAMGInterfaceField::updateInterfaceMatrix +void Foam::mixingPlaneAMGInterfaceField::updateInterfaceMatrix ( const scalarField& psiInternal, scalarField& result, diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/mixingPlaneGAMGInterfaceField/mixingPlaneGAMGInterfaceField.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/mixingPlaneAMGInterfaceField/mixingPlaneAMGInterfaceField.H similarity index 85% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/mixingPlaneGAMGInterfaceField/mixingPlaneGAMGInterfaceField.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/mixingPlaneAMGInterfaceField/mixingPlaneAMGInterfaceField.H index 2fcc693d0..6d222fb12 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/mixingPlaneGAMGInterfaceField/mixingPlaneGAMGInterfaceField.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/mixingPlaneAMGInterfaceField/mixingPlaneAMGInterfaceField.H @@ -22,10 +22,10 @@ License along with foam-extend. If not, see . Class - Foam::mixingPlaneGAMGInterfaceField + Foam::mixingPlaneAMGInterfaceField Description - GAMG agglomerated mixingPlane interface field. + AMG agglomerated mixingPlane interface field. Author Martin Beaudoin, Hydro-Quebec, 2009. All rights reserved @@ -34,15 +34,15 @@ Contributor Hrvoje Jasak, Wikki Ltd. SourceFiles - mixingPlaneGAMGInterfaceField.C + mixingPlaneAMGInterfaceField.C \*---------------------------------------------------------------------------*/ -#ifndef mixingPlaneGAMGInterfaceField_H -#define mixingPlaneGAMGInterfaceField_H +#ifndef mixingPlaneAMGInterfaceField_H +#define mixingPlaneAMGInterfaceField_H -#include "GAMGInterfaceField.H" -#include "mixingPlaneGAMGInterface.H" +#include "AMGInterfaceField.H" +#include "mixingPlaneAMGInterface.H" #include "mixingPlaneLduInterfaceField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,18 +51,18 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class mixingPlaneGAMGInterfaceField Declaration + Class mixingPlaneAMGInterfaceField Declaration \*---------------------------------------------------------------------------*/ -class mixingPlaneGAMGInterfaceField +class mixingPlaneAMGInterfaceField : - public GAMGInterfaceField, + public AMGInterfaceField, virtual public mixingPlaneLduInterfaceField { // Private data //- Local reference cast into the mixingPlane interface - const mixingPlaneGAMGInterface& mixingPlaneInterface_; + const mixingPlaneAMGInterface& mixingPlaneInterface_; //- Is the transform required bool doTransform_; @@ -77,10 +77,10 @@ class mixingPlaneGAMGInterfaceField // Private Member Functions //- Disallow default bitwise copy construct - mixingPlaneGAMGInterfaceField(const mixingPlaneGAMGInterfaceField&); + mixingPlaneAMGInterfaceField(const mixingPlaneAMGInterfaceField&); //- Disallow default bitwise assignment - void operator=(const mixingPlaneGAMGInterfaceField&); + void operator=(const mixingPlaneAMGInterfaceField&); public: @@ -91,17 +91,17 @@ public: // Constructors - //- Construct from GAMG interface and fine level interface field - mixingPlaneGAMGInterfaceField + //- Construct from AMG interface and fine level interface field + mixingPlaneAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterfaceField ); // Destructor - virtual ~mixingPlaneGAMGInterfaceField(); + virtual ~mixingPlaneAMGInterfaceField(); // Member Functions diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/processorAMGInterfaceField/processorAMGInterfaceField.C similarity index 84% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/processorAMGInterfaceField/processorAMGInterfaceField.C index f400f458e..1455ab34f 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/processorAMGInterfaceField/processorAMGInterfaceField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "processorGAMGInterfaceField.H" +#include "processorAMGInterfaceField.H" #include "addToRunTimeSelectionTable.H" #include "lduMatrix.H" @@ -31,11 +31,11 @@ License namespace Foam { - defineTypeNameAndDebug(processorGAMGInterfaceField, 0); + defineTypeNameAndDebug(processorAMGInterfaceField, 0); addToRunTimeSelectionTable ( - GAMGInterfaceField, - processorGAMGInterfaceField, + AMGInterfaceField, + processorAMGInterfaceField, lduInterface ); } @@ -43,14 +43,14 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::processorGAMGInterfaceField::processorGAMGInterfaceField +Foam::processorAMGInterfaceField::processorAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterfaceField ) : - GAMGInterfaceField(GAMGCp, fineInterfaceField), - procInterface_(refCast(GAMGCp)), + AMGInterfaceField(AMGCp, fineInterfaceField), + procInterface_(refCast(AMGCp)), doTransform_(false), rank_(0) { @@ -64,13 +64,13 @@ Foam::processorGAMGInterfaceField::processorGAMGInterfaceField // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::processorGAMGInterfaceField::~processorGAMGInterfaceField() +Foam::processorAMGInterfaceField::~processorAMGInterfaceField() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate +void Foam::processorAMGInterfaceField::initInterfaceMatrixUpdate ( const scalarField& psiInternal, scalarField&, @@ -89,7 +89,7 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate } -void Foam::processorGAMGInterfaceField::updateInterfaceMatrix +void Foam::processorAMGInterfaceField::updateInterfaceMatrix ( const scalarField&, scalarField& result, diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/processorAMGInterfaceField/processorAMGInterfaceField.H similarity index 85% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/processorAMGInterfaceField/processorAMGInterfaceField.H index d2ed8d491..9277aaa8c 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/processorAMGInterfaceField/processorAMGInterfaceField.H @@ -22,21 +22,21 @@ License along with foam-extend. If not, see . Class - Foam::processorGAMGInterfaceField + Foam::processorAMGInterfaceField Description - GAMG agglomerated processor interface field. + AMG agglomerated processor interface field. SourceFiles - processorGAMGInterfaceField.C + processorAMGInterfaceField.C \*---------------------------------------------------------------------------*/ -#ifndef processorGAMGInterfaceField_H -#define processorGAMGInterfaceField_H +#ifndef processorAMGInterfaceField_H +#define processorAMGInterfaceField_H -#include "GAMGInterfaceField.H" -#include "processorGAMGInterface.H" +#include "AMGInterfaceField.H" +#include "processorAMGInterface.H" #include "processorLduInterfaceField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,18 +45,18 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class processorGAMGInterfaceField Declaration + Class processorAMGInterfaceField Declaration \*---------------------------------------------------------------------------*/ -class processorGAMGInterfaceField +class processorAMGInterfaceField : - public GAMGInterfaceField, + public AMGInterfaceField, public processorLduInterfaceField { // Private data //- Local reference cast into the processor interface - const processorGAMGInterface& procInterface_; + const processorAMGInterface& procInterface_; //- Is the transform required bool doTransform_; @@ -68,10 +68,10 @@ class processorGAMGInterfaceField // Private Member Functions //- Disallow default bitwise copy construct - processorGAMGInterfaceField(const processorGAMGInterfaceField&); + processorAMGInterfaceField(const processorAMGInterfaceField&); //- Disallow default bitwise assignment - void operator=(const processorGAMGInterfaceField&); + void operator=(const processorAMGInterfaceField&); public: @@ -82,17 +82,16 @@ public: // Constructors - //- Construct from GAMG interface and fine level interface field - processorGAMGInterfaceField + //- Construct from AMG interface and fine level interface field + processorAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterfaceField ); - // Destructor - - virtual ~processorGAMGInterfaceField(); + //- Destructor + virtual ~processorAMGInterfaceField(); // Member Functions diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/regionCoupleGAMGInterfaceField/regionCoupleGAMGInterfaceField.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/regionCoupleAMGInterfaceField/regionCoupleAMGInterfaceField.C similarity index 80% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/regionCoupleGAMGInterfaceField/regionCoupleGAMGInterfaceField.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/regionCoupleAMGInterfaceField/regionCoupleAMGInterfaceField.C index a26cd8daa..788fb730d 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/regionCoupleGAMGInterfaceField/regionCoupleGAMGInterfaceField.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/regionCoupleAMGInterfaceField/regionCoupleAMGInterfaceField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "regionCoupleGAMGInterfaceField.H" +#include "regionCoupleAMGInterfaceField.H" #include "addToRunTimeSelectionTable.H" #include "lduMatrix.H" @@ -33,11 +33,11 @@ License namespace Foam { - defineTypeNameAndDebug(regionCoupleGAMGInterfaceField, 0); + defineTypeNameAndDebug(regionCoupleAMGInterfaceField, 0); addToRunTimeSelectionTable ( - GAMGInterfaceField, - regionCoupleGAMGInterfaceField, + AMGInterfaceField, + regionCoupleAMGInterfaceField, lduInterface ); } @@ -45,26 +45,26 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::regionCoupleGAMGInterfaceField::regionCoupleGAMGInterfaceField +Foam::regionCoupleAMGInterfaceField::regionCoupleAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterface ) : - ggiGAMGInterfaceField(GAMGCp, fineInterface), - regionCoupleInterface_(refCast(GAMGCp)) + ggiAMGInterfaceField(AMGCp, fineInterface), + regionCoupleInterface_(refCast(AMGCp)) {} // * * * * * * * * * * * * * * * * Desstructor * * * * * * * * * * * * * * * // -Foam::regionCoupleGAMGInterfaceField::~regionCoupleGAMGInterfaceField() +Foam::regionCoupleAMGInterfaceField::~regionCoupleAMGInterfaceField() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::regionCoupleGAMGInterfaceField::initInterfaceMatrixUpdate +void Foam::regionCoupleAMGInterfaceField::initInterfaceMatrixUpdate ( const scalarField& psiInternal, scalarField& result, @@ -78,7 +78,7 @@ void Foam::regionCoupleGAMGInterfaceField::initInterfaceMatrixUpdate // This must have a reduce in it. HJ, 15/May/2009 if (regionCoupleInterface_.coupled()) { - ggiGAMGInterfaceField::initInterfaceMatrixUpdate + ggiAMGInterfaceField::initInterfaceMatrixUpdate ( psiInternal, result, @@ -92,7 +92,7 @@ void Foam::regionCoupleGAMGInterfaceField::initInterfaceMatrixUpdate } -void Foam::regionCoupleGAMGInterfaceField::updateInterfaceMatrix +void Foam::regionCoupleAMGInterfaceField::updateInterfaceMatrix ( const scalarField& psiInternal, scalarField& result, @@ -107,7 +107,7 @@ void Foam::regionCoupleGAMGInterfaceField::updateInterfaceMatrix // HJ, 15/May/2009 if (regionCoupleInterface_.coupled()) { - ggiGAMGInterfaceField::updateInterfaceMatrix + ggiAMGInterfaceField::updateInterfaceMatrix ( psiInternal, result, diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/regionCoupleGAMGInterfaceField/regionCoupleGAMGInterfaceField.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/regionCoupleAMGInterfaceField/regionCoupleAMGInterfaceField.H similarity index 81% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/regionCoupleGAMGInterfaceField/regionCoupleGAMGInterfaceField.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/regionCoupleAMGInterfaceField/regionCoupleAMGInterfaceField.H index 56cab8008..7a5a9a471 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaceFields/regionCoupleGAMGInterfaceField/regionCoupleGAMGInterfaceField.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaceFields/regionCoupleAMGInterfaceField/regionCoupleAMGInterfaceField.H @@ -22,24 +22,24 @@ License along with foam-extend. If not, see . Class - Foam::regionCoupleGAMGInterfaceField + Foam::regionCoupleAMGInterfaceField Description - GAMG agglomerated regionCouple interface field. + AMG agglomerated regionCouple interface field. Author Hrvoje Jasak, Wikki Ltd. All rights reserved. SourceFiles - regionCoupleGAMGInterfaceField.C + regionCoupleAMGInterfaceField.C \*---------------------------------------------------------------------------*/ -#ifndef regionCoupleGAMGInterfaceField_H -#define regionCoupleGAMGInterfaceField_H +#ifndef regionCoupleAMGInterfaceField_H +#define regionCoupleAMGInterfaceField_H -#include "regionCoupleGAMGInterface.H" -#include "ggiGAMGInterfaceField.H" +#include "regionCoupleAMGInterface.H" +#include "ggiAMGInterfaceField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,17 +47,17 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class regionCoupleGAMGInterfaceField Declaration + Class regionCoupleAMGInterfaceField Declaration \*---------------------------------------------------------------------------*/ -class regionCoupleGAMGInterfaceField +class regionCoupleAMGInterfaceField : - public ggiGAMGInterfaceField + public ggiAMGInterfaceField { // Private data //- Local reference cast into the regionCouple interface - const regionCoupleGAMGInterface& regionCoupleInterface_; + const regionCoupleAMGInterface& regionCoupleInterface_; public: @@ -67,17 +67,17 @@ public: // Constructors - //- Construct from GAMG interface and fine level interface field - regionCoupleGAMGInterfaceField + //- Construct from AMG interface and fine level interface field + regionCoupleAMGInterfaceField ( - const GAMGInterface& GAMGCp, + const AMGInterface& AMGCp, const lduInterfaceField& fineInterfaceField ); // Destructor - virtual ~regionCoupleGAMGInterfaceField(); + virtual ~regionCoupleAMGInterfaceField(); // Member Functions diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/AMGInterface.C similarity index 86% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/AMGInterface.C index 3df5c20ae..f104927a3 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/AMGInterface.C @@ -23,20 +23,20 @@ License \*---------------------------------------------------------------------------*/ -#include "GAMGInterface.H" +#include "AMGInterface.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(GAMGInterface, 0); - defineRunTimeSelectionTable(GAMGInterface, lduInterface); + defineTypeNameAndDebug(AMGInterface, 0); + defineRunTimeSelectionTable(AMGInterface, lduInterface); } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::GAMGInterface::combine(const GAMGInterface& coarseGi) +void Foam::AMGInterface::combine(const AMGInterface& coarseGi) { const labelList& coarseFra = coarseGi.restrictAddressing_; @@ -49,7 +49,7 @@ void Foam::GAMGInterface::combine(const GAMGInterface& coarseGi) } -Foam::tmp Foam::GAMGInterface::interfaceInternalField +Foam::tmp Foam::AMGInterface::interfaceInternalField ( const unallocLabelList& internalData ) const @@ -58,7 +58,7 @@ Foam::tmp Foam::GAMGInterface::interfaceInternalField } -Foam::tmp Foam::GAMGInterface::agglomerateCoeffs +Foam::tmp Foam::AMGInterface::agglomerateCoeffs ( const scalarField& fineCoeffs ) const diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/AMGInterface.H similarity index 81% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/AMGInterface.H index ef8a8b583..4ba41a9ea 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/AMGInterface.H @@ -22,10 +22,10 @@ License along with foam-extend. If not, see . Class - Foam::GAMGInterface + Foam::AMGInterface Description - Abstract base class for GAMG agglomerated interfaces. + Abstract base class for AMG agglomerated interfaces. For complex (interpolative) agglomeration, a single fine-level coefficient may be agglomerated into several coarse level coefficients. @@ -42,18 +42,18 @@ Author Hrvoje Jasak, Wikki Ltd. All rights reserved. SourceFiles - GAMGInterface.C + AMGInterface.C newAmgInterface.C \*---------------------------------------------------------------------------*/ -#ifndef GAMGInterface_H -#define GAMGInterface_H +#ifndef AMGInterface_H +#define AMGInterface_H #include "lduInterface.H" #include "autoPtr.H" #include "lduPrimitiveMesh.H" -#include "CoeffField.H" +#include "coeffFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,10 +61,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class GAMGInterface Declaration + Class AMGInterface Declaration \*---------------------------------------------------------------------------*/ -class GAMGInterface +class AMGInterface : public lduInterface { @@ -96,16 +96,16 @@ private: // Private Member Functions //- Disallow default bitwise copy construct - GAMGInterface(const GAMGInterface&); + AMGInterface(const AMGInterface&); //- Disallow default bitwise assignment - void operator=(const GAMGInterface&); + void operator=(const AMGInterface&); public: //- Runtime type information - TypeName("GAMGInterface"); + TypeName("AMGInterface"); // Declare run-time constructor selection tables @@ -113,7 +113,7 @@ public: declareRunTimeSelectionTable ( autoPtr, - GAMGInterface, + AMGInterface, lduInterface, ( const lduPrimitiveMesh& lduMesh, @@ -134,7 +134,7 @@ public: //- Return a pointer to a new interface created on freestore given // the fine interface - static autoPtr New + static autoPtr New ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -147,7 +147,7 @@ public: //- Construct from fine-level interface, // local and neighbour restrict addressing - GAMGInterface(const lduPrimitiveMesh& lduMesh) + AMGInterface(const lduPrimitiveMesh& lduMesh) : lduMesh_(lduMesh) {} @@ -175,6 +175,24 @@ public: return faceCells_; } + //- Return fine addressing + const labelField& fineAddressing() const + { + return fineAddressing_; + } + + //- Return restrict addressing + const labelField& restrictAddressing() const + { + return restrictAddressing_; + } + + //- Return fine level agglomeration weights + const scalarField& restrictWeights() const + { + return restrictWeights_; + } + //- Return the interface internal field of the given field template tmp > interfaceInternalField @@ -195,7 +213,7 @@ public: //- Merge the next level with this level // combining the face-restrict addressing // and copying the face-cell addressing - void combine(const GAMGInterface&); + void combine(const AMGInterface&); //- Agglomerating the given fine-level coefficients and return virtual tmp agglomerateCoeffs @@ -203,13 +221,10 @@ public: const scalarField& fineCoeffs ) const; - // Klas Jareteg: 2013-02-06 - //- Agglomerating for the CoeffField fine-level coefficients - template - tmp > agglomerateBlockCoeffs - ( - const CoeffField& fineCoeffs - ) const; + // Coefficient agglomeration functions for block coefficients + // moved to BlockAMGInterfaceField to allow + // templating on virtual functions in block matrix agglomeration + // HJ, 16/Mar/2016 }; @@ -220,7 +235,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "GAMGInterfaceTemplates.C" +# include "AMGInterfaceTemplates.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/AMGInterfaceTemplates.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/AMGInterfaceTemplates.C new file mode 100644 index 000000000..fe6303429 --- /dev/null +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/AMGInterfaceTemplates.C @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | Version: 3.2 + \\ / A nd | Web: http://www.foam-extend.org + \\/ M anipulation | For copyright notice see file Copyright +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with foam-extend. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "AMGInterface.H" +#include "scalarCoeffField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template +Foam::tmp > Foam::AMGInterface::interfaceInternalField +( + const UList& iF +) const +{ + tmp > tresult(new Field(size())); + Field& result = tresult(); + + forAll (result, elemI) + { + result[elemI] = iF[faceCells_[elemI]]; + } + + return tresult; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/newGAMGInterface.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/newAMGInterface.C similarity index 89% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/newGAMGInterface.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/newAMGInterface.C index 72d10c285..9b28bae1a 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/newGAMGInterface.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/AMGInterface/newAMGInterface.C @@ -23,13 +23,13 @@ License \*---------------------------------------------------------------------------*/ -#include "GAMGInterface.H" +#include "AMGInterface.H" #include "lduMatrix.H" // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::GAMGInterface::New +Foam::autoPtr Foam::AMGInterface::New ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -46,18 +46,18 @@ Foam::autoPtr Foam::GAMGInterface::New { FatalErrorIn ( - "GAMGInterface::New" + "AMGInterface::New" "(const lduPrimitiveMesh& lduMesh," "const lduInterface& fineInterface," "const labelField& localRestrictAddressing," "const labelField& neighbourRestrictAddressing)" - ) << "Unknown GAMGInterface type " << coupleType << ".\n" - << "Valid GAMGInterface types are :" + ) << "Unknown AMGInterface type " << coupleType << ".\n" + << "Valid AMGInterface types are :" << lduInterfaceConstructorTablePtr_->sortedToc() << exit(FatalError); } - return autoPtr + return autoPtr ( cstrIter() ( diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicAMGInterface/cyclicAMGInterface.C similarity index 95% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicAMGInterface/cyclicAMGInterface.C index f0c398409..dbb698a4e 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicAMGInterface/cyclicAMGInterface.C @@ -23,18 +23,18 @@ License \*---------------------------------------------------------------------------*/ -#include "cyclicGAMGInterface.H" +#include "cyclicAMGInterface.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(cyclicGAMGInterface, 0); + defineTypeNameAndDebug(cyclicAMGInterface, 0); addToRunTimeSelectionTable ( - GAMGInterface, - cyclicGAMGInterface, + AMGInterface, + cyclicAMGInterface, lduInterface ); } @@ -42,7 +42,7 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::cyclicGAMGInterface::cyclicGAMGInterface +Foam::cyclicAMGInterface::cyclicAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -50,7 +50,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface const labelField& neighbourRestrictAddressing ) : - GAMGInterface(lduMesh), + AMGInterface(lduMesh), fineCyclicInterface_(refCast(fineInterface)) { // Make a lookup table of entries for owner/neighbour @@ -221,13 +221,13 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::cyclicGAMGInterface::~cyclicGAMGInterface() +Foam::cyclicAMGInterface::~cyclicAMGInterface() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::tmp Foam::cyclicGAMGInterface::transfer +Foam::tmp Foam::cyclicAMGInterface::transfer ( const Pstream::commsTypes, const unallocLabelList& interfaceData @@ -248,7 +248,7 @@ Foam::tmp Foam::cyclicGAMGInterface::transfer } -Foam::tmp Foam::cyclicGAMGInterface::internalFieldTransfer +Foam::tmp Foam::cyclicAMGInterface::internalFieldTransfer ( const Pstream::commsTypes, const unallocLabelList& iF diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicAMGInterface/cyclicAMGInterface.H similarity index 88% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicAMGInterface/cyclicAMGInterface.H index 7416f5a0d..78a29bc8c 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicAMGInterface/cyclicAMGInterface.H @@ -22,20 +22,20 @@ License along with foam-extend. If not, see . Class - Foam::cyclicGAMGInterface + Foam::cyclicAMGInterface Description - GAMG agglomerated cyclic interface. + AMG agglomerated cyclic interface. SourceFiles - cyclicGAMGInterface.C + cyclicAMGInterface.C \*---------------------------------------------------------------------------*/ -#ifndef cyclicGAMGInterface_H -#define cyclicGAMGInterface_H +#ifndef cyclicAMGInterface_H +#define cyclicAMGInterface_H -#include "GAMGInterface.H" +#include "AMGInterface.H" #include "cyclicLduInterface.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,12 +44,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class cyclicGAMGInterface Declaration + Class cyclicAMGInterface Declaration \*---------------------------------------------------------------------------*/ -class cyclicGAMGInterface +class cyclicAMGInterface : - public GAMGInterface, + public AMGInterface, virtual public cyclicLduInterface { // Private data @@ -62,10 +62,10 @@ class cyclicGAMGInterface // Private Member Functions //- Disallow default bitwise copy construct - cyclicGAMGInterface(const cyclicGAMGInterface&); + cyclicAMGInterface(const cyclicAMGInterface&); //- Disallow default bitwise assignment - void operator=(const cyclicGAMGInterface&); + void operator=(const cyclicAMGInterface&); public: @@ -78,7 +78,7 @@ public: //- Construct from fine level interface, // local and neighbour restrict addressing - cyclicGAMGInterface + cyclicAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -89,7 +89,7 @@ public: // Destructor - virtual ~cyclicGAMGInterface(); + virtual ~cyclicAMGInterface(); // Member Functions diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGgiGAMGInterface/cyclicGgiGAMGInterface.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicGGIAMGInterface/cyclicGGIAMGInterface.C similarity index 88% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGgiGAMGInterface/cyclicGgiGAMGInterface.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicGGIAMGInterface/cyclicGGIAMGInterface.C index 33a942b1c..19a103e78 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGgiGAMGInterface/cyclicGgiGAMGInterface.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicGGIAMGInterface/cyclicGGIAMGInterface.C @@ -23,18 +23,18 @@ License \*---------------------------------------------------------------------------*/ -#include "cyclicGgiGAMGInterface.H" +#include "cyclicGGIAMGInterface.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(cyclicGgiGAMGInterface, 0); + defineTypeNameAndDebug(cyclicGGIAMGInterface, 0); addToRunTimeSelectionTable ( - GAMGInterface, - cyclicGgiGAMGInterface, + AMGInterface, + cyclicGGIAMGInterface, lduInterface ); } @@ -42,7 +42,7 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::cyclicGgiGAMGInterface::cyclicGgiGAMGInterface +Foam::cyclicGGIAMGInterface::cyclicGGIAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -50,7 +50,7 @@ Foam::cyclicGgiGAMGInterface::cyclicGgiGAMGInterface const labelField& neighbourRestrictAddressing ) : - ggiGAMGInterface + ggiAMGInterface ( lduMesh, fineInterface, @@ -62,7 +62,7 @@ Foam::cyclicGgiGAMGInterface::cyclicGgiGAMGInterface // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::cyclicGgiGAMGInterface::~cyclicGgiGAMGInterface() +Foam::cyclicGGIAMGInterface::~cyclicGGIAMGInterface() {} diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGgiGAMGInterface/cyclicGgiGAMGInterface.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicGGIAMGInterface/cyclicGGIAMGInterface.H similarity index 84% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGgiGAMGInterface/cyclicGgiGAMGInterface.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicGGIAMGInterface/cyclicGGIAMGInterface.H index a5b4587e2..0e63c9d33 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGgiGAMGInterface/cyclicGgiGAMGInterface.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/cyclicGGIAMGInterface/cyclicGGIAMGInterface.H @@ -22,24 +22,24 @@ License along with foam-extend. If not, see . Class - Foam::cyclicGgiGAMGInterface + Foam::cyclicGGIAMGInterface Description - GAMG agglomerated cyclicGgi interface. + AMG agglomerated cyclicGgi interface. Author Hrvoje Jasak, Wikki Ltd. All rights reserved. SourceFiles - cyclicGgiGAMGInterface.C + cyclicGGIAMGInterface.C \*---------------------------------------------------------------------------*/ -#ifndef cyclicGgiGAMGInterface_H -#define cyclicGgiGAMGInterface_H +#ifndef cyclicGGIAMGInterface_H +#define cyclicGGIAMGInterface_H -#include "GAMGInterface.H" -#include "ggiGAMGInterface.H" +#include "AMGInterface.H" +#include "ggiAMGInterface.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,12 +47,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class cyclicGgiGAMGInterface Declaration + Class cyclicGGIAMGInterface Declaration \*---------------------------------------------------------------------------*/ -class cyclicGgiGAMGInterface +class cyclicGGIAMGInterface : - public ggiGAMGInterface + public ggiAMGInterface { public: @@ -64,7 +64,7 @@ public: //- Construct from fine level interface, // local and neighbour restrict addressing - cyclicGgiGAMGInterface + cyclicGGIAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -75,7 +75,7 @@ public: // Destructor - virtual ~cyclicGgiGAMGInterface(); + virtual ~cyclicGGIAMGInterface(); }; diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterface.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/ggiAMGInterface/ggiAMGInterface.C similarity index 93% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterface.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/ggiAMGInterface/ggiAMGInterface.C index a3dd04859..42a1b6b84 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterface.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/ggiAMGInterface/ggiAMGInterface.C @@ -23,18 +23,18 @@ License \*---------------------------------------------------------------------------*/ -#include "ggiGAMGInterface.H" +#include "ggiAMGInterface.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(ggiGAMGInterface, 0); + defineTypeNameAndDebug(ggiAMGInterface, 0); addToRunTimeSelectionTable ( - GAMGInterface, - ggiGAMGInterface, + AMGInterface, + ggiAMGInterface, lduInterface ); } @@ -42,7 +42,7 @@ namespace Foam // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::ggiGAMGInterface::initFastReduce() const +void Foam::ggiAMGInterface::initFastReduce() const { // Init should be executed only once initReduce_ = true; @@ -85,7 +85,7 @@ void Foam::ggiGAMGInterface::initFastReduce() const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::ggiGAMGInterface::ggiGAMGInterface +Foam::ggiAMGInterface::ggiAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -93,7 +93,7 @@ Foam::ggiGAMGInterface::ggiGAMGInterface const labelField& neighbourRestrictAddressing ) : - GAMGInterface(lduMesh), + AMGInterface(lduMesh), fineGgiInterface_(refCast(fineInterface)), zoneSize_(0), zoneAddressing_(), @@ -597,17 +597,21 @@ Foam::ggiGAMGInterface::ggiGAMGInterface // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::ggiGAMGInterface::~ggiGAMGInterface() +Foam::ggiAMGInterface::~ggiAMGInterface() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::tmp Foam::ggiGAMGInterface::agglomerateCoeffs +Foam::tmp Foam::ggiAMGInterface::agglomerateCoeffs ( const scalarField& fineCoeffs ) const { + // Note: reconsider better parallel communication here. + // Currently expanding to full zone size + // HJ, 16/Mar/2016 + // Reassemble fine coefficients to full fine zone size scalarField zoneFineCoeffs(fineGgiInterface_.zoneSize(), 0); @@ -648,45 +652,45 @@ Foam::tmp Foam::ggiGAMGInterface::agglomerateCoeffs } -bool Foam::ggiGAMGInterface::master() const +bool Foam::ggiAMGInterface::master() const { return fineGgiInterface_.master(); } -bool Foam::ggiGAMGInterface::fineLevel() const +bool Foam::ggiAMGInterface::fineLevel() const { return false; } -Foam::label Foam::ggiGAMGInterface::shadowIndex() const +Foam::label Foam::ggiAMGInterface::shadowIndex() const { return fineGgiInterface_.shadowIndex(); } -const Foam::ggiLduInterface& Foam::ggiGAMGInterface::shadowInterface() const +const Foam::ggiLduInterface& Foam::ggiAMGInterface::shadowInterface() const { return refCast(ldu().interfaces()[shadowIndex()]); } -Foam::label Foam::ggiGAMGInterface::zoneSize() const +Foam::label Foam::ggiAMGInterface::zoneSize() const { return zoneSize_; } -const Foam::labelList& Foam::ggiGAMGInterface::zoneAddressing() const +const Foam::labelList& Foam::ggiAMGInterface::zoneAddressing() const { return zoneAddressing_; } -const Foam::labelListList& Foam::ggiGAMGInterface::addressing() const +const Foam::labelListList& Foam::ggiAMGInterface::addressing() const { - FatalErrorIn("const labelListList& ggiGAMGInterface::addressing() const") + FatalErrorIn("const labelListList& ggiAMGInterface::addressing() const") << "Requested fine addressing at coarse level" << abort(FatalError); @@ -694,15 +698,15 @@ const Foam::labelListList& Foam::ggiGAMGInterface::addressing() const } -bool Foam::ggiGAMGInterface::localParallel() const +bool Foam::ggiAMGInterface::localParallel() const { return fineGgiInterface_.localParallel(); } -const Foam::scalarListList& Foam::ggiGAMGInterface::weights() const +const Foam::scalarListList& Foam::ggiAMGInterface::weights() const { - FatalErrorIn("const labelListList& ggiGAMGInterface::weights() const") + FatalErrorIn("const labelListList& ggiAMGInterface::weights() const") << "Requested fine addressing at coarse level" << abort(FatalError); @@ -710,19 +714,19 @@ const Foam::scalarListList& Foam::ggiGAMGInterface::weights() const } -const Foam::tensorField& Foam::ggiGAMGInterface::forwardT() const +const Foam::tensorField& Foam::ggiAMGInterface::forwardT() const { return fineGgiInterface_.forwardT(); } -const Foam::tensorField& Foam::ggiGAMGInterface::reverseT() const +const Foam::tensorField& Foam::ggiAMGInterface::reverseT() const { return fineGgiInterface_.reverseT(); } -void Foam::ggiGAMGInterface::initTransfer +void Foam::ggiAMGInterface::initTransfer ( const Pstream::commsTypes commsType, const unallocLabelList& interfaceData @@ -733,7 +737,7 @@ void Foam::ggiGAMGInterface::initTransfer } -Foam::tmp Foam::ggiGAMGInterface::transfer +Foam::tmp Foam::ggiAMGInterface::transfer ( const Pstream::commsTypes, const unallocLabelList& interfaceData @@ -744,7 +748,7 @@ Foam::tmp Foam::ggiGAMGInterface::transfer } -void Foam::ggiGAMGInterface::initInternalFieldTransfer +void Foam::ggiAMGInterface::initInternalFieldTransfer ( const Pstream::commsTypes commsType, const unallocLabelList& iF @@ -755,7 +759,7 @@ void Foam::ggiGAMGInterface::initInternalFieldTransfer } -Foam::tmp Foam::ggiGAMGInterface::internalFieldTransfer +Foam::tmp Foam::ggiAMGInterface::internalFieldTransfer ( const Pstream::commsTypes, const unallocLabelList& @@ -765,7 +769,7 @@ Foam::tmp Foam::ggiGAMGInterface::internalFieldTransfer } -void Foam::ggiGAMGInterface::initInternalFieldTransfer +void Foam::ggiAMGInterface::initInternalFieldTransfer ( const Pstream::commsTypes commsType, const scalarField& iF @@ -775,16 +779,10 @@ void Foam::ggiGAMGInterface::initInternalFieldTransfer // New treatment. HJ, 26/Jun/2011 fieldTransferBuffer_ = fastReduce(pif); - - // Old treatment -#if(0) - // Expand the field, executing a reduce operation in init - fieldTransferBuffer_ = expand(pif); -#endif } -Foam::tmp Foam::ggiGAMGInterface::internalFieldTransfer +Foam::tmp Foam::ggiAMGInterface::internalFieldTransfer ( const Pstream::commsTypes, const scalarField& diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterface.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/ggiAMGInterface/ggiAMGInterface.H similarity index 87% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterface.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/ggiAMGInterface/ggiAMGInterface.H index 504ad42f2..8594f45b1 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterface.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/ggiAMGInterface/ggiAMGInterface.H @@ -22,23 +22,23 @@ License along with foam-extend. If not, see . Class - Foam::ggiGAMGInterface + Foam::ggiAMGInterface Description - GAMG agglomerated ggi interface. + AMG agglomerated ggi interface. Author Hrvoje Jasak, Wikki Ltd. All rights reserved. SourceFiles - ggiGAMGInterface.C + ggiAMGInterface.C \*---------------------------------------------------------------------------*/ -#ifndef ggiGAMGInterface_H -#define ggiGAMGInterface_H +#ifndef ggiAMGInterface_H +#define ggiAMGInterface_H -#include "GAMGInterface.H" +#include "AMGInterface.H" #include "ggiLduInterface.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,12 +47,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class ggiGAMGInterface Declaration + Class ggiAMGInterface Declaration \*---------------------------------------------------------------------------*/ -class ggiGAMGInterface +class ggiAMGInterface : - public GAMGInterface, + public AMGInterface, virtual public ggiLduInterface { // Private data @@ -83,27 +83,14 @@ class ggiGAMGInterface // Private Member Functions //- Disallow default bitwise copy construct - ggiGAMGInterface(const ggiGAMGInterface&); + ggiAMGInterface(const ggiAMGInterface&); //- Disallow default bitwise assignment - void operator=(const ggiGAMGInterface&); - + void operator=(const ggiAMGInterface&); //- Init fast reduce void initFastReduce() const; - //- Fast reduce - // Note: contains global communications - // New, HJ, 24/Jun/2011 - template - tmp > fastReduce(const UList&) const; - - //- Expand data to zone size - // Note: contains global reduce. HJ, 15/May/2009 - // Obsolete. HJ, 24/Jun/2011 - template - tmp > expand(const UList&) const; - // Private static data @@ -121,7 +108,7 @@ public: //- Construct from fine level interface, // local and neighbour restrict addressing - ggiGAMGInterface + ggiAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -132,7 +119,7 @@ public: // Destructor - virtual ~ggiGAMGInterface(); + virtual ~ggiAMGInterface(); // Member Functions @@ -157,6 +144,12 @@ public: // Interface transfer functions + //- Fast reduce + // Note: contains global communications + // New, HJ, 24/Jun/2011 + template + tmp > fastReduce(const UList&) const; + //- Initialise interface data transfer virtual void initTransfer ( @@ -212,6 +205,13 @@ public: //- Return shadow interface virtual const ggiLduInterface& shadowInterface() const; + //- Return reference tor the ggiLduInterface from which this is + // agglomerated + const ggiLduInterface& fineGgiInterface() const + { + return fineGgiInterface_; + } + //- Return zone size virtual label zoneSize() const; @@ -242,7 +242,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "ggiGAMGInterfaceTemplates.C" +# include "ggiAMGInterfaceTemplates.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterfaceTemplates.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/ggiAMGInterface/ggiAMGInterfaceTemplates.C similarity index 90% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterfaceTemplates.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/ggiAMGInterface/ggiAMGInterfaceTemplates.C index 789f88d57..cfd851c9d 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterfaceTemplates.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/ggiAMGInterface/ggiAMGInterfaceTemplates.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "ggiGAMGInterface.H" +#include "ggiAMGInterface.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -33,7 +33,7 @@ namespace Foam // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -tmp > ggiGAMGInterface::fastReduce(const UList& ff) const +tmp > ggiAMGInterface::fastReduce(const UList& ff) const { // Algorithm // Local processor contains faceCells part of the zone and requires @@ -48,7 +48,7 @@ tmp > ggiGAMGInterface::fastReduce(const UList& ff) const { FatalErrorIn ( - "tmp > ggiGAMGInterface::fastReduce" + "tmp > ggiAMGInterface::fastReduce" "(" " const UList& ff" ") const" @@ -200,33 +200,6 @@ tmp > ggiGAMGInterface::fastReduce(const UList& ff) const } -template -tmp > ggiGAMGInterface::expand(const UList& pd) const -{ - // Expand interface data to complete zone - tmp > ted - ( - new Field(zoneSize(), pTraits::zero) - ); - Field& ed = ted(); - - const labelList& za = zoneAddressing(); - - forAll (za, i) - { - ed[za[i]] = pd[i]; - } - - // Reduce zone data if the patch is distributed - if (!localParallel()) - { - reduce(ed, sumOp >()); - } - - return ted; -} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/mixingPlaneGAMGInterface/mixingPlaneGAMGInterface.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/mixingPlaneAMGInterface/mixingPlaneAMGInterface.C similarity index 73% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/mixingPlaneGAMGInterface/mixingPlaneGAMGInterface.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/mixingPlaneAMGInterface/mixingPlaneAMGInterface.C index 4128ecd71..1251bc96e 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/mixingPlaneGAMGInterface/mixingPlaneGAMGInterface.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/mixingPlaneAMGInterface/mixingPlaneAMGInterface.C @@ -29,18 +29,18 @@ Contributor \*---------------------------------------------------------------------------*/ -#include "mixingPlaneGAMGInterface.H" +#include "mixingPlaneAMGInterface.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(mixingPlaneGAMGInterface, 0); + defineTypeNameAndDebug(mixingPlaneAMGInterface, 0); addToRunTimeSelectionTable ( - GAMGInterface, - mixingPlaneGAMGInterface, + AMGInterface, + mixingPlaneAMGInterface, lduInterface ); } @@ -48,7 +48,7 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::mixingPlaneGAMGInterface::mixingPlaneGAMGInterface +Foam::mixingPlaneAMGInterface::mixingPlaneAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -56,7 +56,7 @@ Foam::mixingPlaneGAMGInterface::mixingPlaneGAMGInterface const labelField& neighbourRestrictAddressing ) : - GAMGInterface(lduMesh), + AMGInterface(lduMesh), fineMixingPlaneInterface_ ( refCast(fineInterface) @@ -66,39 +66,39 @@ Foam::mixingPlaneGAMGInterface::mixingPlaneGAMGInterface // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::mixingPlaneGAMGInterface::~mixingPlaneGAMGInterface() +Foam::mixingPlaneAMGInterface::~mixingPlaneAMGInterface() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::tmp Foam::mixingPlaneGAMGInterface::agglomerateCoeffs +Foam::tmp Foam::mixingPlaneAMGInterface::agglomerateCoeffs ( const scalarField& fineCoeffs ) const { // AMG agglomeration missing - notImplemented("mixingPlaneGAMGInterface::agglomerateCoeffs"); + notImplemented("mixingPlaneAMGInterface::agglomerateCoeffs"); tmp tcoarseCoeffs(new scalarField(size(), 0.0)); return tcoarseCoeffs; } -bool Foam::mixingPlaneGAMGInterface::master() const +bool Foam::mixingPlaneAMGInterface::master() const { return fineMixingPlaneInterface_.master(); } -Foam::label Foam::mixingPlaneGAMGInterface::shadowIndex() const +Foam::label Foam::mixingPlaneAMGInterface::shadowIndex() const { return fineMixingPlaneInterface_.shadowIndex(); } const Foam::mixingPlaneLduInterface& -Foam::mixingPlaneGAMGInterface::shadowInterface() const +Foam::mixingPlaneAMGInterface::shadowInterface() const { return refCast ( @@ -107,11 +107,11 @@ Foam::mixingPlaneGAMGInterface::shadowInterface() const } -const Foam::labelListList& Foam::mixingPlaneGAMGInterface::addressing() const +const Foam::labelListList& Foam::mixingPlaneAMGInterface::addressing() const { FatalErrorIn ( - "const labelListList& mixingPlaneGAMGInterface::addressing() const" + "const labelListList& mixingPlaneAMGInterface::addressing() const" ) << "Requested fine addressing at coarse level" << abort(FatalError); @@ -119,30 +119,30 @@ const Foam::labelListList& Foam::mixingPlaneGAMGInterface::addressing() const } -const Foam::scalarListList& Foam::mixingPlaneGAMGInterface::weights() const +const Foam::scalarListList& Foam::mixingPlaneAMGInterface::weights() const { FatalErrorIn ( - "const labelListList& mixingPlaneGAMGInterface::weights() const" + "const labelListList& mixingPlaneAMGInterface::weights() const" ) << "Requested fine addressing at coarse level" << abort(FatalError); return scalarListList::null(); } -const Foam::tensorField& Foam::mixingPlaneGAMGInterface::forwardT() const +const Foam::tensorField& Foam::mixingPlaneAMGInterface::forwardT() const { return fineMixingPlaneInterface_.forwardT(); } -const Foam::tensorField& Foam::mixingPlaneGAMGInterface::reverseT() const +const Foam::tensorField& Foam::mixingPlaneAMGInterface::reverseT() const { return fineMixingPlaneInterface_.reverseT(); } -void Foam::mixingPlaneGAMGInterface::initTransfer +void Foam::mixingPlaneAMGInterface::initTransfer ( const Pstream::commsTypes commsType, const unallocLabelList& interfaceData @@ -152,7 +152,7 @@ void Foam::mixingPlaneGAMGInterface::initTransfer } -Foam::tmp Foam::mixingPlaneGAMGInterface::transfer +Foam::tmp Foam::mixingPlaneAMGInterface::transfer ( const Pstream::commsTypes, const unallocLabelList& interfaceData @@ -162,7 +162,7 @@ Foam::tmp Foam::mixingPlaneGAMGInterface::transfer } -void Foam::mixingPlaneGAMGInterface::initInternalFieldTransfer +void Foam::mixingPlaneAMGInterface::initInternalFieldTransfer ( const Pstream::commsTypes commsType, const unallocLabelList& iF @@ -172,7 +172,7 @@ void Foam::mixingPlaneGAMGInterface::initInternalFieldTransfer } -void Foam::mixingPlaneGAMGInterface::initInternalFieldTransfer +void Foam::mixingPlaneAMGInterface::initInternalFieldTransfer ( const Pstream::commsTypes commsType, const scalarField& iF @@ -183,7 +183,7 @@ void Foam::mixingPlaneGAMGInterface::initInternalFieldTransfer Foam::tmp -Foam::mixingPlaneGAMGInterface::internalFieldTransfer +Foam::mixingPlaneAMGInterface::internalFieldTransfer ( const Pstream::commsTypes, const unallocLabelList& @@ -194,7 +194,7 @@ Foam::mixingPlaneGAMGInterface::internalFieldTransfer Foam::tmp -Foam::mixingPlaneGAMGInterface::internalFieldTransfer +Foam::mixingPlaneAMGInterface::internalFieldTransfer ( const Pstream::commsTypes, const scalarField& diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/mixingPlaneGAMGInterface/mixingPlaneGAMGInterface.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/mixingPlaneAMGInterface/mixingPlaneAMGInterface.H similarity index 91% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/mixingPlaneGAMGInterface/mixingPlaneGAMGInterface.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/mixingPlaneAMGInterface/mixingPlaneAMGInterface.H index bddce10ea..80d2fa20c 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/mixingPlaneGAMGInterface/mixingPlaneGAMGInterface.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/mixingPlaneAMGInterface/mixingPlaneAMGInterface.H @@ -22,10 +22,10 @@ License along with foam-extend. If not, see . Class - Foam::mixingPlaneGAMGInterface + Foam::mixingPlaneAMGInterface Description - GAMG agglomerated mixingPlane interface. + AMG agglomerated mixingPlane interface. Author Martin Beaudoin, Hydro-Quebec, 2009. All rights reserved @@ -34,14 +34,14 @@ Contributor Hrvoje Jasak, Wikki Ltd. SourceFiles - mixingPlaneGAMGInterface.C + mixingPlaneAMGInterface.C \*---------------------------------------------------------------------------*/ -#ifndef mixingPlaneGAMGInterface_H -#define mixingPlaneGAMGInterface_H +#ifndef mixingPlaneAMGInterface_H +#define mixingPlaneAMGInterface_H -#include "GAMGInterface.H" +#include "AMGInterface.H" #include "mixingPlaneLduInterface.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,12 +50,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class mixingPlaneGAMGInterface Declaration + Class mixingPlaneAMGInterface Declaration \*---------------------------------------------------------------------------*/ -class mixingPlaneGAMGInterface +class mixingPlaneAMGInterface : - public GAMGInterface, + public AMGInterface, virtual public mixingPlaneLduInterface { // Private data @@ -68,10 +68,10 @@ class mixingPlaneGAMGInterface // Private Member Functions //- Disallow default bitwise copy construct - mixingPlaneGAMGInterface(const mixingPlaneGAMGInterface&); + mixingPlaneAMGInterface(const mixingPlaneAMGInterface&); //- Disallow default bitwise assignment - void operator=(const mixingPlaneGAMGInterface&); + void operator=(const mixingPlaneAMGInterface&); // Private static data @@ -90,7 +90,7 @@ public: //- Construct from fine level interface, // local and neighbour restrict addressing - mixingPlaneGAMGInterface + mixingPlaneAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -101,7 +101,7 @@ public: // Destructor - virtual ~mixingPlaneGAMGInterface(); + virtual ~mixingPlaneAMGInterface(); // Member Functions diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/processorAMGInterface/processorAMGInterface.C similarity index 93% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/processorAMGInterface/processorAMGInterface.C index 315c6e888..04285fd14 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/processorAMGInterface/processorAMGInterface.C @@ -23,18 +23,18 @@ License \*---------------------------------------------------------------------------*/ -#include "processorGAMGInterface.H" +#include "processorAMGInterface.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(processorGAMGInterface, 0); + defineTypeNameAndDebug(processorAMGInterface, 0); addToRunTimeSelectionTable ( - GAMGInterface, - processorGAMGInterface, + AMGInterface, + processorAMGInterface, lduInterface ); } @@ -42,7 +42,7 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::processorGAMGInterface::processorGAMGInterface +Foam::processorAMGInterface::processorAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -50,7 +50,7 @@ Foam::processorGAMGInterface::processorGAMGInterface const labelField& neighbourRestrictAddressing ) : - GAMGInterface(lduMesh), + AMGInterface(lduMesh), fineProcInterface_(refCast(fineInterface)) { // Make a lookup table of entries for owner/neighbour @@ -246,13 +246,13 @@ Foam::processorGAMGInterface::processorGAMGInterface // * * * * * * * * * * * * * * * * Desstructor * * * * * * * * * * * * * * * // -Foam::processorGAMGInterface::~processorGAMGInterface() +Foam::processorAMGInterface::~processorAMGInterface() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::processorGAMGInterface::initTransfer +void Foam::processorAMGInterface::initTransfer ( const Pstream::commsTypes commsType, const unallocLabelList& interfaceData @@ -262,7 +262,7 @@ void Foam::processorGAMGInterface::initTransfer } -Foam::tmp Foam::processorGAMGInterface::transfer +Foam::tmp Foam::processorAMGInterface::transfer ( const Pstream::commsTypes commsType, const unallocLabelList& interfaceData @@ -272,7 +272,7 @@ Foam::tmp Foam::processorGAMGInterface::transfer } -void Foam::processorGAMGInterface::initInternalFieldTransfer +void Foam::processorAMGInterface::initInternalFieldTransfer ( const Pstream::commsTypes commsType, const unallocLabelList& iF @@ -282,7 +282,7 @@ void Foam::processorGAMGInterface::initInternalFieldTransfer } -Foam::tmp Foam::processorGAMGInterface::internalFieldTransfer +Foam::tmp Foam::processorAMGInterface::internalFieldTransfer ( const Pstream::commsTypes commsType, const unallocLabelList& diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/processorAMGInterface/processorAMGInterface.H similarity index 89% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/processorAMGInterface/processorAMGInterface.H index 7e171af77..04f48f7ea 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/processorAMGInterface/processorAMGInterface.H @@ -22,21 +22,21 @@ License along with foam-extend. If not, see . Class - Foam::processorGAMGInterface + Foam::processorAMGInterface Description - GAMG agglomerated processor interface. + AMG agglomerated processor interface. SourceFiles - processorGAMGInterface.C - processorGAMGInterfaceTemplates.C + processorAMGInterface.C + processorAMGInterfaceTemplates.C \*---------------------------------------------------------------------------*/ -#ifndef processorGAMGInterface_H -#define processorGAMGInterface_H +#ifndef processorAMGInterface_H +#define processorAMGInterface_H -#include "GAMGInterface.H" +#include "AMGInterface.H" #include "processorLduInterface.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,12 +45,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class processorGAMGInterface Declaration + Class processorAMGInterface Declaration \*---------------------------------------------------------------------------*/ -class processorGAMGInterface +class processorAMGInterface : - public GAMGInterface, + public AMGInterface, public processorLduInterface { // Private data @@ -63,10 +63,10 @@ class processorGAMGInterface // Private Member Functions //- Disallow default bitwise copy construct - processorGAMGInterface(const processorGAMGInterface&); + processorAMGInterface(const processorAMGInterface&); //- Disallow default bitwise assignment - void operator=(const processorGAMGInterface&); + void operator=(const processorAMGInterface&); public: @@ -78,7 +78,7 @@ public: //- Construct from fine-level interface, // local and neighbour restrict addressing - processorGAMGInterface + processorAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -89,7 +89,7 @@ public: // Destructor - virtual ~processorGAMGInterface(); + virtual ~processorAMGInterface(); // Member Functions diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/regionCoupleGAMGInterface/regionCoupleGAMGInterface.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/regionCoupleAMGInterface/regionCoupleAMGInterface.C similarity index 87% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/regionCoupleGAMGInterface/regionCoupleGAMGInterface.C rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/regionCoupleAMGInterface/regionCoupleAMGInterface.C index ea6dd9d57..a543ece50 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/regionCoupleGAMGInterface/regionCoupleGAMGInterface.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/regionCoupleAMGInterface/regionCoupleAMGInterface.C @@ -23,18 +23,18 @@ License \*---------------------------------------------------------------------------*/ -#include "regionCoupleGAMGInterface.H" +#include "regionCoupleAMGInterface.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(regionCoupleGAMGInterface, 0); + defineTypeNameAndDebug(regionCoupleAMGInterface, 0); addToRunTimeSelectionTable ( - GAMGInterface, - regionCoupleGAMGInterface, + AMGInterface, + regionCoupleAMGInterface, lduInterface ); } @@ -42,7 +42,7 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::regionCoupleGAMGInterface::regionCoupleGAMGInterface +Foam::regionCoupleAMGInterface::regionCoupleAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -50,7 +50,7 @@ Foam::regionCoupleGAMGInterface::regionCoupleGAMGInterface const labelField& neighbourRestrictAddressing ) : - ggiGAMGInterface + ggiAMGInterface ( lduMesh, fineInterface, @@ -63,7 +63,7 @@ Foam::regionCoupleGAMGInterface::regionCoupleGAMGInterface // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::regionCoupleGAMGInterface::~regionCoupleGAMGInterface() +Foam::regionCoupleAMGInterface::~regionCoupleAMGInterface() {} diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/regionCoupleGAMGInterface/regionCoupleGAMGInterface.H b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/regionCoupleAMGInterface/regionCoupleAMGInterface.H similarity index 85% rename from src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/regionCoupleGAMGInterface/regionCoupleGAMGInterface.H rename to src/foam/matrices/lduMatrix/solvers/AMG/interfaces/regionCoupleAMGInterface/regionCoupleAMGInterface.H index 39987b3be..e286e54c3 100644 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/regionCoupleGAMGInterface/regionCoupleGAMGInterface.H +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/regionCoupleAMGInterface/regionCoupleAMGInterface.H @@ -22,23 +22,23 @@ License along with foam-extend. If not, see . Class - Foam::regionCoupleGAMGInterface + Foam::regionCoupleAMGInterface Description - GAMG agglomerated regionCouple interface. + AMG agglomerated regionCouple interface. Author Hrvoje Jasak, Wikki Ltd. All rights reserved. SourceFiles - regionCoupleGAMGInterface.C + regionCoupleAMGInterface.C \*---------------------------------------------------------------------------*/ -#ifndef regionCoupleGAMGInterface_H -#define regionCoupleGAMGInterface_H +#ifndef regionCoupleAMGInterface_H +#define regionCoupleAMGInterface_H -#include "ggiGAMGInterface.H" +#include "ggiAMGInterface.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,12 +46,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class regionCoupleGAMGInterface Declaration + Class regionCoupleAMGInterface Declaration \*---------------------------------------------------------------------------*/ -class regionCoupleGAMGInterface +class regionCoupleAMGInterface : - public ggiGAMGInterface + public ggiAMGInterface { // Private data @@ -70,7 +70,7 @@ public: //- Construct from fine level interface, // local and neighbour restrict addressing - regionCoupleGAMGInterface + regionCoupleAMGInterface ( const lduPrimitiveMesh& lduMesh, const lduInterface& fineInterface, @@ -81,7 +81,7 @@ public: // Destructor - virtual ~regionCoupleGAMGInterface(); + virtual ~regionCoupleAMGInterface(); // Member Functions diff --git a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceTemplates.C b/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceTemplates.C deleted file mode 100644 index 9c9b2a732..000000000 --- a/src/foam/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceTemplates.C +++ /dev/null @@ -1,101 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 3.2 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "GAMGInterface.H" -#include "scalarCoeffField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -template -Foam::tmp > Foam::GAMGInterface::interfaceInternalField -( - const UList& iF -) const -{ - tmp > tresult(new Field(size())); - Field& result = tresult(); - - forAll (result, elemI) - { - result[elemI] = iF[faceCells_[elemI]]; - } - - return tresult; -} - -template -Foam::tmp > Foam::GAMGInterface::agglomerateBlockCoeffs -( - const Foam::CoeffField& fineCoeffs -) const -{ - tmp > tcoarseCoeffs(new CoeffField(size())); - CoeffField& coarseCoeffs = tcoarseCoeffs(); - - typedef CoeffField TypeCoeffField; - - typedef typename TypeCoeffField::linearTypeField linearTypeField; - typedef typename TypeCoeffField::squareTypeField squareTypeField; - - if (fineCoeffs.activeType() == blockCoeffBase::SQUARE) - { - squareTypeField& activeCoarseCoeffs = coarseCoeffs.asSquare(); - const squareTypeField& activeFineCoeffs = fineCoeffs.asSquare(); - - activeCoarseCoeffs *= 0.0; - - // Added weights to account for non-integral matching - forAll(restrictAddressing_, ffi) - { - activeCoarseCoeffs[restrictAddressing_[ffi]] += - restrictWeights_[ffi]*activeFineCoeffs[fineAddressing_[ffi]]; - } - } - else if (fineCoeffs.activeType() == blockCoeffBase::LINEAR) - { - linearTypeField& activeCoarseCoeffs = coarseCoeffs.asLinear(); - const linearTypeField& activeFineCoeffs = fineCoeffs.asLinear(); - - activeCoarseCoeffs *= 0.0; - - // Added weights to account for non-integral matching - forAll(restrictAddressing_, ffi) - { - activeCoarseCoeffs[restrictAddressing_[ffi]] += - restrictWeights_[ffi]*activeFineCoeffs[fineAddressing_[ffi]]; - } - } - - return tcoarseCoeffs; -} - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lduSolvers/amg/amgPolicy/pamgPolicy.C b/src/lduSolvers/amg/amgPolicy/pamgPolicy.C index 77281f703..2ef286ef1 100644 --- a/src/lduSolvers/amg/amgPolicy/pamgPolicy.C +++ b/src/lduSolvers/amg/amgPolicy/pamgPolicy.C @@ -36,7 +36,7 @@ Author #include "amgMatrix.H" #include "boolList.H" #include "addToRunTimeSelectionTable.H" -#include "GAMGInterfaceField.H" +#include "AMGInterfaceField.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -634,7 +634,7 @@ Foam::autoPtr Foam::pamgPolicy::restrictMatrix } } - // Create GAMG interfaces + // Create AMG interfaces forAll (interfaceFields, intI) { if (interfaceFields.set(intI)) @@ -645,7 +645,7 @@ Foam::autoPtr Foam::pamgPolicy::restrictMatrix coarseInterfaces.set ( intI, - GAMGInterface::New + AMGInterface::New ( *coarseAddrPtr, fineInterface, @@ -660,19 +660,23 @@ Foam::autoPtr Foam::pamgPolicy::restrictMatrix { if (interfaceFields.set(intI)) { - const GAMGInterface& coarseInterface = - refCast(coarseInterfaces[intI]); + const AMGInterface& coarseInterface = + refCast(coarseInterfaces[intI]); coarseInterfaceFields.set ( intI, - GAMGInterfaceField::New + AMGInterfaceField::New ( coarseInterface, interfaceFields[intI] ).ptr() ); + // Note: scalar agglomeration is done by the interface + // (always scalar) but in the block matrix it is done by a + // templated block interface field + // HJ, 16/Mar/2016 coarseBouCoeffs.set ( intI,