Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  int P = -1);
196  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
197  bool useCoeffPacking = false);
199  const int eid,
200  const Orientation edgeOrient,
201  Array<OneD, unsigned int>& maparray,
202  Array<OneD, int>& signarray);
204  Array<OneD, unsigned int>& outarray);
206  Array<OneD, unsigned int>& outarray);
207 
208 
209  //---------------------------------------
210  // Wrapper functions
211  //---------------------------------------
213  const StdMatrixKey &mkey);
215  const StdMatrixKey &mkey);
216 
217 
218  //---------------------------------------
219  // Operator evaluation functions
220  //---------------------------------------
221  STD_REGIONS_EXPORT virtual void v_MassMatrixOp(
222  const Array<OneD, const NekDouble> &inarray,
223  Array<OneD, NekDouble> &outarray,
224  const StdMatrixKey &mkey);
226  const Array<OneD, const NekDouble> &inarray,
227  Array<OneD, NekDouble> &outarray,
228  const StdMatrixKey &mkey);
230  Array<OneD, NekDouble> &array,
231  const StdMatrixKey &mkey);
233  int numMin,
234  const Array<OneD, const NekDouble> &inarray,
235  Array<OneD, NekDouble> &outarray);
237  const int k1,
238  const int k2,
239  const Array<OneD, const NekDouble> &inarray,
240  Array<OneD, NekDouble> &outarray,
241  const StdMatrixKey &mkey);
243  const int i,
244  const Array<OneD, const NekDouble> &inarray,
245  Array<OneD, NekDouble> &outarray,
246  const StdMatrixKey &mkey);
248  const Array<OneD, const NekDouble> &inarray,
249  Array<OneD, NekDouble> &outarray,
250  const StdMatrixKey &mkey);
252  const Array<OneD, const NekDouble> &inarray,
253  Array<OneD, NekDouble> &outarray,
254  const StdMatrixKey &mkey);
255 
257  const Array<OneD, const NekDouble>& inarray,
258  Array<OneD, NekDouble>& outarray);
259 
260  //---------------------------------------
261  // Output interpolation functions
262  //---------------------------------------
264  Array<OneD, int> &conn,
265  bool standard = true);
266  };
267  typedef boost::shared_ptr<StdTriExp> StdTriExpSharedPtr;
268  } //end of namespace
269 } //end of namespace
270 #endif //STDTRIEXP_H
boost::shared_ptr< StdTriExp > StdTriExpSharedPtr
Definition: StdTriExp.h:267
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:561
virtual void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1539
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Backward tranform for triangular elements.
Definition: StdTriExp.cpp:252
virtual void v_GetEdgeToElementMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P=-1)
Definition: StdTriExp.cpp:912
static Array< OneD, NekDouble > NullNekDouble1DArray
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:1565
virtual LibUtilities::ShapeType v_DetShapeType() const
Definition: StdTriExp.cpp:751
virtual int v_NumDGBndryCoeffs() const
Definition: StdTriExp.cpp:766
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1372
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:330
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:466
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1381
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:595
virtual int v_GetEdgeNumPoints(const int i) const
Definition: StdTriExp.cpp:790
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
Definition: StdTriExp.cpp:1191
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1390
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Definition: StdTriExp.cpp:675
virtual int v_DetCartesianDirOfEdge(const int edge)
Definition: StdTriExp.cpp:857
virtual int v_NumBndryCoeffs() const
Definition: StdTriExp.cpp:756
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1258
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
Definition: StdTriExp.cpp:804
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
Definition: StdTriExp.cpp:1610
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:1482
virtual int v_GetNverts() const
Definition: StdTriExp.cpp:741
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
Definition: StdTriExp.cpp:816
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Definition: StdTriExp.cpp:1221
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1345
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1353
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
Definition: StdTriExp.cpp:1335
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Definition: StdTriExp.cpp:485
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:473
double NekDouble
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:260
virtual int v_GetEdgeNcoeffs(const int i) const
Definition: StdTriExp.cpp:776
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:272
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:225
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrates the specified function over the domain.
Definition: StdTriExp.cpp:82
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:312
#define STD_REGIONS_EXPORT
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:553
virtual bool v_IsBoundaryInteriorExpansion()
Definition: StdTriExp.cpp:851
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
Definition: StdTriExp.cpp:1041
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
Definition: StdTriExp.cpp:692
virtual int v_GetNedges() const
Definition: StdTriExp.cpp:746
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:130
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:514
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Definition: StdTriExp.cpp:1105
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z)
Definition: StdTriExp.cpp:831
Describes the specification for a Basis.
Definition: Basis.h:50
virtual const LibUtilities::BasisKey v_DetEdgeBasisKey(const int edge) const
Definition: StdTriExp.cpp:864