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_Tri Class Reference

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

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

Public Member Functions

virtual ~BwdTrans_SumFac_Tri ()
 
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_nmodes0
 
const int m_nmodes1
 
Array< OneD, const NekDoublem_base0
 
Array< OneD, const NekDoublem_base1
 
bool m_sortTopVertex
 
- Protected Attributes inherited from Nektar::Collections::Operator
StdRegions::StdExpansionSharedPtr m_stdExp
 
unsigned int m_numElmt
 
unsigned int m_wspSize
 

Private Member Functions

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

Detailed Description

Backward transform operator using sum-factorisation (Tri)

Definition at line 492 of file BwdTrans.cpp.

Constructor & Destructor Documentation

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

Definition at line 497 of file BwdTrans.cpp.

498  {
499  }
Nektar::Collections::BwdTrans_SumFac_Tri::BwdTrans_SumFac_Tri ( vector< StdRegions::StdExpansionSharedPtr pCollExp,
CoalescedGeomDataSharedPtr  pGeomData 
)
inlineprivate

Definition at line 563 of file BwdTrans.cpp.

References Nektar::LibUtilities::eModified_A.

566  : Operator (pCollExp, pGeomData),
567  m_nquad0 (m_stdExp->GetNumPoints(0)),
568  m_nquad1 (m_stdExp->GetNumPoints(1)),
569  m_nmodes0 (m_stdExp->GetBasisNumModes(0)),
570  m_nmodes1 (m_stdExp->GetBasisNumModes(1)),
571  m_base0 (m_stdExp->GetBasis(0)->GetBdata()),
572  m_base1 (m_stdExp->GetBasis(1)->GetBdata())
573  {
575  if(m_stdExp->GetBasis(0)->GetBasisType()
577  {
578  m_sortTopVertex = true;
579  }
580  else
581  {
582  m_sortTopVertex = false;
583  }
584  }
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, boost::shared_ptr< CoalescedGeomData > GeomData)
Constructor.
Definition: Operator.h:112
Principle Modified Functions .
Definition: BasisType.h:49
Array< OneD, const NekDouble > m_base0
Definition: BwdTrans.cpp:558
StdRegions::StdExpansionSharedPtr m_stdExp
Definition: Operator.h:146
Array< OneD, const NekDouble > m_base1
Definition: BwdTrans.cpp:559

Member Function Documentation

virtual void Nektar::Collections::BwdTrans_SumFac_Tri::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 501 of file BwdTrans.cpp.

References ASSERTL1.

507  {
508 
509  ASSERTL1(wsp.num_elements() == m_wspSize,
510  "Incorrect workspace size");
511 
512  int ncoeffs = m_stdExp->GetNcoeffs();
513  int i = 0;
514  int mode = 0;
515 
516  for (i = mode = 0; i < m_nmodes0; ++i)
517  {
518  Blas::Dgemm('N', 'N', m_nquad1, m_numElmt, m_nmodes1-i,
519  1.0, m_base1.get()+mode*m_nquad1, m_nquad1,
520  &input[0]+mode, ncoeffs, 0.0,
521  &wsp[i*m_nquad1*m_numElmt], m_nquad1);
522  mode += m_nmodes1-i;
523  }
524 
525  // fix for modified basis by splitting top vertex mode
526  if(m_sortTopVertex)
527  {
528  for(i = 0; i < m_numElmt; ++i)
529  {
530  Blas::Daxpy(m_nquad1, input[1+i*ncoeffs],
531  m_base1.get() + m_nquad1, 1,
532  &wsp[m_nquad1*m_numElmt] + i*m_nquad1, 1);
533  }
534 
535  }
536 
537  Blas::Dgemm('N', 'T', m_nquad0, m_nquad1*m_numElmt, m_nmodes0,
538  1.0, m_base0.get(), m_nquad0,
539  &wsp[0], m_nquad1*m_numElmt, 0.0,
540  &output[0], m_nquad0);
541  }
Array< OneD, const NekDouble > m_base0
Definition: BwdTrans.cpp:558
StdRegions::StdExpansionSharedPtr m_stdExp
Definition: Operator.h:146
Array< OneD, const NekDouble > m_base1
Definition: BwdTrans.cpp:559
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
virtual void Nektar::Collections::BwdTrans_SumFac_Tri::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 543 of file BwdTrans.cpp.

References ASSERTL0.

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

Member Data Documentation

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

Definition at line 558 of file BwdTrans.cpp.

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

Definition at line 559 of file BwdTrans.cpp.

const int Nektar::Collections::BwdTrans_SumFac_Tri::m_nmodes0
protected

Definition at line 556 of file BwdTrans.cpp.

const int Nektar::Collections::BwdTrans_SumFac_Tri::m_nmodes1
protected

Definition at line 557 of file BwdTrans.cpp.

const int Nektar::Collections::BwdTrans_SumFac_Tri::m_nquad0
protected

Definition at line 554 of file BwdTrans.cpp.

const int Nektar::Collections::BwdTrans_SumFac_Tri::m_nquad1
protected

Definition at line 555 of file BwdTrans.cpp.

bool Nektar::Collections::BwdTrans_SumFac_Tri::m_sortTopVertex
protected

Definition at line 560 of file BwdTrans.cpp.