Feature: Rewrite of GGI comms on AMG agglomeration
This commit is contained in:
parent
c076f28ce1
commit
3143f456cc
17 changed files with 501 additions and 279 deletions
|
@ -950,6 +950,7 @@ Foam::BlockMatrixAgglomeration<Type>::restrictMatrix() const
|
||||||
AMGInterface::New
|
AMGInterface::New
|
||||||
(
|
(
|
||||||
coarseAddrPtr(),
|
coarseAddrPtr(),
|
||||||
|
coarseInterfaces,
|
||||||
fineInterface,
|
fineInterface,
|
||||||
fineInterface.interfaceInternalField(agglomIndex_),
|
fineInterface.interfaceInternalField(agglomIndex_),
|
||||||
fineInterfaceAddr[intI]
|
fineInterfaceAddr[intI]
|
||||||
|
|
|
@ -292,6 +292,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
|
||||||
AMGInterface::New
|
AMGInterface::New
|
||||||
(
|
(
|
||||||
meshLevels_[fineLevelIndex],
|
meshLevels_[fineLevelIndex],
|
||||||
|
coarseInterfaces,
|
||||||
fineInterfaces[inti],
|
fineInterfaces[inti],
|
||||||
fineInterfaces[inti].interfaceInternalField
|
fineInterfaces[inti].interfaceInternalField
|
||||||
(
|
(
|
||||||
|
|
|
@ -129,12 +129,14 @@ public:
|
||||||
lduInterface,
|
lduInterface,
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
lduMesh,
|
lduMesh,
|
||||||
|
coarseInterfaces,
|
||||||
fineInterface,
|
fineInterface,
|
||||||
localRestrictAddressing,
|
localRestrictAddressing,
|
||||||
neighbourRestrictAddressing
|
neighbourRestrictAddressing
|
||||||
|
@ -149,6 +151,7 @@ public:
|
||||||
static autoPtr<AMGInterface> New
|
static autoPtr<AMGInterface> New
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
@ -165,6 +168,11 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~AMGInterface()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
|
@ -32,6 +32,7 @@ License
|
||||||
Foam::autoPtr<Foam::AMGInterface> Foam::AMGInterface::New
|
Foam::autoPtr<Foam::AMGInterface> Foam::AMGInterface::New
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
@ -46,11 +47,14 @@ Foam::autoPtr<Foam::AMGInterface> Foam::AMGInterface::New
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"AMGInterface::New"
|
"AMGInterface::New\n"
|
||||||
"(const lduPrimitiveMesh& lduMesh,"
|
"(\n"
|
||||||
"const lduInterface& fineInterface,"
|
" const lduPrimitiveMesh& lduMesh,\n"
|
||||||
"const labelField& localRestrictAddressing,"
|
" const lduInterfacePtrsList& coarseInterfaces,\n"
|
||||||
"const labelField& neighbourRestrictAddressing)"
|
" const lduInterface& fineInterface,\n"
|
||||||
|
" const labelField& localRestrictAddressing,\n"
|
||||||
|
" const labelField& neighbourRestrictAddressing\n"
|
||||||
|
")"
|
||||||
) << "Unknown AMGInterface type " << coupleType << ".\n"
|
) << "Unknown AMGInterface type " << coupleType << ".\n"
|
||||||
<< "Valid AMGInterface types are :"
|
<< "Valid AMGInterface types are :"
|
||||||
<< lduInterfaceConstructorTablePtr_->sortedToc()
|
<< lduInterfaceConstructorTablePtr_->sortedToc()
|
||||||
|
@ -62,6 +66,7 @@ Foam::autoPtr<Foam::AMGInterface> Foam::AMGInterface::New
|
||||||
cstrIter()
|
cstrIter()
|
||||||
(
|
(
|
||||||
lduMesh,
|
lduMesh,
|
||||||
|
coarseInterfaces,
|
||||||
fineInterface,
|
fineInterface,
|
||||||
localRestrictAddressing,
|
localRestrictAddressing,
|
||||||
neighbourRestrictAddressing
|
neighbourRestrictAddressing
|
||||||
|
|
|
@ -45,6 +45,7 @@ namespace Foam
|
||||||
Foam::cyclicAMGInterface::cyclicAMGInterface
|
Foam::cyclicAMGInterface::cyclicAMGInterface
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
|
|
@ -81,6 +81,7 @@ public:
|
||||||
cyclicAMGInterface
|
cyclicAMGInterface
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
|
|
@ -45,6 +45,7 @@ namespace Foam
|
||||||
Foam::cyclicGGIAMGInterface::cyclicGGIAMGInterface
|
Foam::cyclicGGIAMGInterface::cyclicGGIAMGInterface
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
@ -53,6 +54,7 @@ Foam::cyclicGGIAMGInterface::cyclicGGIAMGInterface
|
||||||
ggiAMGInterface
|
ggiAMGInterface
|
||||||
(
|
(
|
||||||
lduMesh,
|
lduMesh,
|
||||||
|
coarseInterfaces,
|
||||||
fineInterface,
|
fineInterface,
|
||||||
localRestrictAddressing,
|
localRestrictAddressing,
|
||||||
neighbourRestrictAddressing
|
neighbourRestrictAddressing
|
||||||
|
|
|
@ -67,6 +67,7 @@ public:
|
||||||
cyclicGGIAMGInterface
|
cyclicGGIAMGInterface
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -68,6 +68,11 @@ class ggiAMGInterface
|
||||||
//- Zone addressing
|
//- Zone addressing
|
||||||
labelList zoneAddressing_;
|
labelList zoneAddressing_;
|
||||||
|
|
||||||
|
//- Processor master faces
|
||||||
|
// Per-processor insertion list of local faces into global zone
|
||||||
|
// The list is created on the master side and passed onto the slave
|
||||||
|
// to allow the slave to insert faces in the same order
|
||||||
|
labelListList procMasterFaces_;
|
||||||
|
|
||||||
// Parallel communication
|
// Parallel communication
|
||||||
|
|
||||||
|
@ -110,15 +115,15 @@ public:
|
||||||
ggiAMGInterface
|
ggiAMGInterface
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~ggiAMGInterface();
|
||||||
virtual ~ggiAMGInterface();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
@ -240,6 +245,9 @@ public:
|
||||||
//- Is the patch localised on a single processor
|
//- Is the patch localised on a single processor
|
||||||
virtual bool localParallel() const;
|
virtual bool localParallel() const;
|
||||||
|
|
||||||
|
//- Processor master face insertion list
|
||||||
|
const labelListList& procMasterFaces() const;
|
||||||
|
|
||||||
//- Return weights
|
//- Return weights
|
||||||
virtual const scalarListList& weights() const;
|
virtual const scalarListList& weights() const;
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ namespace Foam
|
||||||
Foam::mixingPlaneAMGInterface::mixingPlaneAMGInterface
|
Foam::mixingPlaneAMGInterface::mixingPlaneAMGInterface
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
|
|
@ -93,6 +93,7 @@ public:
|
||||||
mixingPlaneAMGInterface
|
mixingPlaneAMGInterface
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
|
|
@ -45,6 +45,7 @@ namespace Foam
|
||||||
Foam::processorAMGInterface::processorAMGInterface
|
Foam::processorAMGInterface::processorAMGInterface
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
|
|
@ -81,6 +81,7 @@ public:
|
||||||
processorAMGInterface
|
processorAMGInterface
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
|
|
@ -45,6 +45,7 @@ namespace Foam
|
||||||
Foam::regionCoupleAMGInterface::regionCoupleAMGInterface
|
Foam::regionCoupleAMGInterface::regionCoupleAMGInterface
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
@ -53,6 +54,7 @@ Foam::regionCoupleAMGInterface::regionCoupleAMGInterface
|
||||||
ggiAMGInterface
|
ggiAMGInterface
|
||||||
(
|
(
|
||||||
lduMesh,
|
lduMesh,
|
||||||
|
coarseInterfaces,
|
||||||
fineInterface,
|
fineInterface,
|
||||||
localRestrictAddressing,
|
localRestrictAddressing,
|
||||||
neighbourRestrictAddressing
|
neighbourRestrictAddressing
|
||||||
|
|
|
@ -73,6 +73,7 @@ public:
|
||||||
regionCoupleAMGInterface
|
regionCoupleAMGInterface
|
||||||
(
|
(
|
||||||
const lduPrimitiveMesh& lduMesh,
|
const lduPrimitiveMesh& lduMesh,
|
||||||
|
const lduInterfacePtrsList& coarseInterfaces,
|
||||||
const lduInterface& fineInterface,
|
const lduInterface& fineInterface,
|
||||||
const labelField& localRestrictAddressing,
|
const labelField& localRestrictAddressing,
|
||||||
const labelField& neighbourRestrictAddressing
|
const labelField& neighbourRestrictAddressing
|
||||||
|
|
|
@ -648,6 +648,7 @@ Foam::autoPtr<Foam::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
||||||
AMGInterface::New
|
AMGInterface::New
|
||||||
(
|
(
|
||||||
*coarseAddrPtr,
|
*coarseAddrPtr,
|
||||||
|
coarseInterfaces,
|
||||||
fineInterface,
|
fineInterface,
|
||||||
fineInterface.interfaceInternalField(child_),
|
fineInterface.interfaceInternalField(child_),
|
||||||
fineInterfaceAddr[intI]
|
fineInterfaceAddr[intI]
|
||||||
|
|
Reference in a new issue