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 
40 #include <StdRegions/StdTriExp.h>
42 
43 namespace Nektar
44 {
45  namespace StdRegions
46  {
47  class StdNodalTriExp: public StdTriExp
48  {
49  public:
52  const LibUtilities::BasisKey &Ba,
53  const LibUtilities::BasisKey &Bb,
54  const LibUtilities::PointsType Ntype);
55  STD_REGIONS_EXPORT StdNodalTriExp(const StdNodalTriExp &T);
57 
58  //-------------------------------
59  // Nodal basis specific routines
60  //-------------------------------
62  const Array<OneD, const NekDouble>& inarray,
63  Array<OneD, NekDouble>& outarray);
65  const Array<OneD, const NekDouble>& inarray,
66  Array<OneD, NekDouble>& outarray);
68  const Array<OneD, const NekDouble>& inarray,
69  Array<OneD, NekDouble>& outarray);
74 
75 
76  protected:
78 
80  {
81  return m_nodalPointsKey;
82  };
83 
85 
86  //---------------------------------------
87  // Transforms
88  //---------------------------------------
89  STD_REGIONS_EXPORT virtual void v_BwdTrans(
90  const Array<OneD, const NekDouble>& inarray,
91  Array<OneD, NekDouble>& outarray);
93  const Array<OneD, const NekDouble>& inarray,
94  Array<OneD, NekDouble>& outarray);
95  STD_REGIONS_EXPORT virtual void v_FwdTrans(
96  const Array<OneD, const NekDouble>& inarray,
97  Array<OneD, NekDouble>& outarray);
98 
99 
100  //---------------------------------------
101  // Inner product functions
102  //---------------------------------------
104  const Array<OneD, const NekDouble>& inarray,
105  Array<OneD, NekDouble>& outarray);
107  const Array<OneD, const NekDouble>& inarray,
108  Array<OneD, NekDouble>& outarray,
109  bool multiplybyweights = true);
111  const int dir,
112  const Array<OneD, const NekDouble>& inarray,
113  Array<OneD, NekDouble>& outarray);
115  const int dir,
116  const Array<OneD, const NekDouble>& inarray,
117  Array<OneD, NekDouble>& outarray);
118 
119 
120  //---------------------------------------
121  // Evaluation functions
122  //---------------------------------------
123  STD_REGIONS_EXPORT virtual void v_FillMode(
124  const int mode,
125  Array<OneD, NekDouble> &outarray);
126 
127 
128  //---------------------------
129  // Helper functions
130  //---------------------------
131  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
132 
133  //--------------------------
134  // Mappings
135  //--------------------------
137  const int eid,
138  const Orientation edgeOrient,
139  Array<OneD, unsigned int>& maparray,
140  Array<OneD, int>& signarray,
141  int P);
142  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
143  bool useCoeffPacking = false);
145  const int eid,
146  const Orientation edgeOrient,
147  Array<OneD, unsigned int>& maparray,
148  Array<OneD, int>& signarray);
150  Array<OneD, unsigned int>& outarray);
152  Array<OneD, unsigned int>& outarray);
153 
154 
155  //---------------------------------------
156  // Operator evaluation functions
157  //---------------------------------------
158  STD_REGIONS_EXPORT virtual void v_MassMatrixOp(
159  const Array<OneD, const NekDouble> &inarray,
160  Array<OneD, NekDouble> &outarray,
161  const StdMatrixKey &mkey);
163  const Array<OneD, const NekDouble> &inarray,
164  Array<OneD, NekDouble> &outarray,
165  const StdMatrixKey &mkey);
167  const int k1,
168  const int k2,
169  const Array<OneD, const NekDouble> &inarray,
170  Array<OneD, NekDouble> &outarray,
171  const StdMatrixKey &mkey);
173  const int i,
174  const Array<OneD, const NekDouble> &inarray,
175  Array<OneD, NekDouble> &outarray,
176  const StdMatrixKey &mkey);
178  const Array<OneD, const NekDouble> &inarray,
179  Array<OneD, NekDouble> &outarray,
180  const StdMatrixKey &mkey);
181 
182 
183  //---------------------------------------
184  // Wrapper functions
185  //---------------------------------------
187  const StdMatrixKey &mkey);
189  const StdMatrixKey &mkey);
190  };
191 
192  typedef std::shared_ptr<StdNodalTriExp> StdNodalTriExpSharedPtr;
193  } //end of namespace
194 } //end of namespace
195 
196 #endif //STDNODALTRIEXP_H
std::shared_ptr< StdNodalTriExp > StdNodalTriExpSharedPtr
virtual const LibUtilities::PointsKey v_GetNodalPointsKey() const
void ModalToNodal(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculate the inner product of inarray with respect to the basis B=base0[p]*base1[pq] and put into ou...
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void NodalToModalTranspose(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Backward tranform for triangular elements.
LibUtilities::PointsKey m_nodalPointsKey
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
virtual void v_GetEdgeToElementMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P)
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Transform a given function from physical quadrature space to coefficient space.
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void GetNodalPoints(Array< OneD, const NekDouble > &x, Array< OneD, const NekDouble > &y)
Defines a specification for a set of points.
Definition: Points.h:59
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
#define STD_REGIONS_EXPORT
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void NodalToModal(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Describes the specification for a Basis.
Definition: Basis.h:49
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)