GAMG to AMG
This commit is contained in:
parent
20a8ffac25
commit
bd97dba10b
49 changed files with 516 additions and 578 deletions
|
@ -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],
|
|
@ -45,7 +45,7 @@ namespace Foam
|
|||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class pairGAMGAgglomeration Declaration
|
||||
Class pairGAMGAgglomeration Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class pairGAMGAgglomeration
|
|
@ -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<GAMGInterface>(const_cast<lduInterface&>
|
||||
refCast<AMGInterface>(const_cast<lduInterface&>
|
||||
(
|
||||
prevInterLevel[inti]
|
||||
)).combine(refCast<const GAMGInterface>(curInterLevel[inti]));
|
||||
)).combine(refCast<const AMGInterface>(curInterLevel[inti]));
|
||||
|
||||
delete curInterLevel(inti);
|
||||
}
|
|
@ -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 GAMGInterface>
|
||||
const AMGInterface& coarseInterface =
|
||||
refCast<const AMGInterface>
|
||||
(
|
||||
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]
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
|
@ -22,22 +22,22 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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<GAMGInterfaceField> New
|
||||
static autoPtr<AMGInterfaceField> 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)
|
||||
{}
|
||||
};
|
||||
|
|
@ -23,13 +23,13 @@ License
|
|||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "GAMGInterfaceField.H"
|
||||
#include "AMGInterfaceField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::GAMGInterfaceField> Foam::GAMGInterfaceField::New
|
||||
Foam::autoPtr<Foam::AMGInterfaceField> Foam::AMGInterfaceField::New
|
||||
(
|
||||
const GAMGInterface& GAMGCp,
|
||||
const AMGInterface& AMGCp,
|
||||
const lduInterfaceField& fineInterface
|
||||
)
|
||||
{
|
||||
|
@ -42,16 +42,16 @@ Foam::autoPtr<Foam::GAMGInterfaceField> 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<GAMGInterfaceField>(cstrIter()(GAMGCp, fineInterface));
|
||||
return autoPtr<AMGInterfaceField>(cstrIter()(AMGCp, fineInterface));
|
||||
}
|
||||
|
||||
|
|
@ -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<const cyclicGAMGInterface>(GAMGCp)),
|
||||
AMGInterfaceField(AMGCp, fineInterface),
|
||||
cyclicInterface_(refCast<const cyclicAMGInterface>(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,
|
|
@ -22,21 +22,21 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
|
@ -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()
|
||||
{}
|
||||
|
||||
|
|
@ -22,24 +22,24 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
|
|
@ -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<const ggiGAMGInterface>(GAMGCp)),
|
||||
AMGInterfaceField(AMGCp, fineInterface),
|
||||
ggiInterface_(refCast<const ggiAMGInterface>(AMGCp)),
|
||||
doTransform_(false),
|
||||
rank_(0),
|
||||
transferBuffer_()
|
||||
rank_(0)
|
||||
{
|
||||
const ggiLduInterfaceField& p =
|
||||
refCast<const ggiLduInterfaceField>(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];
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,24 +22,24 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
|
@ -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<const mixingPlaneGAMGInterface>(GAMGCp)),
|
||||
AMGInterfaceField(AMGCp, fineInterface),
|
||||
mixingPlaneInterface_(refCast<const mixingPlaneAMGInterface>(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,
|
|
@ -22,10 +22,10 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
|
@ -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<const processorGAMGInterface>(GAMGCp)),
|
||||
AMGInterfaceField(AMGCp, fineInterfaceField),
|
||||
procInterface_(refCast<const processorAMGInterface>(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,
|
|
@ -22,21 +22,21 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
|
@ -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<const regionCoupleGAMGInterface>(GAMGCp))
|
||||
ggiAMGInterfaceField(AMGCp, fineInterface),
|
||||
regionCoupleInterface_(refCast<const regionCoupleAMGInterface>(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,
|
|
@ -22,24 +22,24 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
|
@ -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::labelField> Foam::GAMGInterface::interfaceInternalField
|
||||
Foam::tmp<Foam::labelField> Foam::AMGInterface::interfaceInternalField
|
||||
(
|
||||
const unallocLabelList& internalData
|
||||
) const
|
||||
|
@ -58,7 +58,7 @@ Foam::tmp<Foam::labelField> Foam::GAMGInterface::interfaceInternalField
|
|||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::GAMGInterface::agglomerateCoeffs
|
||||
Foam::tmp<Foam::scalarField> Foam::AMGInterface::agglomerateCoeffs
|
||||
(
|
||||
const scalarField& fineCoeffs
|
||||
) const
|
|
@ -22,10 +22,10 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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<GAMGInterface> New
|
||||
static autoPtr<AMGInterface> 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<class Type>
|
||||
tmp<Field<Type> > 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<scalarField> agglomerateCoeffs
|
||||
|
@ -203,13 +221,10 @@ public:
|
|||
const scalarField& fineCoeffs
|
||||
) const;
|
||||
|
||||
// Klas Jareteg: 2013-02-06
|
||||
//- Agglomerating for the CoeffField fine-level coefficients
|
||||
template<class Type>
|
||||
tmp<CoeffField<Type> > agglomerateBlockCoeffs
|
||||
(
|
||||
const CoeffField<Type>& 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
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "AMGInterface.H"
|
||||
#include "scalarCoeffField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> > Foam::AMGInterface::interfaceInternalField
|
||||
(
|
||||
const UList<Type>& iF
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type> > tresult(new Field<Type>(size()));
|
||||
Field<Type>& result = tresult();
|
||||
|
||||
forAll (result, elemI)
|
||||
{
|
||||
result[elemI] = iF[faceCells_[elemI]];
|
||||
}
|
||||
|
||||
return tresult;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
@ -23,13 +23,13 @@ License
|
|||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "GAMGInterface.H"
|
||||
#include "AMGInterface.H"
|
||||
#include "lduMatrix.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New
|
||||
Foam::autoPtr<Foam::AMGInterface> Foam::AMGInterface::New
|
||||
(
|
||||
const lduPrimitiveMesh& lduMesh,
|
||||
const lduInterface& fineInterface,
|
||||
|
@ -46,18 +46,18 @@ Foam::autoPtr<Foam::GAMGInterface> 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<GAMGInterface>
|
||||
return autoPtr<AMGInterface>
|
||||
(
|
||||
cstrIter()
|
||||
(
|
|
@ -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<const cyclicLduInterface>(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::labelField> Foam::cyclicGAMGInterface::transfer
|
||||
Foam::tmp<Foam::labelField> Foam::cyclicAMGInterface::transfer
|
||||
(
|
||||
const Pstream::commsTypes,
|
||||
const unallocLabelList& interfaceData
|
||||
|
@ -248,7 +248,7 @@ Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::transfer
|
|||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::internalFieldTransfer
|
||||
Foam::tmp<Foam::labelField> Foam::cyclicAMGInterface::internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes,
|
||||
const unallocLabelList& iF
|
|
@ -22,20 +22,20 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
|
@ -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()
|
||||
{}
|
||||
|
||||
|
|
@ -22,24 +22,24 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
|
|
@ -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<const ggiLduInterface>(fineInterface)),
|
||||
zoneSize_(0),
|
||||
zoneAddressing_(),
|
||||
|
@ -597,17 +597,21 @@ Foam::ggiGAMGInterface::ggiGAMGInterface
|
|||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::ggiGAMGInterface::~ggiGAMGInterface()
|
||||
Foam::ggiAMGInterface::~ggiAMGInterface()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::ggiGAMGInterface::agglomerateCoeffs
|
||||
Foam::tmp<Foam::scalarField> 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::scalarField> 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<const ggiLduInterface>(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::labelField> Foam::ggiGAMGInterface::transfer
|
||||
Foam::tmp<Foam::labelField> Foam::ggiAMGInterface::transfer
|
||||
(
|
||||
const Pstream::commsTypes,
|
||||
const unallocLabelList& interfaceData
|
||||
|
@ -744,7 +748,7 @@ Foam::tmp<Foam::labelField> 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::labelField> Foam::ggiGAMGInterface::internalFieldTransfer
|
||||
Foam::tmp<Foam::labelField> Foam::ggiAMGInterface::internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes,
|
||||
const unallocLabelList&
|
||||
|
@ -765,7 +769,7 @@ Foam::tmp<Foam::labelField> 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::scalarField> Foam::ggiGAMGInterface::internalFieldTransfer
|
||||
Foam::tmp<Foam::scalarField> Foam::ggiAMGInterface::internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes,
|
||||
const scalarField&
|
|
@ -22,23 +22,23 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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<class Type>
|
||||
tmp<Field<Type> > fastReduce(const UList<Type>&) const;
|
||||
|
||||
//- Expand data to zone size
|
||||
// Note: contains global reduce. HJ, 15/May/2009
|
||||
// Obsolete. HJ, 24/Jun/2011
|
||||
template<class Type>
|
||||
tmp<Field<Type> > expand(const UList<Type>&) 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<class Type>
|
||||
tmp<Field<Type> > fastReduce(const UList<Type>&) 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
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
@ -23,7 +23,7 @@ License
|
|||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "ggiGAMGInterface.H"
|
||||
#include "ggiAMGInterface.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace Foam
|
|||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > ggiGAMGInterface::fastReduce(const UList<Type>& ff) const
|
||||
tmp<Field<Type> > ggiAMGInterface::fastReduce(const UList<Type>& ff) const
|
||||
{
|
||||
// Algorithm
|
||||
// Local processor contains faceCells part of the zone and requires
|
||||
|
@ -48,7 +48,7 @@ tmp<Field<Type> > ggiGAMGInterface::fastReduce(const UList<Type>& ff) const
|
|||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"tmp<Field<Type> > ggiGAMGInterface::fastReduce"
|
||||
"tmp<Field<Type> > ggiAMGInterface::fastReduce"
|
||||
"("
|
||||
" const UList<Type>& ff"
|
||||
") const"
|
||||
|
@ -200,33 +200,6 @@ tmp<Field<Type> > ggiGAMGInterface::fastReduce(const UList<Type>& ff) const
|
|||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > ggiGAMGInterface::expand(const UList<Type>& pd) const
|
||||
{
|
||||
// Expand interface data to complete zone
|
||||
tmp<Field<Type> > ted
|
||||
(
|
||||
new Field<Type>(zoneSize(), pTraits<Type>::zero)
|
||||
);
|
||||
Field<Type>& 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<Field<Type> >());
|
||||
}
|
||||
|
||||
return ted;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
|
@ -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<const mixingPlaneLduInterface>(fineInterface)
|
||||
|
@ -66,39 +66,39 @@ Foam::mixingPlaneGAMGInterface::mixingPlaneGAMGInterface
|
|||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::mixingPlaneGAMGInterface::~mixingPlaneGAMGInterface()
|
||||
Foam::mixingPlaneAMGInterface::~mixingPlaneAMGInterface()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::mixingPlaneGAMGInterface::agglomerateCoeffs
|
||||
Foam::tmp<Foam::scalarField> Foam::mixingPlaneAMGInterface::agglomerateCoeffs
|
||||
(
|
||||
const scalarField& fineCoeffs
|
||||
) const
|
||||
{
|
||||
// AMG agglomeration missing
|
||||
notImplemented("mixingPlaneGAMGInterface::agglomerateCoeffs");
|
||||
notImplemented("mixingPlaneAMGInterface::agglomerateCoeffs");
|
||||
tmp<scalarField> 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<const mixingPlaneLduInterface>
|
||||
(
|
||||
|
@ -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::labelField> Foam::mixingPlaneGAMGInterface::transfer
|
||||
Foam::tmp<Foam::labelField> Foam::mixingPlaneAMGInterface::transfer
|
||||
(
|
||||
const Pstream::commsTypes,
|
||||
const unallocLabelList& interfaceData
|
||||
|
@ -162,7 +162,7 @@ Foam::tmp<Foam::labelField> 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::labelField>
|
||||
Foam::mixingPlaneGAMGInterface::internalFieldTransfer
|
||||
Foam::mixingPlaneAMGInterface::internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes,
|
||||
const unallocLabelList&
|
||||
|
@ -194,7 +194,7 @@ Foam::mixingPlaneGAMGInterface::internalFieldTransfer
|
|||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::mixingPlaneGAMGInterface::internalFieldTransfer
|
||||
Foam::mixingPlaneAMGInterface::internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes,
|
||||
const scalarField&
|
|
@ -22,10 +22,10 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
|
@ -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<const processorLduInterface>(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::labelField> Foam::processorGAMGInterface::transfer
|
||||
Foam::tmp<Foam::labelField> Foam::processorAMGInterface::transfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const unallocLabelList& interfaceData
|
||||
|
@ -272,7 +272,7 @@ Foam::tmp<Foam::labelField> 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::labelField> Foam::processorGAMGInterface::internalFieldTransfer
|
||||
Foam::tmp<Foam::labelField> Foam::processorAMGInterface::internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const unallocLabelList&
|
|
@ -22,21 +22,21 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
|
@ -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()
|
||||
{}
|
||||
|
||||
|
|
@ -22,23 +22,23 @@ License
|
|||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "GAMGInterface.H"
|
||||
#include "scalarCoeffField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> > Foam::GAMGInterface::interfaceInternalField
|
||||
(
|
||||
const UList<Type>& iF
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type> > tresult(new Field<Type>(size()));
|
||||
Field<Type>& result = tresult();
|
||||
|
||||
forAll (result, elemI)
|
||||
{
|
||||
result[elemI] = iF[faceCells_[elemI]];
|
||||
}
|
||||
|
||||
return tresult;
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::CoeffField<Type> > Foam::GAMGInterface::agglomerateBlockCoeffs
|
||||
(
|
||||
const Foam::CoeffField<Type>& fineCoeffs
|
||||
) const
|
||||
{
|
||||
tmp<CoeffField<Type> > tcoarseCoeffs(new CoeffField<Type>(size()));
|
||||
CoeffField<Type>& coarseCoeffs = tcoarseCoeffs();
|
||||
|
||||
typedef CoeffField<Type> 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
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
@ -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::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
|||
}
|
||||
}
|
||||
|
||||
// Create GAMG interfaces
|
||||
// Create AMG interfaces
|
||||
forAll (interfaceFields, intI)
|
||||
{
|
||||
if (interfaceFields.set(intI))
|
||||
|
@ -645,7 +645,7 @@ Foam::autoPtr<Foam::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
|||
coarseInterfaces.set
|
||||
(
|
||||
intI,
|
||||
GAMGInterface::New
|
||||
AMGInterface::New
|
||||
(
|
||||
*coarseAddrPtr,
|
||||
fineInterface,
|
||||
|
@ -660,19 +660,23 @@ Foam::autoPtr<Foam::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
|||
{
|
||||
if (interfaceFields.set(intI))
|
||||
{
|
||||
const GAMGInterface& coarseInterface =
|
||||
refCast<const GAMGInterface>(coarseInterfaces[intI]);
|
||||
const AMGInterface& coarseInterface =
|
||||
refCast<const AMGInterface>(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,
|
||||
|
|
Reference in a new issue