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

#include <NodalHexElec.h>

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

Public Member Functions

 ~NodalHexElec () override
 
 NodalHexElec (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

 NodalHexElec ()=delete
 
 NodalHexElec (const NodalHexElec &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 46 of file NodalHexElec.h.

Constructor & Destructor Documentation

◆ ~NodalHexElec()

Nektar::LibUtilities::NodalHexElec::~NodalHexElec ( )
inlineoverride

Definition at line 49 of file NodalHexElec.h.

50 {
51 }

◆ NodalHexElec() [1/3]

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

Definition at line 56 of file NodalHexElec.h.

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

◆ NodalHexElec() [2/3]

Nektar::LibUtilities::NodalHexElec::NodalHexElec ( )
privatedelete

◆ NodalHexElec() [3/3]

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

Member Function Documentation

◆ Create()

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

Definition at line 92 of file NodalHexElec.cpp.

93{
94 std::shared_ptr<PointsBaseType> returnval(
96 returnval->Initialize();
97 return returnval;
98}
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

◆ v_CalculateDerivMatrix()

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

Definition at line 88 of file NodalHexElec.cpp.

89{
90}

◆ v_CalculatePoints()

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

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

Definition at line 42 of file NodalHexElec.cpp.

43{
44 // Allocate the storage for points
45 size_t numPoints = GetNumPoints();
46
47 PointsKey e(numPoints, eGaussLobattoLegendre);
48 PointsManager()[e]->GetPoints(m_e0);
49 m_ew = PointsManager()[e]->GetW();
50
51 for (size_t i = 0; i < 3; i++)
52 {
53 m_points[i] = Array<OneD, DataType>(numPoints * numPoints * numPoints);
54 }
55
56 for (size_t k = 0, ct = 0; k < numPoints; k++)
57 {
58 for (size_t j = 0; j < numPoints; j++)
59 {
60 for (size_t i = 0; i < numPoints; i++, ct++)
61 {
62 m_points[0][ct] = m_e0[i];
63 m_points[1][ct] = m_e0[j];
64 m_points[2][ct] = m_e0[k];
65 }
66 }
67 }
68}
Array< OneD, NekDouble > m_ew
1D GLL weights.
Definition: NodalHexElec.h:69
Array< OneD, NekDouble > m_e0
1D GLL points.
Definition: NodalHexElec.h:67
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::NodalHexElec::v_CalculateWeights ( )
finalprivatevirtual

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

Definition at line 70 of file NodalHexElec.cpp.

71{
72 size_t numPoints = GetNumPoints();
73
74 m_weights = Array<OneD, DataType>(numPoints * numPoints * numPoints);
75
76 for (size_t k = 0, ct = 0; k < numPoints; k++)
77 {
78 for (size_t j = 0; j < numPoints; j++)
79 {
80 for (size_t i = 0; i < numPoints; i++, ct++)
81 {
82 m_weights[ct] = m_ew[i] * m_ew[j] * m_ew[k];
83 }
84 }
85 }
86}
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::NodalHexElec::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)
@ eNodalHexElec
3D GLL for hex
Definition: PointsType.h:94

Definition at line 61 of file NodalHexElec.h.

◆ m_e0

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

1D GLL points.

Definition at line 67 of file NodalHexElec.h.

Referenced by v_CalculatePoints().

◆ m_ew

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

1D GLL weights.

Definition at line 69 of file NodalHexElec.h.

Referenced by v_CalculatePoints(), and v_CalculateWeights().