Nektar++
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Nektar::LibUtilities::NodalQuadElec Class Reference

#include <NodalQuadElec.h>

Inheritance diagram for Nektar::LibUtilities::NodalQuadElec:
[legend]

Public Member Functions

 ~NodalQuadElec () override
 
 NodalQuadElec (const PointsKey &key)
 
- Public Member Functions inherited from Nektar::LibUtilities::Points< NekDouble >
virtual ~Points ()
 
void Initialize (void)
 
size_t GetPointsDim () const
 
size_t GetNumPoints () const
 
size_t GetTotNumPoints () const
 
PointsType GetPointsType () const
 
const Array< OneD, const DataType > & GetZ () const
 
const Array< OneD, const DataType > & GetW () const
 
void GetZW (Array< OneD, const DataType > &z, Array< OneD, const DataType > &w) const
 
const Array< OneD, const NekDouble > & GetBaryWeights () const
 
void GetPoints (Array< OneD, const DataType > &x) const
 
void GetPoints (Array< OneD, const DataType > &x, Array< OneD, const DataType > &y) const
 
void GetPoints (Array< OneD, const DataType > &x, Array< OneD, const DataType > &y, Array< OneD, const DataType > &z) const
 
const MatrixSharedPtrTypeGetD (Direction dir=xDir) const
 
const MatrixSharedPtrType GetI (const PointsKey &key)
 
const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x)
 
const MatrixSharedPtrType GetI (size_t uint, const Array< OneD, const DataType > &x)
 
const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y)
 
const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y, const Array< OneD, const DataType > &z)
 
const MatrixSharedPtrType GetGalerkinProjection (const PointsKey &pkey)
 

Static Public Member Functions

static std::shared_ptr< PointsBaseTypeCreate (const PointsKey &key)
 

Private Member Functions

 NodalQuadElec ()=delete
 
 NodalQuadElec (const NodalQuadElec &points)=delete
 
void v_CalculatePoints () final
 
void v_CalculateWeights () final
 
void v_CalculateDerivMatrix () final
 

Private Attributes

Array< OneD, NekDoublem_e0
 1D GLL points More...
 
Array< OneD, NekDoublem_ew
 1D GLL weights More...
 

Static Private Attributes

static bool initPointsManager []
 

Additional Inherited Members

- Public Types inherited from Nektar::LibUtilities::Points< NekDouble >
typedef NekDouble DataType
 
typedef std::shared_ptr< NekMatrix< DataType > > MatrixSharedPtrType
 
- Protected Member Functions inherited from Nektar::LibUtilities::Points< NekDouble >
virtual void v_Initialize (void)
 
virtual void v_CalculatePoints ()
 
virtual void v_CalculateWeights ()
 
- Protected Attributes inherited from Nektar::LibUtilities::Points< NekDouble >
PointsKey m_pointsKey
 Points type for this points distributions. More...
 
Array< OneD, DataTypem_points [3]
 Storage for the point locations, allowing for up to a 3D points storage. More...
 
Array< OneD, DataTypem_weights
 Quadrature weights for the weights. More...
 
Array< OneD, DataTypem_bcweights
 Barycentric weights. More...
 
MatrixSharedPtrType m_derivmatrix [3]
 Derivative matrices. More...
 
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLessm_InterpManager
 
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLessm_GalerkinProjectionManager
 

Detailed Description

Definition at line 45 of file NodalQuadElec.h.

Constructor & Destructor Documentation

◆ ~NodalQuadElec()

Nektar::LibUtilities::NodalQuadElec::~NodalQuadElec ( )
inlineoverride

Definition at line 48 of file NodalQuadElec.h.

49 {
50 }

◆ NodalQuadElec() [1/3]

Nektar::LibUtilities::NodalQuadElec::NodalQuadElec ( const PointsKey key)
inline

Definition at line 55 of file NodalQuadElec.h.

55 : PointsBaseType(key)
56 {
57 }
Points< NekDouble > PointsBaseType

◆ NodalQuadElec() [2/3]

Nektar::LibUtilities::NodalQuadElec::NodalQuadElec ( )
privatedelete

◆ NodalQuadElec() [3/3]

Nektar::LibUtilities::NodalQuadElec::NodalQuadElec ( const NodalQuadElec points)
privatedelete

