Nektar++
StdNodalTriExp.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: StdNodalTriExp.h
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: Header field for Nodal triangle routines built upon
32// StdExpansion2D
33//
34///////////////////////////////////////////////////////////////////////////////
35
36#ifndef STDNODALTRIEXP_H
37#define STDNODALTRIEXP_H
38
42
43namespace Nektar
44{
45namespace StdRegions
46{
47class StdNodalTriExp : virtual public StdTriExp
48{
49public:
52 const LibUtilities::BasisKey &Bb,
53 const LibUtilities::PointsType Ntype);
55 STD_REGIONS_EXPORT ~StdNodalTriExp() override = default;
56
57 //-------------------------------
58 // Nodal basis specific routines
59 //-------------------------------
61 const Array<OneD, const NekDouble> &inarray,
62 Array<OneD, NekDouble> &outarray);
64 const Array<OneD, const NekDouble> &inarray,
65 Array<OneD, NekDouble> &outarray);
67 const Array<OneD, const NekDouble> &inarray,
68 Array<OneD, NekDouble> &outarray);
72
73protected:
75
77 const override
78 {
79 return m_nodalPointsKey;
80 };
81
83
84 //---------------------------------------
85 // Transforms
86 //---------------------------------------
88 const Array<OneD, const NekDouble> &inarray,
89 Array<OneD, NekDouble> &outarray) override;
91 const Array<OneD, const NekDouble> &inarray,
92 Array<OneD, NekDouble> &outarray) override;
94 const Array<OneD, const NekDouble> &inarray,
95 Array<OneD, NekDouble> &outarray) override;
96
97 //---------------------------------------
98 // Inner product functions
99 //---------------------------------------
101 const Array<OneD, const NekDouble> &inarray,
102 Array<OneD, NekDouble> &outarray) override;
104 const Array<OneD, const NekDouble> &inarray,
105 Array<OneD, NekDouble> &outarray,
106 bool multiplybyweights = true) override;
108 const int dir, const Array<OneD, const NekDouble> &inarray,
109 Array<OneD, NekDouble> &outarray) override;
111 const int dir, const Array<OneD, const NekDouble> &inarray,
112 Array<OneD, NekDouble> &outarray) override;
113
114 //---------------------------------------
115 // Evaluation functions
116 //---------------------------------------
118 const int mode, Array<OneD, NekDouble> &outarray) override;
119
120 //---------------------------
121 // Helper functions
122 //---------------------------
123 STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override;
124
125 //--------------------------
126 // Mappings
127 //--------------------------
129 int localVertexId, bool useCoeffPacking = false) override;
130
132 const int eid, Array<OneD, unsigned int> &maparray,
133 Array<OneD, int> &signarray, Orientation edgeOrient = eForwards,
134 int P = -1, int Q = -1) override;
135
137 const int eid, Array<OneD, unsigned int> &maparray,
138 Array<OneD, int> &signarray,
139 const Orientation edgeOrient = eForwards) override;
140
142 Array<OneD, unsigned int> &outarray) override;
144 Array<OneD, unsigned int> &outarray) override;
145
146 //---------------------------------------
147 // Operator evaluation functions
148 //---------------------------------------
150 const Array<OneD, const NekDouble> &inarray,
151 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
153 const Array<OneD, const NekDouble> &inarray,
154 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
156 const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
157 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
159 const int i, const Array<OneD, const NekDouble> &inarray,
160 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
162 const Array<OneD, const NekDouble> &inarray,
163 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
164
165 //---------------------------------------
166 // Wrapper functions
167 //---------------------------------------
169 v_GenMatrix(const StdMatrixKey &mkey) override;
171 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
172};
173
174typedef std::shared_ptr<StdNodalTriExp> StdNodalTriExpSharedPtr;
175} // namespace StdRegions
176} // namespace Nektar
177
178#endif // STDNODALTRIEXP_H
#define STD_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:47
Defines a specification for a set of points.
Definition: Points.h:55
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
void NodalToModal(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) 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)
~StdNodalTriExp() override=default
void GetNodalPoints(Array< OneD, const NekDouble > &x, Array< OneD, const NekDouble > &y)
void ModalToNodal(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
const LibUtilities::PointsKey v_GetNodalPointsKey() const override
void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Transform a given function from physical quadrature space to coefficient space.
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
Calculates the inner product of a given function f with the different modes of the expansion.
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
LibUtilities::PointsKey m_nodalPointsKey
void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) 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
void v_GetInteriorMap(Array< OneD, unsigned int > &outarray) override
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
@ P
Monomial polynomials .
Definition: BasisType.h:64
std::shared_ptr< StdNodalTriExp > StdNodalTriExpSharedPtr
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75