Nektar++
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
Nektar::Collections::BwdTrans_SumFac_Hex Class Referencefinal

Backward transform operator using sum-factorisation (Hex) More...

Inheritance diagram for Nektar::Collections::BwdTrans_SumFac_Hex:
[legend]

Public Member Functions

 ~BwdTrans_SumFac_Hex () final=default
 
void operator() (const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output0, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) override
 Perform operation. More...
 
void operator() (int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
 
void CheckFactors (StdRegions::FactorMap factors, int coll_phys_offset) override
 Check the validity of the supplied factor map. More...
 
- Public Member Functions inherited from Nektar::Collections::Operator
 Operator (std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
 Constructor. More...
 
virtual ~Operator ()=default
 
virtual COLLECTIONS_EXPORT void operator() (const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output0, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp=NullNekDouble1DArray)=0
 Perform operation. More...
 
virtual COLLECTIONS_EXPORT void operator() (int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp=NullNekDouble1DArray)=0
 
virtual COLLECTIONS_EXPORT void CheckFactors (StdRegions::FactorMap factors, int coll_phys_offset)=0
 Check the validity of the supplied factor map. More...
 
unsigned int GetWspSize ()
 Get the size of the required workspace. More...
 
unsigned int GetNumElmt ()
 Get number of elements. More...
 
StdRegions::StdExpansionSharedPtr GetExpSharedPtr ()
 Get expansion pointer. More...
 
unsigned int GetInputSize ()
 
unsigned int GetOutputSize ()
 

Protected Attributes

const int m_nquad0
 
const int m_nquad1
 
const int m_nquad2
 
const int m_nmodes0
 
const int m_nmodes1
 
const int m_nmodes2
 
Array< OneD, const NekDoublem_base0
 
Array< OneD, const NekDoublem_base1
 
Array< OneD, const NekDoublem_base2
 
const bool m_colldir0
 
const bool m_colldir1
 
const bool m_colldir2
 
- Protected Attributes inherited from Nektar::Collections::Operator
bool m_isDeformed
 
StdRegions::StdExpansionSharedPtr m_stdExp
 
unsigned int m_numElmt
 number of elements that the operator is applied on More...
 
unsigned int m_nqe
 
unsigned int m_wspSize
 
unsigned int m_inputSize
 number of modes or quadrature points that are passed as input to an operator More...
 
unsigned int m_outputSize
 number of modes or quadrature points that are taken as output from an operator More...
 

Private Member Functions

 BwdTrans_SumFac_Hex (vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::Collections::Operator
virtual int v_GetInputSize ()
 This purely virtual function needs to be set-up for every operator inside Collections. It is responsible for returning the size of input collection, that the operator is applied on either in physical or coefficient space. More...
 
virtual int v_GetOutputSize ()
 This purely virtual function needs to be set-up for every operator inside Collections. It is responsible for returning the output size either in physical or coefficient space of an operator inside Collections. More...
 
- Protected Member Functions inherited from Nektar::Collections::BwdTrans_Helper
 BwdTrans_Helper ()
 

Detailed Description

Backward transform operator using sum-factorisation (Hex)

Definition at line 718 of file BwdTrans.cpp.

Constructor & Destructor Documentation

◆ ~BwdTrans_SumFac_Hex()

Nektar::Collections::BwdTrans_SumFac_Hex::~BwdTrans_SumFac_Hex ( )
finaldefault

◆ BwdTrans_SumFac_Hex()

Nektar::Collections::BwdTrans_SumFac_Hex::BwdTrans_SumFac_Hex ( vector< StdRegions::StdExpansionSharedPtr pCollExp,
CoalescedGeomDataSharedPtr  pGeomData,
StdRegions::FactorMap  factors 
)
inlineprivate

Definition at line 799 of file BwdTrans.cpp.

802 : Operator(pCollExp, pGeomData, factors), BwdTrans_Helper(),
803 m_nquad0(pCollExp[0]->GetNumPoints(0)),
804 m_nquad1(pCollExp[0]->GetNumPoints(1)),
805 m_nquad2(pCollExp[0]->GetNumPoints(2)),
806 m_nmodes0(pCollExp[0]->GetBasisNumModes(0)),
807 m_nmodes1(pCollExp[0]->GetBasisNumModes(1)),
808 m_nmodes2(pCollExp[0]->GetBasisNumModes(2)),
809 m_base0(pCollExp[0]->GetBasis(0)->GetBdata()),
810 m_base1(pCollExp[0]->GetBasis(1)->GetBdata()),
811 m_base2(pCollExp[0]->GetBasis(2)->GetBdata()),
812 m_colldir0(pCollExp[0]->GetBasis(0)->Collocation()),
813 m_colldir1(pCollExp[0]->GetBasis(1)->Collocation()),
814 m_colldir2(pCollExp[0]->GetBasis(2)->Collocation())
815 {
818 }
Array< OneD, const NekDouble > m_base1
Definition: BwdTrans.cpp:792
Array< OneD, const NekDouble > m_base2
Definition: BwdTrans.cpp:793
Array< OneD, const NekDouble > m_base0
Definition: BwdTrans.cpp:791
unsigned int m_numElmt
number of elements that the operator is applied on
Definition: Operator.h:190
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
Definition: Operator.cpp:66
StdRegions::ConstFactorMap factors

References m_nmodes0, m_nmodes1, m_nquad1, m_nquad2, Nektar::Collections::Operator::m_numElmt, and Nektar::Collections::Operator::m_wspSize.

Member Function Documentation

◆ CheckFactors()

void Nektar::Collections::BwdTrans_SumFac_Hex::CheckFactors ( StdRegions::FactorMap  factors,
int  coll_phys_offset 
)
inlineoverridevirtual

Check the validity of the supplied factor map.

Implements Nektar::Collections::Operator.

Definition at line 778 of file BwdTrans.cpp.

780 {
781 ASSERTL0(false, "Not valid for this operator.");
782 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:208

References ASSERTL0.

◆ operator()() [1/2]

void Nektar::Collections::BwdTrans_SumFac_Hex::operator() ( const Array< OneD, const NekDouble > &  input,
Array< OneD, NekDouble > &  output0,
Array< OneD, NekDouble > &  output1,
Array< OneD, NekDouble > &  output2,
Array< OneD, NekDouble > &  wsp 
)
inlineoverridevirtual

Perform operation.

Implements Nektar::Collections::Operator.

Definition at line 726 of file BwdTrans.cpp.

731 {
733 {
735 input.get(), 1, output0.get(), 1);
736 }
737 else
738 {
739 ASSERTL1(wsp.size() == m_wspSize, "Incorrect workspace size");
740
741 // Assign second half of workspace for 2nd DGEMM operation.
742 int totmodes = m_nmodes0 * m_nmodes1 * m_nmodes2;
743
744 Array<OneD, NekDouble> wsp2 =
746
747 // loop over elements and do bwd trans wrt c
748 for (int n = 0; n < m_numElmt; ++n)
749 {
751 m_nmodes2, 1.0, m_base2.get(), m_nquad2,
752 &input[n * totmodes], m_nmodes0 * m_nmodes1, 0.0,
753 &wsp[n * m_nquad2], m_nquad2 * m_numElmt);
754 }
755
756 // trans wrt b
758 m_nmodes1, 1.0, m_base1.get(), m_nquad1, wsp.get(),
759 m_nquad2 * m_numElmt * m_nmodes0, 0.0, wsp2.get(),
760 m_nquad1);
761
762 // trans wrt a
764 m_nmodes0, 1.0, m_base0.get(), m_nquad0, wsp2.get(),
765 m_nquad1 * m_nquad2 * m_numElmt, 0.0, output0.get(),
766 m_nquad0);
767 }
768 }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:242
static void Dgemm(const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const double *a, const int &lda, const double *b, const int &ldb, const double &beta, double *c, const int &ldc)
BLAS level 3: Matrix-matrix multiply C = A x B where op(A)[m x k], op(B)[k x n], C[m x n] DGEMM perfo...
Definition: Blas.hpp:383
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.hpp:825

