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

PhysInterp1DScaled operator using standard matrix approach. Currently, it is an identical copy of the BwdTrans operator. More...

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

Public Member Functions

 ~PhysInterp1DScaled_StdMat () final
 
void operator() (const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, 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

DNekMatSharedPtr m_mat
 
StdRegions::FactorMap m_factors
 
- 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

 PhysInterp1DScaled_StdMat (vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
 
void CheckFactors (StdRegions::FactorMap factors, int coll_phys_offset) override
 Check the validity of the supplied factor map. More...
 
 PhysInterp1DScaled_Helper ()
 

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...
 
- Private Attributes inherited from Nektar::Collections::PhysInterp1DScaled_Helper
StdRegions::FactorMap m_factors
 

Detailed Description

PhysInterp1DScaled operator using standard matrix approach. Currently, it is an identical copy of the BwdTrans operator.

Definition at line 116 of file PhysInterp1DScaled.cpp.

Constructor & Destructor Documentation

◆ ~PhysInterp1DScaled_StdMat()

Nektar::Collections::PhysInterp1DScaled_StdMat::~PhysInterp1DScaled_StdMat ( )
inlinefinal

Definition at line 121 of file PhysInterp1DScaled.cpp.

122 {
123 }

◆ PhysInterp1DScaled_StdMat()

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

Definition at line 173 of file PhysInterp1DScaled.cpp.

176 : Operator(pCollExp, pGeomData, factors), PhysInterp1DScaled_Helper()
177 {
178 }
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
Definition: Operator.cpp:66
StdRegions::ConstFactorMap factors

Member Function Documentation

◆ CheckFactors()

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

Check the validity of the supplied factor map.

Implements Nektar::Collections::Operator.

Definition at line 145 of file PhysInterp1DScaled.cpp.

147 {
148 if (factors == m_factors)
149 {
150 return;
151 }
152
154
155 // Set scaling factor for the PhysInterp1DScaled function
156 [[maybe_unused]] auto x = factors.find(StdRegions::eFactorConst);
157 ASSERTL1(
158 x != factors.end(),
159 "Constant factor not defined: " +
160 std::string(
162 }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:242
const char *const ConstFactorTypeMap[]
Definition: StdRegions.hpp:385

References ASSERTL1, Nektar::StdRegions::ConstFactorTypeMap, Nektar::StdRegions::eFactorConst, Nektar::VarcoeffHashingTest::factors, and m_factors.

◆ operator()() [1/2]

void Nektar::Collections::PhysInterp1DScaled_StdMat::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 125 of file PhysInterp1DScaled.cpp.

130 {
131 Blas::Dgemm('N', 'N', m_mat->GetRows(), m_numElmt, m_mat->GetColumns(),
132 1.0, m_mat->GetRawPtr(), m_mat->GetRows(), input.get(),
133 m_stdExp->GetNcoeffs(), 0.0, output.get(),
134 m_stdExp->GetTotPoints());
135 }
StdRegions::StdExpansionSharedPtr m_stdExp
Definition: Operator.h:188
unsigned int m_numElmt
number of elements that the operator is applied on
Definition: Operator.h:190
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

References Blas::Dgemm(), m_mat, Nektar::Collections::Operator::m_numElmt, and Nektar::Collections::Operator::m_stdExp.

◆ operator()() [2/2]

void Nektar::Collections::PhysInterp1DScaled_StdMat::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 137 of file PhysInterp1DScaled.cpp.

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

References ASSERTL0.

Member Data Documentation

◆ m_factors

StdRegions::FactorMap Nektar::Collections::PhysInterp1DScaled_StdMat::m_factors
protected

Definition at line 166 of file PhysInterp1DScaled.cpp.

Referenced by CheckFactors().

◆ m_mat

DNekMatSharedPtr Nektar::Collections::PhysInterp1DScaled_StdMat::m_mat
protected

Definition at line 165 of file PhysInterp1DScaled.cpp.

Referenced by operator()().