Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
Nektar::Collections::BwdTrans_SumFac_Hex Class Reference

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

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

Public Member Functions

virtual ~BwdTrans_SumFac_Hex ()
 
virtual void operator() (const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp)
 Perform operation. More...
 
virtual void operator() (int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp)
 
- Public Member Functions inherited from Nektar::Collections::Operator
 Operator (std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, boost::shared_ptr< CoalescedGeomData > GeomData)
 Constructor. More...
 
virtual COLLECTIONS_EXPORT ~Operator ()
 
int GetWspSize ()
 Get the size of the required workspace. More...
 

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
StdRegions::StdExpansionSharedPtr m_stdExp
 
unsigned int m_numElmt
 
unsigned int m_wspSize
 

Private Member Functions

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

Detailed Description

Backward transform operator using sum-factorisation (Hex)

Definition at line 596 of file BwdTrans.cpp.

Constructor & Destructor Documentation

virtual Nektar::Collections::BwdTrans_SumFac_Hex::~BwdTrans_SumFac_Hex ( )
inlinevirtual

Definition at line 601 of file BwdTrans.cpp.

602  {
603  }
Nektar::Collections::BwdTrans_SumFac_Hex::BwdTrans_SumFac_Hex ( vector< StdRegions::StdExpansionSharedPtr pCollExp,
CoalescedGeomDataSharedPtr  pGeomData 
)
inlineprivate

Definition at line 677 of file BwdTrans.cpp.

680  : Operator (pCollExp, pGeomData),
681  m_nquad0 (pCollExp[0]->GetNumPoints(0)),
682  m_nquad1 (pCollExp[0]->GetNumPoints(1)),
683  m_nquad2 (pCollExp[0]->GetNumPoints(2)),
684  m_nmodes0 (pCollExp[0]->GetBasisNumModes(0)),
685  m_nmodes1 (pCollExp[0]->GetBasisNumModes(1)),
686  m_nmodes2 (pCollExp[0]->GetBasisNumModes(2)),
687  m_base0 (pCollExp[0]->GetBasis(0)->GetBdata()),
688  m_base1 (pCollExp[0]->GetBasis(1)->GetBdata()),
689  m_base2 (pCollExp[0]->GetBasis(2)->GetBdata()),
690  m_colldir0(pCollExp[0]->GetBasis(0)->Collocation()),
691  m_colldir1(pCollExp[0]->GetBasis(1)->Collocation()),
692  m_colldir2(pCollExp[0]->GetBasis(2)->Collocation())
693  {
696  }
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, boost::shared_ptr< CoalescedGeomData > GeomData)
Constructor.
Definition: Operator.h:112
Array< OneD, const NekDouble > m_base1
Definition: BwdTrans.cpp:670
Array< OneD, const NekDouble > m_base2
Definition: BwdTrans.cpp:671
Array< OneD, const NekDouble > m_base0
Definition: BwdTrans.cpp:669

Member Function Documentation

virtual 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 
)
inlinevirtual

Perform operation.

Implements Nektar::Collections::Operator.

Definition at line 605 of file BwdTrans.cpp.

References ASSERTL1, and Vmath::Vcopy().

611  {
612 
614  {
616  input.get(), 1,
617  output.get(), 1);
618  }
619  else
620  {
621  ASSERTL1(wsp.num_elements() == m_wspSize,
622  "Incorrect workspace size");
623 
624  // Assign second half of workspace for 2nd DGEMM operation.
625  int totmodes = m_nmodes0*m_nmodes1*m_nmodes2;
626 
627  Array<OneD, NekDouble> wsp2
629 
630  //loop over elements and do bwd trans wrt c
631  for(int n = 0; n < m_numElmt; ++n)
632  {
633  Blas::Dgemm('N', 'T', m_nquad2, m_nmodes0*m_nmodes1,
634  m_nmodes2, 1.0, m_base2.get(), m_nquad2,
635  &input[n*totmodes], m_nmodes0*m_nmodes1, 0.0,
636  &wsp[n*m_nquad2], m_nquad2*m_numElmt);
637  }
638 
639  // trans wrt b
640  Blas::Dgemm('N', 'T', m_nquad1, m_nquad2*m_numElmt*m_nmodes0,
641  m_nmodes1, 1.0, m_base1.get(), m_nquad1,
642  wsp.get(), m_nquad2*m_numElmt*m_nmodes0, 0.0,
643  wsp2.get(), m_nquad1);
644 
645  // trans wrt a
646  Blas::Dgemm('N', 'T', m_nquad0, m_nquad1*m_nquad2*m_numElmt,
647  m_nmodes0, 1.0, m_base0.get(), m_nquad0,
648  wsp2.get(), m_nquad1*m_nquad2*m_numElmt, 0.0,
649  output.get(), m_nquad0);
650  }
651  }
Array< OneD, const NekDouble > m_base1
Definition: BwdTrans.cpp:670
Array< OneD, const NekDouble > m_base2
Definition: BwdTrans.cpp:671
Array< OneD, const NekDouble > m_base0
Definition: BwdTrans.cpp:669
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
virtual void Nektar::Collections::BwdTrans_SumFac_Hex::operator() ( int  dir,
const Array< OneD, const NekDouble > &  input,
Array< OneD, NekDouble > &  output,
Array< OneD, NekDouble > &  wsp 
)
inlinevirtual

Implements Nektar::Collections::Operator.

Definition at line 653 of file BwdTrans.cpp.

References ASSERTL0.

658  {
659  ASSERTL0(false, "Not valid for this operator.");
660  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198

Member Data Documentation

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

Definition at line 669 of file BwdTrans.cpp.

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

Definition at line 670 of file BwdTrans.cpp.

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

Definition at line 671 of file BwdTrans.cpp.

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

Definition at line 672 of file BwdTrans.cpp.

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

Definition at line 673 of file BwdTrans.cpp.

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

Definition at line 674 of file BwdTrans.cpp.

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

Definition at line 666 of file BwdTrans.cpp.

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

Definition at line 667 of file BwdTrans.cpp.

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

Definition at line 668 of file BwdTrans.cpp.

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

Definition at line 663 of file BwdTrans.cpp.

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

Definition at line 664 of file BwdTrans.cpp.

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

Definition at line 665 of file BwdTrans.cpp.