References ASSERTL1, Blas::Dgemm(), m_base0, m_base1, m_base2, m_colldir0, m_colldir1, m_colldir2, m_nmodes0, m_nmodes1, m_nmodes2, m_nquad0, m_nquad1, m_nquad2, Nektar::Collections::Operator::m_numElmt, Nektar::Collections::Operator::m_wspSize, and Vmath::Vcopy().

◆ operator()() [2/2]

void Nektar::Collections::BwdTrans_SumFac_Hex::operator() ( int  dir,
const Array< OneD, const NekDouble > &  input,
Array< OneD, NekDouble > &  output,
Array< OneD, NekDouble > &  wsp 
)
inlinefinalvirtual

Implements Nektar::Collections::Operator.

Definition at line 770 of file BwdTrans.cpp.

774 {
775 ASSERTL0(false, "Not valid for this operator.");
776 }

References ASSERTL0.

Member Data Documentation

◆ m_base0

Array<OneD, const NekDouble> Nektar::Collections::BwdTrans_SumFac_Hex::m_base0
protected

Definition at line 791 of file BwdTrans.cpp.

Referenced by operator()().

◆ m_base1

Array<OneD, const NekDouble> Nektar::Collections::BwdTrans_SumFac_Hex::m_base1
protected

Definition at line 792 of file BwdTrans.cpp.

