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

Helmholtz operator using LocalRegions implementation. More...

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

Public Member Functions

 ~Helmholtz_NoCollection () final=default
 
void operator() (const Array< OneD, const NekDouble > &entry0, Array< OneD, NekDouble > &entry1, Array< OneD, NekDouble > &entry2, Array< OneD, NekDouble > &entry3, Array< OneD, NekDouble > &wsp) final
 Perform operation. More...
 
void operator() (int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
 
void UpdateFactors (StdRegions::FactorMap factors) override
 Update the supplied factor map. More...
 
void UpdateVarcoeffs (StdRegions::VarCoeffMap &varcoeffs) override
 Update the supplied variable coefficients. 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 UpdateFactors (StdRegions::FactorMap factors)
 Update the supplied factor map. More...
 
virtual COLLECTIONS_EXPORT void UpdateVarcoeffs (StdRegions::VarCoeffMap &varcoeffs)
 Update the supplied variable coefficients. 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 (bool defaultIn=true)
 
unsigned int GetOutputSize (bool defaultOut=true)
 

Protected Attributes

int m_dim
 
int m_coordim
 
vector< StdRegions::StdExpansionSharedPtrm_expList
 
StdRegions::FactorMap m_factors
 
StdRegions::VarCoeffMap m_varcoeffs
 
- 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...
 
unsigned int m_inputSizeOther
 Number of modes or quadrature points, opposite to m_inputSize. More...
 
unsigned int m_outputSizeOther
 Number of modes or quadrature points, opposite to m_outputSize. More...
 

Private Member Functions

 Helmholtz_NoCollection (vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
 
- Private Member Functions inherited from Nektar::Collections::Helmholtz_Helper
 Helmholtz_Helper ()
 

Detailed Description

Helmholtz operator using LocalRegions implementation.

Definition at line 80 of file library/Collections/Helmholtz.cpp.

Constructor & Destructor Documentation

◆ ~Helmholtz_NoCollection()

Nektar::Collections::Helmholtz_NoCollection::~Helmholtz_NoCollection ( )
finaldefault

◆ Helmholtz_NoCollection()

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

Definition at line 141 of file library/Collections/Helmholtz.cpp.

144 : Operator(pCollExp, pGeomData, factors), Helmholtz_Helper()
145 {
146 m_expList = pCollExp;
147 m_dim = pCollExp[0]->GetNumBases();
148 m_coordim = pCollExp[0]->GetCoordim();
149
152 }
vector< StdRegions::StdExpansionSharedPtr > m_expList
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
Definition: Operator.cpp:66
static VarCoeffMap NullVarCoeffMap
Definition: StdRegions.hpp:376
StdRegions::ConstFactorMap factors

References Nektar::VarcoeffHashingTest::factors, m_coordim, m_dim, m_expList, m_factors, m_varcoeffs, and Nektar::StdRegions::NullVarCoeffMap.

Member Function Documentation

◆ operator()() [1/2]

void Nektar::Collections::Helmholtz_NoCollection::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 87 of file library/Collections/Helmholtz.cpp.

92 {
93 unsigned int nmodes = m_expList[0]->GetNcoeffs();
94 unsigned int nphys = m_expList[0]->GetTotPoints();
95 Array<OneD, NekDouble> tmp;
96
97 for (int n = 0; n < m_numElmt; ++n)
98 {
99 // Restrict varcoeffs to size of element
101 if (m_varcoeffs.size())
102 {
103 varcoeffs =
104 StdRegions::RestrictCoeffMap(m_varcoeffs, n * nphys, nphys);
105 }
106
107 StdRegions::StdMatrixKey mkey(
108 StdRegions::eHelmholtz, (m_expList)[n]->DetShapeType(),
109 *(m_expList)[n], m_factors, varcoeffs);
110 m_expList[n]->GeneralMatrixOp(entry0 + n * nmodes,
111 tmp = entry1 + n * nmodes, mkey);
112 }
113 }
unsigned int m_numElmt
number of elements that the operator is applied on
Definition: Operator.h:219
VarCoeffMap RestrictCoeffMap(const VarCoeffMap &m, size_t offset, size_t cnt)
Definition: StdRegions.hpp:378
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap
Definition: StdRegions.hpp:375

References Nektar::StdRegions::eHelmholtz, m_expList, m_factors, Nektar::Collections::Operator::m_numElmt, m_varcoeffs, Nektar::StdRegions::NullVarCoeffMap, and Nektar::StdRegions::RestrictCoeffMap().

◆ operator()() [2/2]

void Nektar::Collections::Helmholtz_NoCollection::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 115 of file library/Collections/Helmholtz.cpp.

119 {
120 NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
121 }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Definition: ErrorUtil.hpp:202

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

◆ UpdateFactors()

void Nektar::Collections::Helmholtz_NoCollection::UpdateFactors ( StdRegions::FactorMap  factors)
inlineoverridevirtual

Update the supplied factor map.

Reimplemented from Nektar::Collections::Operator.

Definition at line 123 of file library/Collections/Helmholtz.cpp.

124 {
126 }

References Nektar::VarcoeffHashingTest::factors, and m_factors.

◆ UpdateVarcoeffs()

void Nektar::Collections::Helmholtz_NoCollection::UpdateVarcoeffs ( StdRegions::VarCoeffMap varcoeffs)
inlineoverridevirtual

Update the supplied variable coefficients.

Reimplemented from Nektar::Collections::Operator.

Definition at line 128 of file library/Collections/Helmholtz.cpp.

129 {
130 m_varcoeffs = varcoeffs;
131 }

References m_varcoeffs.

Member Data Documentation

◆ m_coordim

int Nektar::Collections::Helmholtz_NoCollection::m_coordim
protected

Definition at line 135 of file library/Collections/Helmholtz.cpp.

Referenced by Helmholtz_NoCollection().

◆ m_dim

int Nektar::Collections::Helmholtz_NoCollection::m_dim
protected

Definition at line 134 of file library/Collections/Helmholtz.cpp.

Referenced by Helmholtz_NoCollection().

◆ m_expList

vector<StdRegions::StdExpansionSharedPtr> Nektar::Collections::Helmholtz_NoCollection::m_expList
protected

Definition at line 136 of file library/Collections/Helmholtz.cpp.

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

◆ m_factors

StdRegions::FactorMap Nektar::Collections::Helmholtz_NoCollection::m_factors
protected

◆ m_varcoeffs

StdRegions::VarCoeffMap Nektar::Collections::Helmholtz_NoCollection::m_varcoeffs
protected