Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
QuadExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File QuadExp.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: Expansion for quadrilateral elements.
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef QUADEXP_H
37 #define QUADEXP_H
38 
41 #include <LocalRegions/MatrixKey.h>
42 #include <StdRegions/StdQuadExp.h>
45 
46 
47 namespace Nektar
48 {
49  namespace LocalRegions
50  {
51 
52  class QuadExp: virtual public StdRegions::StdQuadExp,
53  virtual public Expansion2D
54  {
55  public:
56  /**
57  * @brief Constructor using BasisKey class for quadrature
58  * points and order definition
59  */
61  const LibUtilities::BasisKey &Ba,
62  const LibUtilities::BasisKey &Bb,
64 
65  LOCAL_REGIONS_EXPORT QuadExp(const QuadExp &T);
66 
68 
69  protected:
70  //-------------------------------
71  // Integration Methods
72  //-------------------------------
74  const Array<OneD, const NekDouble> &inarray);
75 
76  //----------------------------
77  // Differentiation Methods
78  //----------------------------
80  const Array<OneD, const NekDouble> &Lcoord,
81  const Array<OneD, const NekDouble> &physvals);
82  LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv(
83  const Array<OneD, const NekDouble> &inarray,
84  Array<OneD, NekDouble> &out_d0,
85  Array<OneD, NekDouble> &out_d1,
86  Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray);
87  LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv(
88  const int dir,
89  const Array<OneD, const NekDouble> &inarray,
90  Array<OneD, NekDouble> &outarray);
92  const Array<OneD, const NekDouble> &inarray,
93  const Array<OneD, const NekDouble> &direction,
94  Array<OneD, NekDouble> &out);
95 
96  //---------------------------------------
97  // Transforms
98  //---------------------------------------
99  LOCAL_REGIONS_EXPORT virtual void v_FwdTrans(
100  const Array<OneD, const NekDouble> &inarray,
101  Array<OneD, NekDouble> &outarray);
102 
104  const Array<OneD, const NekDouble> &inarray,
105  Array<OneD, NekDouble> &outarray);
106 
107  //---------------------------------------
108  // Inner product functions
109  //---------------------------------------
111  const Array<OneD, const NekDouble> &inarray,
112  Array<OneD, NekDouble> &outarray);
114  const int dir,
115  const Array<OneD, const NekDouble> &inarray,
116  Array<OneD, NekDouble> &outarray);
118  const Array<OneD, const NekDouble> &inarray,
119  Array<OneD, NekDouble> &outarray);
121  const Array<OneD, const NekDouble> &inarray,
122  Array<OneD, NekDouble> &outarray);
124  const int dir,
125  const Array<OneD, const NekDouble> &inarray,
126  Array<OneD, NekDouble> &outarray);
128  const int dir,
129  const Array<OneD, const NekDouble> &inarray,
130  Array<OneD, NekDouble> &outarray);
132  const Array<OneD, const NekDouble> &Fx,
133  const Array<OneD, const NekDouble> &Fy,
134  const Array<OneD, const NekDouble> &Fz,
135  Array<OneD, NekDouble> &outarray);
136 
137  //---------------------------------------
138  // Evaluation functions
139  //---------------------------------------
140  LOCAL_REGIONS_EXPORT virtual void v_GetCoord(
141  const Array<OneD, const NekDouble> &Lcoords,
142  Array<OneD, NekDouble> &coords);
143  LOCAL_REGIONS_EXPORT virtual void v_GetCoords(
144  Array<OneD, NekDouble> &coords_1,
145  Array<OneD, NekDouble> &coords_2,
146  Array<OneD, NekDouble> &coords_3);
148  const Array<OneD, const NekDouble> &coord,
149  const Array<OneD, const NekDouble> &physvals);
151  const int edge,
152  const Array<OneD, const NekDouble> &inarray,
153  Array<OneD, NekDouble> &outarray);
155  const int edge,
156  const StdRegions::StdExpansionSharedPtr &EdgeExp,
157  const Array<OneD, const NekDouble> &inarray,
158  Array<OneD, NekDouble> &outarray);
160  const int edge,
161  const StdRegions::StdExpansionSharedPtr &EdgeExp,
162  const Array<OneD, const NekDouble> &inarray,
163  Array<OneD, NekDouble> &outarray,
164  StdRegions::Orientation orient);
166  const int edge,
167  const Array<OneD, const NekDouble> &inarray,
168  Array<OneD, NekDouble> &outarray);
170  const int edge,
171  Array<OneD, NekDouble> &outarray);
173  const int edge);
174 
175 
176  //---------------------------------------
177  // Helper functions
178  //---------------------------------------
179  LOCAL_REGIONS_EXPORT virtual const
181  LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
183  const NekDouble *data,
184  const std::vector<unsigned int > &nummodes,
185  const int mode_offset,
186  NekDouble * coeffs);
187  LOCAL_REGIONS_EXPORT virtual
189  LOCAL_REGIONS_EXPORT virtual
191  LOCAL_REGIONS_EXPORT virtual const
193  LOCAL_REGIONS_EXPORT virtual int v_GetNumPoints(const int dir) const;
194 
195 
196  //---------------------------------------
197  // Matrix creation functions
198  //---------------------------------------
200  const StdRegions::StdMatrixKey &mkey);
201 
203  const StdRegions::StdMatrixKey &mkey);
205  const MatrixKey &mkey);
207  const MatrixKey &mkey);
208 
210  const MatrixKey &mkey);
211  LOCAL_REGIONS_EXPORT virtual
213  const MatrixKey &mkey);
214 
216  const MatrixKey &mkey);
217 
218 
219  //---------------------------------------
220  // Operators
221  //---------------------------------------
223  const Array<OneD, const NekDouble> &inarray,
224  Array<OneD, NekDouble> &outarray,
225  const StdRegions::StdMatrixKey &mkey);
227  const Array<OneD, const NekDouble> &inarray,
228  Array<OneD, NekDouble> &outarray,
229  const StdRegions::StdMatrixKey &mkey);
231  const int k1,
232  const int k2,
233  const Array<OneD, const NekDouble> &inarray,
234  Array<OneD, NekDouble> &outarray,
235  const StdRegions::StdMatrixKey &mkey);
237  const int i,
238  const Array<OneD, const NekDouble> &inarray,
239  Array<OneD, NekDouble> &outarray,
240  const StdRegions::StdMatrixKey &mkey);
242  const Array<OneD, const NekDouble> &inarray,
243  Array<OneD, NekDouble> &outarray,
244  const StdRegions::StdMatrixKey &mkey);
246  const Array<OneD, const NekDouble> &inarray,
247  Array<OneD, NekDouble> &outarray,
248  const StdRegions::StdMatrixKey &mkey);
250  const Array<OneD, const NekDouble> &inarray,
251  Array<OneD, NekDouble> &outarray,
252  const StdRegions::StdMatrixKey &mkey);
254  const Array<OneD, const NekDouble> &inarray,
255  Array<OneD, NekDouble> &outarray,
256  const StdRegions::StdMatrixKey &mkey);
258  const Array<OneD, const NekDouble> &inarray,
259  Array<OneD, NekDouble> &outarray,
260  Array<OneD, NekDouble> &wsp);
262  int numMin,
263  const Array<OneD, const NekDouble> &inarray,
264  Array<OneD, NekDouble> &outarray);
266 
267  private:
270 
271  QuadExp();
272 
273  };
274 
275  // type defines for use of QuadExp in a boost vector
276  typedef boost::shared_ptr<QuadExp> QuadExpSharedPtr;
277  typedef std::vector< QuadExpSharedPtr > QuadExpVector;
279  }
280 }
281 
282 #endif