Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StdHexExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File StdHexExp.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 file for hexahedron routines.
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_LIBRARY_STDREGIONS_STDHEXEXP_H
37 #define NEKTAR_LIBRARY_STDREGIONS_STDHEXEXP_H
38 
39 //#include <StdRegions/StdRegions.hpp>
42 
43 namespace Nektar
44 {
45  namespace StdRegions
46  {
47  /// Class representing a hexehedral element in reference space.
48  class StdHexExp: virtual public StdExpansion3D
49  {
50 
51  public:
54  const LibUtilities::BasisKey &Ba,
55  const LibUtilities::BasisKey &Bb,
56  const LibUtilities::BasisKey &Bc);
58  const LibUtilities::BasisKey &Ba,
59  const LibUtilities::BasisKey &Bb,
60  const LibUtilities::BasisKey &Bc,
61  NekDouble *coeffs,
62  NekDouble *phys);
63  STD_REGIONS_EXPORT StdHexExp(const StdHexExp &T);
65 
66 
67  protected:
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);
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);
86  const int dir,
87  const Array<OneD, const NekDouble>& inarray,
88  Array<OneD, NekDouble>& outarray);
89 
90  //---------------------------------------
91  // Transforms
92  //---------------------------------------
93  STD_REGIONS_EXPORT virtual void v_BwdTrans(
94  const Array<OneD, const NekDouble>& inarray,
95  Array<OneD, NekDouble> &outarray);
96 
98  const Array<OneD, const NekDouble>& inarray,
99  Array<OneD, NekDouble> &outarray);
100 
102  const Array<OneD, const NekDouble>& base0,
103  const Array<OneD, const NekDouble>& base1,
104  const Array<OneD, const NekDouble>& base2,
105  const Array<OneD, const NekDouble>& inarray,
106  Array<OneD, NekDouble> &outarray,
107  Array<OneD, NekDouble> &wsp,
108  bool doCheckCollDir0,
109  bool doCheckCollDir1,
110  bool doCheckCollDir2);
111 
112  STD_REGIONS_EXPORT virtual void v_FwdTrans(
113  const Array<OneD, const NekDouble>& inarray,
114  Array<OneD, NekDouble> &outarray);
115 
116 
117  //---------------------------------------
118  // Inner product functions
119  //---------------------------------------
121  const Array<OneD, const NekDouble> &inarray,
122  Array<OneD, NekDouble> &outarray);
123 
125  const Array<OneD, const NekDouble> &inarray,
126  Array<OneD, NekDouble> &outarray);
127 
129  const Array<OneD, const NekDouble> &inarray,
130  Array<OneD, NekDouble> &outarray);
131 
133  const Array<OneD, const NekDouble>& base0,
134  const Array<OneD, const NekDouble>& base1,
135  const Array<OneD, const NekDouble>& base2,
136  const Array<OneD, const NekDouble>& inarray,
137  Array<OneD, NekDouble> &outarray,
138  Array<OneD, NekDouble> &wsp,
139  bool doCheckCollDir0,
140  bool doCheckCollDir1,
141  bool doCheckCollDir2);
142 
144  const int dir,
145  const Array<OneD, const NekDouble>& inarray,
146  Array<OneD, NekDouble> & outarray);
147 
149  const int dir,
150  const Array<OneD, const NekDouble>& inarray,
151  Array<OneD, NekDouble> & outarray);
152 
154  const int dir,
155  const Array<OneD, const NekDouble>& inarray,
156  Array<OneD, NekDouble> & outarray);
157 
158 
159  //---------------------------------------
160  // Evaluation functions
161  //---------------------------------------
163  const Array<OneD, const NekDouble>& xi,
164  Array<OneD, NekDouble>& eta);
165 
166  STD_REGIONS_EXPORT virtual void v_FillMode(
167  const int mode,
168  Array<OneD, NekDouble> &outarray);
169 
170 
171  //---------------------------
172  // Helper functions
173  //---------------------------
174  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
175  STD_REGIONS_EXPORT virtual int v_GetNedges() const;
176  STD_REGIONS_EXPORT virtual int v_GetNfaces() const;
178  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
179  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
180  STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const;
181  STD_REGIONS_EXPORT virtual int v_GetTotalEdgeIntNcoeffs() const;
182  STD_REGIONS_EXPORT virtual int v_GetFaceNcoeffs(const int i) const;
184  const int i) const;
185  STD_REGIONS_EXPORT virtual int v_GetTotalFaceIntNcoeffs() const;
186  STD_REGIONS_EXPORT virtual int v_GetFaceNumPoints(const int i) const;
188  const int i, const int j) const;
190  const std::vector<unsigned int> &nummodes,
191  int &modes_offset);
193  v_DetFaceBasisKey(const int i, const int k) const;
195  const int i) const;
197  STD_REGIONS_EXPORT virtual void v_GetCoords(
198  Array<OneD, NekDouble> &coords_x,
199  Array<OneD, NekDouble> &coords_y,
200  Array<OneD, NekDouble> &coords_z);
201 
202 
203  //--------------------------
204  // Mappings
205  //--------------------------
207  const int fid,
208  const Orientation faceOrient,
209  Array<OneD, unsigned int> &maparray,
210  Array<OneD, int> &signarray,
211  int nummodesA = -1,
212  int nummodesB = -1);
214  int localVertexId,
215  bool useCoeffPacking = false);
217  const int eid,
218  const Orientation edgeOrient,
219  Array<OneD, unsigned int> &maparray,
220  Array<OneD, int> &signarray);
222  const int fid,
223  const Orientation faceOrient,
224  Array<OneD, unsigned int> &maparray,
225  Array<OneD, int>& signarray);
227  Array<OneD, unsigned int> &outarray);
229  Array<OneD, unsigned int> &outarray);
230 
231 
232  //---------------------------------------
233  // Wrapper functions
234  //---------------------------------------
236  const StdMatrixKey &mkey);
238  const StdMatrixKey &mkey);
239 
240 
241  //---------------------------------------
242  // Operator evaluation functions
243  //---------------------------------------
244  STD_REGIONS_EXPORT virtual void v_MassMatrixOp(
245  const Array<OneD, const NekDouble> &inarray,
246  Array<OneD,NekDouble> &outarray,
247  const StdMatrixKey &mkey);
248 
250  const Array<OneD, const NekDouble> &inarray,
251  Array<OneD,NekDouble> &outarray,
252  const StdMatrixKey &mkey);
253 
255  const int k1,
256  const int k2,
257  const Array<OneD, const NekDouble> &inarray,
258  Array<OneD,NekDouble> &outarray,
259  const StdMatrixKey &mkey);
260 
262  const int i,
263  const Array<OneD, const NekDouble> &inarray,
264  Array<OneD,NekDouble> &outarray,
265  const StdMatrixKey &mkey);
266 
268  const Array<OneD, const NekDouble> &inarray,
269  Array<OneD,NekDouble> &outarray,
270  const StdMatrixKey &mkey);
271 
273  const Array<OneD, const NekDouble> &inarray,
274  Array<OneD,NekDouble> &outarray,
275  const StdMatrixKey &mkey);
276 
278  const Array<OneD, const NekDouble>& inarray,
279  Array<OneD, NekDouble> &outarray);
280 
281  STD_REGIONS_EXPORT virtual void v_SVVLaplacianFilter(Array<OneD, NekDouble> &array,const StdMatrixKey &mkey);
282 
283  };
284 
285  typedef boost::shared_ptr<StdHexExp> StdHexExpSharedPtr;
286 
287  }
288 }
289 
290 #endif