Nektar++
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Nektar::Collections::BwdTrans_MatrixFree Class Referencefinal

Backward transform operator using matrix free operators. More...

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

Public Member Functions

 ~BwdTrans_MatrixFree () 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) final
 Perform operation.
 
void operator() (int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
 
- Public Member Functions inherited from Nektar::Collections::Operator
 Operator (std::vector< LocalRegions::ExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
 Constructor.
 
virtual ~Operator ()=default
 
virtual COLLECTIONS_EXPORT void UpdateFactors (StdRegions::FactorMap factors)
 Update the supplied factor map.
 
virtual COLLECTIONS_EXPORT void UpdateVarcoeffs (StdRegions::VarCoeffMap &varcoeffs)
 Update the supplied variable coefficients.
 
unsigned int GetWspSize ()
 Get the size of the required workspace.
 
unsigned int GetNumElmt ()
 Get number of elements.
 
StdRegions::StdExpansionSharedPtr GetExpSharedPtr ()
 Get expansion pointer.
 
unsigned int GetInputSize (void)
 
unsigned int GetOutputSize (void)
 
unsigned int GetPhysSize (void)
 
unsigned int GetCoeffSize (void)
 

Private Member Functions

 BwdTrans_MatrixFree (vector< LocalRegions::ExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
 
- Private Member Functions inherited from Nektar::Collections::MatrixFreeBase
 MatrixFreeBase ()=default
 
 MatrixFreeBase (const unsigned int nIn, const unsigned int nOut, const unsigned int nCollSize)
 

Private Attributes

std::shared_ptr< MatrixFree::BwdTrans > m_oper
 
- Private Attributes inherited from Nektar::Collections::MatrixFreeBase
bool m_isPadded {false}
 flag for padding
 
unsigned int m_nElmtPad
 size after padding
 
unsigned int m_nIn
 actural size of input array
 
unsigned int m_nOut
 actural size of output array
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::Collections::BwdTrans_Helper
 BwdTrans_Helper ()
 
- 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
 
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
 
unsigned int m_outputSize
 number of modes or quadrature points that are taken as output from an operator
 

Detailed Description

Backward transform operator using matrix free operators.

Definition at line 160 of file BwdTrans.cpp.

Constructor & Destructor Documentation

◆ ~BwdTrans_MatrixFree()

Nektar::Collections::BwdTrans_MatrixFree::~BwdTrans_MatrixFree ( )
finaldefault

◆ BwdTrans_MatrixFree()

Nektar::Collections::BwdTrans_MatrixFree::BwdTrans_MatrixFree ( vector< LocalRegions::ExpansionSharedPtr pCollExp,
CoalescedGeomDataSharedPtr  pGeomData,
StdRegions::FactorMap  factors 
)
inlineprivate

Definition at line 190 of file BwdTrans.cpp.

193 : Operator(pCollExp, pGeomData, factors), BwdTrans_Helper(),
194 MatrixFreeBase(pCollExp[0]->GetNcoeffs(), pCollExp[0]->GetTotPoints(),
195 pCollExp.size())
196 {
197 // Basis vector.
198 const auto dim = pCollExp[0]->GetShapeDimension();
199 std::vector<LibUtilities::BasisSharedPtr> basis(dim);
200 for (auto i = 0; i < dim; ++i)
201 {
202 basis[i] = pCollExp[0]->GetBasis(i);
203 }
204
205 // Get shape type
206 auto shapeType = pCollExp[0]->DetShapeType();
207
208 // Generate operator string and create operator.
209 std::string op_string = "BwdTrans";
210 op_string += MatrixFree::GetOpstring(shapeType, false);
211 auto oper = MatrixFree::GetOperatorFactory().CreateInstance(
212 op_string, basis, pCollExp.size());
213
214 oper->SetUpBdata(basis);
215
216 m_oper = std::dynamic_pointer_cast<MatrixFree::BwdTrans>(oper);
217 ASSERTL0(m_oper, "Failed to cast pointer.");
218 }
#define ASSERTL0(condition, msg)
std::shared_ptr< MatrixFree::BwdTrans > m_oper
Definition BwdTrans.cpp:188
Operator(std::vector< LocalRegions::ExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
Definition Operator.cpp:66

References ASSERTL0, and m_oper.

Member Function Documentation

◆ operator()() [1/2]

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

Perform operation.

Implements Nektar::Collections::Operator.

Definition at line 169 of file BwdTrans.cpp.

174 {
175 (*m_oper)(input, output0);
176 }

◆ operator()() [2/2]

void Nektar::Collections::BwdTrans_MatrixFree::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 178 of file BwdTrans.cpp.

182 {
184 "BwdTrans_MatrixFree: Not valid for this operator.");
185 }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...

References Nektar::ErrorUtil::efatal, and NEKERROR.

Member Data Documentation

◆ m_oper

std::shared_ptr<MatrixFree::BwdTrans> Nektar::Collections::BwdTrans_MatrixFree::m_oper
private

Definition at line 188 of file BwdTrans.cpp.

Referenced by BwdTrans_MatrixFree().