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 
41 #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 &Bb,
53  const LibUtilities::PointsType Ntype);
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 
73 protected:
75 
77  const
78  {
79  return m_nodalPointsKey;
80  };
81 
83 
84  //---------------------------------------
85  // Transforms
86  //---------------------------------------
87  STD_REGIONS_EXPORT virtual void v_BwdTrans(
88  const Array<OneD, const NekDouble> &inarray,
89  Array<OneD, NekDouble> &outarray);
91  const Array<OneD, const NekDouble> &inarray,
92  Array<OneD, NekDouble> &outarray);
93  STD_REGIONS_EXPORT virtual void v_FwdTrans(
94  const Array<OneD, const NekDouble> &inarray,
95  Array<OneD, NekDouble> &outarray);
96 
97  //---------------------------------------
98  // Inner product functions
99  //---------------------------------------
101  const Array<OneD, const NekDouble> &inarray,
102  Array<OneD, NekDouble> &outarray);
104  const Array<OneD, const NekDouble> &inarray,
105  Array<OneD, NekDouble> &outarray, bool multiplybyweights = true);
107  const int dir, const Array<OneD, const NekDouble> &inarray,
108  Array<OneD, NekDouble> &outarray);
110  const int dir, const Array<OneD, const NekDouble> &inarray,
111  Array<OneD, NekDouble> &outarray);
112 
113  //---------------------------------------
114  // Evaluation functions
115  //---------------------------------------
116  STD_REGIONS_EXPORT virtual void v_FillMode(
117  const int mode, Array<OneD, NekDouble> &outarray);
118 
119  //---------------------------
120  // Helper functions
121  //---------------------------
122  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
123 
124  //--------------------------
125  // Mappings
126  //--------------------------
127  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
128  bool useCoeffPacking = false);
129 
131  const int eid, Array<OneD, unsigned int> &maparray,
132  Array<OneD, int> &signarray, Orientation edgeOrient = eForwards,
133  int P = -1, int Q = -1);
134 
136  const int eid, Array<OneD, unsigned int> &maparray,
137  Array<OneD, int> &signarray, const Orientation edgeOrient = eForwards);
138 
140  Array<OneD, unsigned int> &outarray);
142  Array<OneD, unsigned int> &outarray);
143 
144  //---------------------------------------
145  // Operator evaluation functions
146  //---------------------------------------
147  STD_REGIONS_EXPORT virtual void v_MassMatrixOp(
148  const Array<OneD, const NekDouble> &inarray,
149  Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey);
151  const Array<OneD, const NekDouble> &inarray,
152  Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey);
154  const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
155  Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey);
157  const int i, const Array<OneD, const NekDouble> &inarray,
158  Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey);
160  const Array<OneD, const NekDouble> &inarray,
161  Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey);
162 
163  //---------------------------------------
164  // Wrapper functions
165  //---------------------------------------
167  const StdMatrixKey &mkey);
169  const StdMatrixKey &mkey);
170 };
171 
172 typedef std::shared_ptr<StdNodalTriExp> StdNodalTriExpSharedPtr;
173 } // namespace StdRegions
174 } // namespace Nektar
175 
176 #endif // STDNODALTRIEXP_H
#define STD_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:50
Defines a specification for a set of points.
Definition: Points.h:59
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void NodalToModal(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
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)
virtual void v_LaplacianMatrixOp(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)
void GetNodalPoints(Array< OneD, const NekDouble > &x, Array< OneD, const NekDouble > &y)
virtual const LibUtilities::PointsKey v_GetNodalPointsKey() const
void ModalToNodal(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
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_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
LibUtilities::PointsKey m_nodalPointsKey
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
virtual void v_GetTraceToElementMap(const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient=eForwards, int P=-1, int Q=-1)
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &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_GetTraceInteriorToElementMap(const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation edgeOrient=eForwards)
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Backward tranform for triangular elements.
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
std::shared_ptr< StdNodalTriExp > StdNodalTriExpSharedPtr
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75