SAMG interface updates: WIP

This commit is contained in:
Hrvoje Jasak 2017-05-22 15:07:00 +01:00
parent ea89a08f66
commit a14b7c2b03
5 changed files with 56 additions and 6 deletions

View file

@ -26,6 +26,7 @@ License
#include "processorFvPatch.H" #include "processorFvPatch.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "transformField.H" #include "transformField.H"
#include "crMatrix.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -174,6 +175,35 @@ tmp<labelField> processorFvPatch::internalFieldTransfer
} }
void processorFvPatch::initProlongationTransfer
(
const Pstream::commsTypes commsType,
const crMatrix& P
) const
{
// Select the part of the prolongation matrix to send
// Send prolongation matrix
Pout<< "HJ, in send for processorFvPatch" << endl;
}
tmp<crMatrix> processorFvPatch::prolongationTransfer
(
const Pstream::commsTypes commsType,
const crMatrix& P
) const
{
// Receive and return prolongation matrix
Pout<< "HJ, in receive for processorFvPatch" << endl;
// Dummy
tmp<crMatrix> tcr(new crMatrix(5, 5, labelList(5)));
return tcr;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View file

@ -185,6 +185,22 @@ public:
const Pstream::commsTypes commsType, const Pstream::commsTypes commsType,
const unallocLabelList& internalData const unallocLabelList& internalData
) const; ) const;
//- Initialise transfer of prolongation matrix to the interface
virtual void initProlongationTransfer
(
const Pstream::commsTypes commsType,
const crMatrix& iF
) const;
//- Transfer and return prolongation matrix adjacent to
// the interface
virtual tmp<crMatrix> prolongationTransfer
(
const Pstream::commsTypes commsType,
const crMatrix& iF
) const;
}; };

View file

@ -46,7 +46,7 @@ Foam::lduInterface::~lduInterface()
Foam::tmp<Foam::crMatrix> Foam::lduInterface::prolongationTransfer Foam::tmp<Foam::crMatrix> Foam::lduInterface::prolongationTransfer
( (
const Pstream::commsTypes commsType, const Pstream::commsTypes commsType,
const crMatrix& iF const crMatrix& P
) const ) const
{ {
notImplemented notImplemented
@ -54,9 +54,13 @@ Foam::tmp<Foam::crMatrix> Foam::lduInterface::prolongationTransfer
"tmp<crMatrix> lduInterface::prolongationTransfer\n" "tmp<crMatrix> lduInterface::prolongationTransfer\n"
"(\n" "(\n"
" const Pstream::commsTypes commsType,\n" " const Pstream::commsTypes commsType,\n"
" const crMatrix& iF\n" " const crMatrix& P\n"
") const" ") const for type " +
this->type()
); );
// Dummy return to make the compiler happy
return P;
} }

View file

@ -66,7 +66,7 @@ class SAMGInterface
const crMatrix& prolongation_; const crMatrix& prolongation_;
//- Reference to prolongation matrix //- Reference to prolongation matrix
const crMatrix& nbrInterfaceProlongation_; const crMatrix nbrInterfaceProlongation_;
protected: protected:

View file

@ -305,7 +305,7 @@ Foam::tmp<Foam::labelField> Foam::processorSAMGInterface::internalFieldTransfer
void Foam::processorSAMGInterface::initProlongationTransfer void Foam::processorSAMGInterface::initProlongationTransfer
( (
const Pstream::commsTypes commsType, const Pstream::commsTypes commsType,
const crMatrix& iF const crMatrix& P
) const ) const
{ {
// Select the part of the prolongation matrix to send // Select the part of the prolongation matrix to send
@ -317,7 +317,7 @@ void Foam::processorSAMGInterface::initProlongationTransfer
Foam::tmp<Foam::crMatrix> Foam::processorSAMGInterface::prolongationTransfer Foam::tmp<Foam::crMatrix> Foam::processorSAMGInterface::prolongationTransfer
( (
const Pstream::commsTypes commsType, const Pstream::commsTypes commsType,
const crMatrix& iF const crMatrix& P
) const ) const
{ {
// Receive and return prolongation matrix // Receive and return prolongation matrix