Nektar++
StdTriExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File StdTriExp.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 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Header field for triangle routines built upon StdExpansion2D
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_LIB_STDREGIONS_STDTRIEXP_H
37 #define NEKTAR_LIB_STDREGIONS_STDTRIEXP_H
38 
42 
43 
44 namespace Nektar
45 {
46  namespace StdRegions
47  {
48  class StdMatrixKey;
49 
50  class StdTriExp : virtual public StdExpansion2D
51  {
52  public:
55  const LibUtilities::BasisKey &Ba,
56  const LibUtilities::BasisKey &Bb);
57  STD_REGIONS_EXPORT StdTriExp(const StdTriExp &T);
59 
60  protected:
61  //-------------------------------
62  // Integration Methods
63  //-------------------------------
65  const Array<OneD, const NekDouble>& inarray);
66 
67 
68  //----------------------------
69  // Differentiation Methods
70  //----------------------------
71  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
72  const Array<OneD, const NekDouble>& inarray,
73  Array<OneD, NekDouble>& out_d0,
74  Array<OneD, NekDouble>& out_d1,
76  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
77  const int dir,
78  const Array<OneD, const NekDouble>& inarray,
79  Array<OneD, NekDouble>& outarray);
81  const Array<OneD, const NekDouble>& inarray,
82  Array<OneD, NekDouble>& out_d0,
83  Array<OneD, NekDouble>& out_d1,
86  const int dir,
87  const Array<OneD, const NekDouble>& inarray,
88  Array<OneD, NekDouble>& outarray);
89 
90 
91  //---------------------------------------
92  // Transforms
93  //---------------------------------------
94  STD_REGIONS_EXPORT virtual void v_BwdTrans(
95  const Array<OneD, const NekDouble>& inarray,
96  Array<OneD, NekDouble>& outarray);
98  const Array<OneD, const NekDouble>& inarray,
99  Array<OneD, NekDouble>& outarray);
101  const Array<OneD, const NekDouble>& base0,
102  const Array<OneD, const NekDouble>& base1,
103  const Array<OneD, const NekDouble>& inarray,
104  Array<OneD, NekDouble>& outarray,
106  bool doCheckCollDir0,
107  bool doCheckCollDir1);
108  STD_REGIONS_EXPORT virtual void v_FwdTrans(
109  const Array<OneD, const NekDouble>& inarray,
110  Array<OneD, NekDouble>& outarray);
112  const Array<OneD, const NekDouble>& inarray,
113  Array<OneD, NekDouble>& outarray);
114 
115 
116  //---------------------------------------
117  // Inner product functions
118  //---------------------------------------
120  const Array<OneD, const NekDouble>& inarray,
121  Array<OneD, NekDouble>& outarray);
123  const Array<OneD, const NekDouble>& inarray,
124  Array<OneD, NekDouble>& outarray);
126  const Array<OneD, const NekDouble>& inarray,
127  Array<OneD, NekDouble>& outarray,
128  bool multiplybyweights = true);
130  const Array<OneD, const NekDouble>& base0,
131  const Array<OneD, const NekDouble>& base1,
132  const Array<OneD, const NekDouble>& inarray,
133  Array<OneD, NekDouble>& outarray,
135  bool doCheckCollDir0,
136  bool doCheckCollDir1);
138  const int dir,
139  const Array<OneD, const NekDouble>& inarray,
140  Array<OneD, NekDouble>& outarray);
142  const int dir,
143  const Array<OneD, const NekDouble>& inarray,
144  Array<OneD, NekDouble>& outarray);
146  const int dir,
147  const Array<OneD, const NekDouble>& inarray,
148  Array<OneD, NekDouble>& outarray);
149 
150 
151  //---------------------------------------
152  // Evaluation functions
153  //---------------------------------------
157  STD_REGIONS_EXPORT virtual void v_FillMode(
158  const int mode,
159  Array<OneD, NekDouble> &outarray);
160 
161 
162  //---------------------------
163  // Helper functions
164  //---------------------------
165  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
166  STD_REGIONS_EXPORT virtual int v_GetNedges() const;
168  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
169  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
170  STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const;
171  STD_REGIONS_EXPORT virtual int v_GetEdgeNumPoints(const int i) const;
173  const std::vector<unsigned int> &nummodes,
174  int &modes_offset);
176  const int i) const;
177  STD_REGIONS_EXPORT virtual void v_GetCoords(
178  Array<OneD, NekDouble> &coords_x,
179  Array<OneD, NekDouble> &coords_y,
180  Array<OneD, NekDouble> &coords_z);
182  STD_REGIONS_EXPORT virtual int v_DetCartesianDirOfEdge(const int edge);
184  v_DetEdgeBasisKey(const int edge) const;
185 
186 
187  //--------------------------
188  // Mappings
189  //--------------------------
191  const int eid,
192  const Orientation edgeOrient,
193  Array<OneD, unsigned int>& maparray,
194  Array<OneD, int>& signarray);
195  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
196  bool useCoeffPacking = false);
198  const int eid,
199  const Orientation edgeOrient,
200  Array<OneD, unsigned int>& maparray,
201  Array<OneD, int>& signarray);
203  Array<OneD, unsigned int>& outarray);
205  Array<OneD, unsigned int>& outarray);
206 
207 
208  //---------------------------------------
209  // Wrapper functions
210  //---------------------------------------
212  const StdMatrixKey &mkey);
214  const StdMatrixKey &mkey);
215 
216 
217  //---------------------------------------
218  // Operator evaluation functions
219  //---------------------------------------
220  STD_REGIONS_EXPORT virtual void v_MassMatrixOp(
221  const Array<OneD, const NekDouble> &inarray,
222  Array<OneD, NekDouble> &outarray,
223  const StdMatrixKey &mkey);
225  const Array<OneD, const NekDouble> &inarray,
226  Array<OneD, NekDouble> &outarray,
227  const StdMatrixKey &mkey);
229  Array<OneD, NekDouble> &array,
230  const StdMatrixKey &mkey);
232  int numMin,
233  const Array<OneD, const NekDouble> &inarray,
234  Array<OneD, NekDouble> &outarray);
236  const int k1,
237  const int k2,
238  const Array<OneD, const NekDouble> &inarray,
239  Array<OneD, NekDouble> &outarray,
240  const StdMatrixKey &mkey);
242  const int i,
243  const Array<OneD, const NekDouble> &inarray,
244  Array<OneD, NekDouble> &outarray,
245  const StdMatrixKey &mkey);
247  const Array<OneD, const NekDouble> &inarray,
248  Array<OneD, NekDouble> &outarray,
249  const StdMatrixKey &mkey);
251  const Array<OneD, const NekDouble> &inarray,
252  Array<OneD, NekDouble> &outarray,
253  const StdMatrixKey &mkey);
254 
256  const Array<OneD, const NekDouble>& inarray,
257  Array<OneD, NekDouble>& outarray);
258 
259  //---------------------------------------
260  // Output interpolation functions
261  //---------------------------------------
263  Array<OneD, int> &conn,
264  bool standard = true);
265  };
266  typedef boost::shared_ptr<StdTriExp> StdTriExpSharedPtr;
267  } //end of namespace
268 } //end of namespace
269 #endif //STDTRIEXP_H
boost::shared_ptr< StdTriExp > StdTriExpSharedPtr
Definition: StdTriExp.h:266
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:559
virtual void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1449
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Backward tranform for triangular elements.
Definition: StdTriExp.cpp:250
static Array< OneD, NekDouble > NullNekDouble1DArray
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:1475
virtual LibUtilities::ShapeType v_DetShapeType() const
Definition: StdTriExp.cpp:749
virtual int v_NumDGBndryCoeffs() const
Definition: StdTriExp.cpp:764
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1321
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:328
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...
Definition: StdTriExp.cpp:464
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1330
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:593
virtual int v_GetEdgeNumPoints(const int i) const
Definition: StdTriExp.cpp:788
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
Definition: StdTriExp.cpp:1153
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1339
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Definition: StdTriExp.cpp:673
virtual int v_DetCartesianDirOfEdge(const int edge)
Definition: StdTriExp.cpp:855
virtual int v_NumBndryCoeffs() const
Definition: StdTriExp.cpp:754
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1220
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
Definition: StdTriExp.cpp:802
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
Definition: StdTriExp.cpp:1520
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:1392
virtual int v_GetNverts() const
Definition: StdTriExp.cpp:739
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
Definition: StdTriExp.cpp:814
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Definition: StdTriExp.cpp:1183
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1294
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1302
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1284
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Definition: StdTriExp.cpp:483
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:471
double NekDouble
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:258
virtual int v_GetEdgeNcoeffs(const int i) const
Definition: StdTriExp.cpp:774
virtual void v_BwdTrans_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1)
Definition: StdTriExp.cpp:270
virtual void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
Definition: StdTriExp.cpp:223
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrates the specified function over the domain.
Definition: StdTriExp.cpp:80
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.
Definition: StdTriExp.cpp:310
#define STD_REGIONS_EXPORT
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:551
virtual bool v_IsBoundaryInteriorExpansion()
Definition: StdTriExp.cpp:849
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
Definition: StdTriExp.cpp:1003
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:690
virtual int v_GetNedges() const
Definition: StdTriExp.cpp:744
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
Calculate the derivative of the physical points.
Definition: StdTriExp.cpp:128
virtual void v_IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1)
Definition: StdTriExp.cpp:512
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Definition: StdTriExp.cpp:1067
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z)
Definition: StdTriExp.cpp:829
Describes the specification for a Basis.
Definition: Basis.h:50
virtual void v_GetEdgeToElementMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Definition: StdTriExp.cpp:910
virtual const LibUtilities::BasisKey v_DetEdgeBasisKey(const int edge) const
Definition: StdTriExp.cpp:862