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,
75  Array<OneD, NekDouble>& out_d2 = NullNekDouble1DArray);
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,
84  Array<OneD, NekDouble>& out_d2 = NullNekDouble1DArray);
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,
105  Array<OneD, NekDouble>& wsp,
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);
129  const Array<OneD, const NekDouble>& base0,
130  const Array<OneD, const NekDouble>& base1,
131  const Array<OneD, const NekDouble>& inarray,
132  Array<OneD, NekDouble>& outarray,
133  Array<OneD, NekDouble>& wsp,
134  bool doCheckCollDir0,
135  bool doCheckCollDir1);
137  const int dir,
138  const Array<OneD, const NekDouble>& inarray,
139  Array<OneD, NekDouble>& outarray);
141  const int dir,
142  const Array<OneD, const NekDouble>& inarray,
143  Array<OneD, NekDouble>& outarray);
145  const int dir,
146  const Array<OneD, const NekDouble>& inarray,
147  Array<OneD, NekDouble>& outarray);
148 
149 
150  //---------------------------------------
151  // Evaluation functions
152  //---------------------------------------
154  const Array<OneD, const NekDouble>& xi,
155  Array<OneD, NekDouble>& eta);
156  STD_REGIONS_EXPORT virtual void v_FillMode(
157  const int mode,
158  Array<OneD, NekDouble> &outarray);
159 
160 
161  //---------------------------
162  // Helper functions
163  //---------------------------
164  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
165  STD_REGIONS_EXPORT virtual int v_GetNedges() const;
167  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
168  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
169  STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const;
170  STD_REGIONS_EXPORT virtual int v_GetEdgeNumPoints(const int i) const;
172  const std::vector<unsigned int> &nummodes,
173  int &modes_offset);
175  const int i) const;
176  STD_REGIONS_EXPORT virtual void v_GetCoords(
177  Array<OneD, NekDouble> &coords_x,
178  Array<OneD, NekDouble> &coords_y,
179  Array<OneD, NekDouble> &coords_z);
181  STD_REGIONS_EXPORT virtual int v_DetCartesianDirOfEdge(const int edge);
183  v_DetEdgeBasisKey(const int edge) const;
184 
185 
186  //--------------------------
187  // Mappings
188  //--------------------------
190  const int eid,
191  const Orientation edgeOrient,
192  Array<OneD, unsigned int>& maparray,
193  Array<OneD, int>& signarray);
194  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
195  bool useCoeffPacking = false);
197  const int eid,
198  const Orientation edgeOrient,
199  Array<OneD, unsigned int>& maparray,
200  Array<OneD, int>& signarray);
202  Array<OneD, unsigned int>& outarray);
204  Array<OneD, unsigned int>& outarray);
205 
206 
207  //---------------------------------------
208  // Wrapper functions
209  //---------------------------------------
211  const StdMatrixKey &mkey);
213  const StdMatrixKey &mkey);
214 
215 
216  //---------------------------------------
217  // Operator evaluation functions
218  //---------------------------------------
219  STD_REGIONS_EXPORT virtual void v_MassMatrixOp(
220  const Array<OneD, const NekDouble> &inarray,
221  Array<OneD, NekDouble> &outarray,
222  const StdMatrixKey &mkey);
224  const Array<OneD, const NekDouble> &inarray,
225  Array<OneD, NekDouble> &outarray,
226  const StdMatrixKey &mkey);
228  Array<OneD, NekDouble> &array,
229  const StdMatrixKey &mkey);
231  int numMin,
232  const Array<OneD, const NekDouble> &inarray,
233  Array<OneD, NekDouble> &outarray);
235  const int k1,
236  const int k2,
237  const Array<OneD, const NekDouble> &inarray,
238  Array<OneD, NekDouble> &outarray,
239  const StdMatrixKey &mkey);
241  const int i,
242  const Array<OneD, const NekDouble> &inarray,
243  Array<OneD, NekDouble> &outarray,
244  const StdMatrixKey &mkey);
246  const Array<OneD, const NekDouble> &inarray,
247  Array<OneD, NekDouble> &outarray,
248  const StdMatrixKey &mkey);
250  const Array<OneD, const NekDouble> &inarray,
251  Array<OneD, NekDouble> &outarray,
252  const StdMatrixKey &mkey);
253 
255  const Array<OneD, const NekDouble>& inarray,
256  Array<OneD, NekDouble>& outarray);
257 
258  //---------------------------------------
259  // Output interpolation functions
260  //---------------------------------------
262  Array<OneD, int> &conn,
263  bool standard = true);
264  };
265  typedef boost::shared_ptr<StdTriExp> StdTriExpSharedPtr;
266  } //end of namespace
267 } //end of namespace
268 #endif //STDTRIEXP_H