Member Function Documentation

◆ Create()

std::shared_ptr< PointsBaseType > Nektar::LibUtilities::NodalQuadElec::Create ( const PointsKey key)
static

Definition at line 86 of file NodalQuadElec.cpp.

87{
88 std::shared_ptr<PointsBaseType> returnval(
90 returnval->Initialize();
91 return returnval;
92}
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

◆ v_CalculateDerivMatrix()

void Nektar::LibUtilities::NodalQuadElec::v_CalculateDerivMatrix ( )
finalprivate

Definition at line 82 of file NodalQuadElec.cpp.

83{
84}

◆ v_CalculatePoints()

void Nektar::LibUtilities::NodalQuadElec::v_CalculatePoints ( )
finalprivatevirtual

Reimplemented from Nektar::LibUtilities::Points< NekDouble >.

Definition at line 43 of file NodalQuadElec.cpp.

44{
45 // Allocate the storage for points
46 size_t numPoints = GetNumPoints();
47
48 PointsKey e(numPoints, eGaussLobattoLegendre);
49 PointsManager()[e]->GetPoints(m_e0);
50 m_ew = PointsManager()[e]->GetW();
51
52 for (size_t i = 0; i < 2; i++)
53 {
54 m_points[i] = Array<OneD, DataType>(numPoints * numPoints);
55 }
56
57 for (size_t j = 0, ct = 0; j < numPoints; j++)
58 {
59 for (size_t i = 0; i < numPoints; i++, ct++)
60 {
61 m_points[0][ct] = m_e0[i];
62 m_points[1][ct] = m_e0[j];
63 }
64 }
65}
Array< OneD, NekDouble > m_ew
1D GLL weights
Definition: NodalQuadElec.h:68
Array< OneD, NekDouble > m_e0
1D GLL points
Definition: NodalQuadElec.h:66
Array< OneD, DataType > m_points[3]
Storage for the point locations, allowing for up to a 3D points storage.
Definition: Points.h:356
PointsManagerT & PointsManager(void)
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:51

References Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::Points< NekDouble >::GetNumPoints(), m_e0, m_ew, Nektar::LibUtilities::Points< NekDouble >::m_points, and Nektar::LibUtilities::PointsManager().

◆ v_CalculateWeights()

void Nektar::LibUtilities::NodalQuadElec::v_CalculateWeights ( )
finalprivatevirtual

Reimplemented from Nektar::LibUtilities::Points< NekDouble >.

Definition at line 67 of file NodalQuadElec.cpp.

68{
69 size_t numPoints = GetNumPoints();
70
71 m_weights = Array<OneD, DataType>(numPoints * numPoints);
72
73 for (size_t j = 0, ct = 0; j < numPoints; j++)
74 {
75 for (size_t i = 0; i < numPoints; i++, ct++)
76 {
77 m_weights[ct] = m_ew[i] * m_ew[j];
78 }
79 }
80}
Array< OneD, DataType > m_weights
Quadrature weights for the weights.
Definition: Points.h:358

References Nektar::LibUtilities::Points< NekDouble >::GetNumPoints(), m_ew, and Nektar::LibUtilities::Points< NekDouble >::m_weights.

Member Data Documentation

◆ initPointsManager

bool Nektar::LibUtilities::NodalQuadElec::initPointsManager
staticprivate
Initial value:
bool RegisterCreator(const KeyType &key, const CreateFuncType &createFunc)
Register the given function and associate it with the key. The return value is just to facilitate cal...
Definition: NekManager.hpp:168
static std::shared_ptr< PointsBaseType > Create(const PointsKey &key)
@ eNodalQuadElec
2D GLL for quad
Definition: PointsType.h:93

Definition at line 60 of file NodalQuadElec.h.

◆ m_e0

Array<OneD, NekDouble> Nektar::LibUtilities::NodalQuadElec::m_e0
private

1D GLL points

Definition at line 66 of file NodalQuadElec.h.

Referenced by v_CalculatePoints().

◆ m_ew

Array<OneD, NekDouble> Nektar::LibUtilities::NodalQuadElec::m_ew
private

1D GLL weights

Definition at line 68 of file NodalQuadElec.h.

Referenced by v_CalculatePoints(), and v_CalculateWeights().