45 :
StdExpansion(LibUtilities::StdTriData::getNumberOfCoefficients(
46 Ba.GetNumModes(), Bb.GetNumModes()),
49 Ba.GetNumModes(), Bb.GetNumModes()),
51 StdTriExp(Ba, Bb), m_nodalPointsKey(Ba.GetNumModes(), Ntype)
54 "Nodal basis initiated with different orders in the a "
84 modal = (*inv_vdm) * nodal;
113 nodal = (*vdm) * modal;
193 "calling argument mode is larger than total expansion order");
196 outarray[mode] = 1.0;
215 const int i, [[maybe_unused]]
const int j,
216 [[maybe_unused]]
bool UseGLL)
const
218 ASSERTL2(i >= 0 && i <= 2,
"edge id is out of range");
239 m_base[dir]->GetNumModes(),
246 "Unexpected points distribution " +
249 " in StdNodalTriExp::v_GetTraceBasisKey");
259 case LibUtilities::eGaussRadauMAlpha1Beta0:
269 m_base[dir]->GetNumModes(),
276 "Unexpected points distribution " +
279 " in StdNodalTriExp::v_GetTraceBasisKey");
287 "Information not available to set edge key");
298 [[maybe_unused]]
bool useCoeffPacking)
300 ASSERTL0(localVertexId >= 0 && localVertexId <= 2,
301 "Local Vertex ID must be between 0 and 2");
302 return localVertexId;
309 [[maybe_unused]]
int Q)
311 ASSERTL0(eid >= 0 && eid <= 2,
"Local Edge ID must be between 0 and 2");
316 "Nodal triangle not set up to deal with variable "
317 "polynomial order.");
319 if (maparray.size() != nEdgeCoeffs)
324 if (signarray.size() != nEdgeCoeffs)
330 fill(signarray.data(), signarray.data() + nEdgeCoeffs, 1);
340 maparray[nEdgeCoeffs - 1] = eid == 2 ? 0 : eid + 1;
341 for (
int i = 2; i < nEdgeCoeffs; i++)
343 maparray[i - 1] = eid * (nEdgeCoeffs - 2) + 1 + i;
348 reverse(maparray.data(), maparray.data() + nEdgeCoeffs);
356 ASSERTL0(eid >= 0 && eid <= 2,
"Local Edge ID must be between 0 and 2");
360 if (maparray.size() != nEdgeIntCoeffs)
365 if (signarray.size() != nEdgeIntCoeffs)
371 fill(signarray.data(), signarray.data() + nEdgeIntCoeffs, 1);
380 for (
int i = 0; i < nEdgeIntCoeffs; i++)
382 maparray[i] = eid * nEdgeIntCoeffs + 3 + i;
387 reverse(maparray.data(), maparray.data() + nEdgeIntCoeffs);
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
Describes the specification for a Basis.
Defines a specification for a set of points.
PointsType GetPointsType() const
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
The base class for all shapes.
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
void WeakDerivMatrixOp_MatFree(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void LaplacianMatrixOp_MatFree_GenericImpl(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
int NumBndryCoeffs(void) const
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
DNekMatSharedPtr CreateGeneralMatrix(const StdMatrixKey &mkey)
this function generates the mass matrix
void LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
int GetTraceNcoeffs(const int i) const
This function returns the number of expansion coefficients belonging to the i-th trace.
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
Array< OneD, const NekDouble > GetStdFac(const StdFacKey &mkey)
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
Calculates the inner product of a given function f with the different modes of the expansion.
void HelmholtzMatrixOp_MatFree_GenericImpl(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
int GetBasisNumModes(const int dir) const
This function returns the number of expansion modes in the dir direction.
Array< OneD, LibUtilities::BasisSharedPtr > m_base
std::vector< Array< OneD, const NekDouble > > m_weights
void MassMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
MatrixType GetMatrixType() const
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
void v_NodalToModal(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) override
void NodalToModalTranspose(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void GetNodalPoints(Array< OneD, const NekDouble > &x, Array< OneD, const NekDouble > &y)
void ModalToNodal(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
int v_NumBndryCoeffs() const override
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_GetTraceInteriorToElementMap(const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation edgeOrient=eForwards) override
void v_GetTraceToElementMap(const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient=eForwards, int P=-1, int Q=-1) override
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculate the inner product of inarray with respect to the basis B=base0*base1 and put into outarray.
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
LibUtilities::ShapeType v_DetShapeType() const final
LibUtilities::PointsKey m_nodalPointsKey
const LibUtilities::BasisKey v_GetTraceBasisKey(const int i, const int j, bool UseGLL=false) const override
void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray) override
void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray) override
void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
bool v_IsNodalNonTensorialExp() override
void v_GetInteriorMap(Array< OneD, unsigned int > &outarray) override
DNekMatSharedPtr GenNBasisTransMatrix()
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Backward tranform for triangular elements.
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray) override
static const BasisKey NullBasisKey(eNoBasisType, 0, NullPointsKey)
Defines a null basis with no type or points.
const std::string kPointsTypeStr[]
PointsManagerT & PointsManager(void)
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_B
Principle Modified Functions .
@ eOrtho_A
Principle Orthogonal Functions .
@ eGLL_Lagrange
Lagrange for SEM basis .
@ eOrtho_B
Principle Orthogonal Functions .
@ eModified_A
Principle Modified Functions .
static VarFactorsMap NullVarFactorsMap
static ConstFactorMap NullConstFactorMap
static VarCoeffMap NullVarCoeffMap
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
std::shared_ptr< DNekMat > DNekMatSharedPtr
void Zero(int n, T *x, const int incx)
Zero vector.