Nektar++
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Nektar::Collections::PhysInterp1DScaled_Helper Class Reference

PhysInterp1DScaled help class to calculate the size of the collection that is given as an input and as an output to the PhysInterp1DScaled Operator. The size evaluation takes into account that both the input and the output array belong to the physical space and that the output array can have either a larger, or a smaller size than the input array. More...

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

Public Member Functions

void UpdateFactors (StdRegions::FactorMap factors) override
 Update 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 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 Member Functions

 PhysInterp1DScaled_Helper ()
 

Protected Attributes

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...
 
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...
 

Detailed Description

PhysInterp1DScaled help class to calculate the size of the collection that is given as an input and as an output to the PhysInterp1DScaled Operator. The size evaluation takes into account that both the input and the output array belong to the physical space and that the output array can have either a larger, or a smaller size than the input array.

Definition at line 62 of file PhysInterp1DScaled.cpp.

Constructor & Destructor Documentation

◆ PhysInterp1DScaled_Helper()

Nektar::Collections::PhysInterp1DScaled_Helper::PhysInterp1DScaled_Helper ( )
inlineprotected

Definition at line 91 of file PhysInterp1DScaled.cpp.

92 {
93 NekDouble scale; // declaration of the scaling factor to be used for the
94 // output size
96 {
98 }
99 else
100 {
101 scale = 1.5;
102 }
103 // expect input to be number of elements by the number of quad points
104 m_inputSize = m_numElmt * m_stdExp->GetTotPoints();
105 // expect input to be number of elements by the number of quad points
106 int shape_dimension = m_stdExp->GetShapeDimension();
107 m_outputSize = m_numElmt; // initializing m_outputSize
108 for (int i = 0; i < shape_dimension; ++i)
109 {
110 m_outputSize *= (int)(m_stdExp->GetNumPoints(i) * scale);
111 }
112 }
StdRegions::StdExpansionSharedPtr m_stdExp
Definition: Operator.h:217
unsigned int m_numElmt
number of elements that the operator is applied on
Definition: Operator.h:219
unsigned int m_outputSize
number of modes or quadrature points that are taken as output from an operator
Definition: Operator.h:227
unsigned int m_inputSize
number of modes or quadrature points that are passed as input to an operator
Definition: Operator.h:224
double NekDouble

References Nektar::StdRegions::eFactorConst, m_factors, Nektar::Collections::Operator::m_inputSize, Nektar::Collections::Operator::m_numElmt, Nektar::Collections::Operator::m_outputSize, and Nektar::Collections::Operator::m_stdExp.

Member Function Documentation

◆ UpdateFactors()

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

Update the supplied factor map.

Reimplemented from Nektar::Collections::Operator.

Reimplemented in Nektar::Collections::PhysInterp1DScaled_MatrixFree, and Nektar::Collections::PhysInterp1DScaled_NoCollection.

Definition at line 65 of file PhysInterp1DScaled.cpp.

66 {
67 if (factors == m_factors)
68 {
69 return;
70 }
72 // Set scaling factor for the PhysInterp1DScaled function
73 [[maybe_unused]] auto x = factors.find(StdRegions::eFactorConst);
75 x != factors.end(),
76 "Constant factor not defined: " +
77 std::string(
79
81
82 int shape_dimension = m_stdExp->GetShapeDimension();
83 m_outputSize = m_numElmt; // initializing m_outputSize
84 for (int i = 0; i < shape_dimension; ++i)
85 {
86 m_outputSize *= (int)(m_stdExp->GetNumPoints(i) * scale);
87 }
88 }
#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:413
StdRegions::ConstFactorMap factors

References ASSERTL1, Nektar::StdRegions::ConstFactorTypeMap, Nektar::StdRegions::eFactorConst, Nektar::VarcoeffHashingTest::factors, m_factors, Nektar::Collections::Operator::m_numElmt, Nektar::Collections::Operator::m_outputSize, and Nektar::Collections::Operator::m_stdExp.

Referenced by Nektar::Collections::PhysInterp1DScaled_NoCollection::UpdateFactors().

Member Data Documentation

◆ m_factors

StdRegions::FactorMap Nektar::Collections::PhysInterp1DScaled_Helper::m_factors
protected