Referenced by operator()().

◆ m_base2

Array<OneD, const NekDouble> Nektar::Collections::BwdTrans_SumFac_Hex::m_base2
protected

Definition at line 793 of file BwdTrans.cpp.

Referenced by operator()().

◆ m_colldir0

const bool Nektar::Collections::BwdTrans_SumFac_Hex::m_colldir0
protected

Definition at line 794 of file BwdTrans.cpp.

Referenced by operator()().

◆ m_colldir1

const bool Nektar::Collections::BwdTrans_SumFac_Hex::m_colldir1
protected

Definition at line 795 of file BwdTrans.cpp.

Referenced by operator()().

◆ m_colldir2

const bool Nektar::Collections::BwdTrans_SumFac_Hex::m_colldir2
protected

Definition at line 796 of file BwdTrans.cpp.

Referenced by operator()().

◆ m_nmodes0

const int Nektar::Collections::BwdTrans_SumFac_Hex::m_nmodes0
protected

Definition at line 788 of file BwdTrans.cpp.

Referenced by BwdTrans_SumFac_Hex(), and operator()().

◆ m_nmodes1

const int Nektar::Collections::BwdTrans_SumFac_Hex::m_nmodes1
protected

Definition at line 789 of file BwdTrans.cpp.

Referenced by BwdTrans_SumFac_Hex(), and operator()().

◆ m_nmodes2

const int Nektar::Collections::BwdTrans_SumFac_Hex::m_nmodes2
protected

Definition at line 790 of file BwdTrans.cpp.

Referenced by operator()().

◆ m_nquad0

const int Nektar::Collections::BwdTrans_SumFac_Hex::m_nquad0
protected

Definition at line 785 of file BwdTrans.cpp.

Referenced by operator()().

◆ m_nquad1

const int Nektar::Collections::BwdTrans_SumFac_Hex::m_nquad1
protected

Definition at line 786 of file BwdTrans.cpp.

Referenced by BwdTrans_SumFac_Hex(), and operator()().

◆ m_nquad2

const int Nektar::Collections::BwdTrans_SumFac_Hex::m_nquad2
protected

Definition at line 787 of file BwdTrans.cpp.

Referenced by BwdTrans_SumFac_Hex(), and operator()().