Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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,
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  bool multbyweights = true);
132 
134  const Array<OneD, const NekDouble>& base0,
135  const Array<OneD, const NekDouble>& base1,
136  const Array<OneD, const NekDouble>& base2,
137  const Array<OneD, const NekDouble>& inarray,
138  Array<OneD, NekDouble> &outarray,
140  bool doCheckCollDir0,
141  bool doCheckCollDir1,
142  bool doCheckCollDir2);
143 
145  const int dir,
146  const Array<OneD, const NekDouble>& inarray,
147  Array<OneD, NekDouble> & outarray);
148 
150  const int dir,
151  const Array<OneD, const NekDouble>& inarray,
152  Array<OneD, NekDouble> & outarray);
153 
155  const int dir,
156  const Array<OneD, const NekDouble>& inarray,
157  Array<OneD, NekDouble> & outarray);
158 
159 
160  //---------------------------------------
161  // Evaluation functions
162  //---------------------------------------
166 
167  STD_REGIONS_EXPORT virtual void v_FillMode(
168  const int mode,
169  Array<OneD, NekDouble> &outarray);
170 
171 
172  //---------------------------
173  // Helper functions
174  //---------------------------
175  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
176  STD_REGIONS_EXPORT virtual int v_GetNedges() const;
177  STD_REGIONS_EXPORT virtual int v_GetNfaces() const;
179  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
180  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
181  STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const;
182  STD_REGIONS_EXPORT virtual int v_GetTotalEdgeIntNcoeffs() const;
183  STD_REGIONS_EXPORT virtual int v_GetFaceNcoeffs(const int i) const;
185  const int i) const;
186  STD_REGIONS_EXPORT virtual int v_GetTotalFaceIntNcoeffs() const;
187  STD_REGIONS_EXPORT virtual int v_GetFaceNumPoints(const int i) const;
189  const int i, const int j) const;
191  const std::vector<unsigned int> &nummodes,
192  int &modes_offset);
194  v_DetFaceBasisKey(const int i, const int k) const;
196  const int i) const;
198  STD_REGIONS_EXPORT virtual void v_GetCoords(
199  Array<OneD, NekDouble> &coords_x,
200  Array<OneD, NekDouble> &coords_y,
201  Array<OneD, NekDouble> &coords_z);
203  const int fid,
204  const Orientation faceOrient,
205  int &numModes0,
206  int &numModes1);
207 
208  //--------------------------
209  // Mappings
210  //--------------------------
212  const int fid,
213  const Orientation faceOrient,
214  Array<OneD, unsigned int> &maparray,
215  Array<OneD, int> &signarray,
216  int nummodesA = -1,
217  int nummodesB = -1);
219  int localVertexId,
220  bool useCoeffPacking = false);
222  const int eid,
223  const Orientation edgeOrient,
224  Array<OneD, unsigned int> &maparray,
225  Array<OneD, int> &signarray);
227  const int fid,
228  const Orientation faceOrient,
229  Array<OneD, unsigned int> &maparray,
230  Array<OneD, int>& signarray);
232  Array<OneD, unsigned int> &outarray);
234  Array<OneD, unsigned int> &outarray);
235 
236 
237  //---------------------------------------
238  // Wrapper functions
239  //---------------------------------------
241  const StdMatrixKey &mkey);
243  const StdMatrixKey &mkey);
244 
245 
246  //---------------------------------------
247  // Operator evaluation functions
248  //---------------------------------------
249  STD_REGIONS_EXPORT virtual void v_MassMatrixOp(
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  const StdMatrixKey &mkey);
258 
260  const int k1,
261  const int k2,
262  const Array<OneD, const NekDouble> &inarray,
263  Array<OneD,NekDouble> &outarray,
264  const StdMatrixKey &mkey);
265 
267  const int i,
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  const StdMatrixKey &mkey);
281 
283  const Array<OneD, const NekDouble>& inarray,
284  Array<OneD, NekDouble> &outarray);
285 
287 
288  };
289 
290  typedef boost::shared_ptr<StdHexExp> StdHexExpSharedPtr;
291 
292  }
293 }
294 
295 #endif
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
Definition: StdHexExp.cpp:2102
virtual LibUtilities::PointsKey v_GetFacePointsKey(const int i, const int j) const
Definition: StdHexExp.cpp:828
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Definition: StdHexExp.cpp:613
virtual int v_GetEdgeNcoeffs(const int i) const
Definition: StdHexExp.cpp:740
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2257
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z)
Definition: StdHexExp.cpp:904
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2306
virtual int v_NumBndryCoeffs() const
Definition: StdHexExp.cpp:699
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:562
virtual int v_GetNedges() const
Definition: StdHexExp.cpp:681
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
Definition: StdHexExp.cpp:886
virtual const LibUtilities::BasisKey v_DetFaceBasisKey(const int i, const int k) const
Definition: StdHexExp.cpp:857
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:366
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:624
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Definition: StdHexExp.cpp:2166
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
Definition: StdHexExp.cpp:848
boost::shared_ptr< StdHexExp > StdHexExpSharedPtr
Definition: StdHexExp.h:290
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:305
virtual void v_GetFaceNumModes(const int fid, const Orientation faceOrient, int &numModes0, int &numModes1)
Definition: StdHexExp.cpp:930
virtual int v_GetFaceNcoeffs(const int i) const
Definition: StdHexExp.cpp:764
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2269
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2297
virtual bool v_IsBoundaryInteriorExpansion()
Definition: StdHexExp.cpp:85
virtual void v_IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
Definition: StdHexExp.cpp:437
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
virtual void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2315
virtual int v_GetNfaces() const
Definition: StdHexExp.cpp:687
virtual int v_GetFaceNumPoints(const int i) const
Definition: StdHexExp.cpp:807
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:532
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:2338
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Definition: StdHexExp.cpp:1464
virtual int v_GetTotalEdgeIntNcoeffs() const
Definition: StdHexExp.cpp:758
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2278
Class representing a hexehedral element in reference space.
Definition: StdHexExp.h:48
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:385
Defines a specification for a set of points.
Definition: Points.h:58
virtual void v_BwdTrans_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
Definition: StdHexExp.cpp:241
double NekDouble
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:214
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
Definition: StdHexExp.cpp:1330
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2371
virtual void v_GetFaceToElementMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int nummodesA=-1, int nummodesB=-1)
Definition: StdHexExp.cpp:978
virtual int v_GetTotalFaceIntNcoeffs() const
Definition: StdHexExp.cpp:800
#define STD_REGIONS_EXPORT
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:184
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:524
virtual LibUtilities::ShapeType v_DetShapeType() const
Definition: StdHexExp.cpp:693
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)
Differentiation Methods.
Definition: StdHexExp.cpp:100
virtual int v_GetFaceIntNcoeffs(const int i) const
Definition: StdHexExp.cpp:782
virtual void v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Definition: StdHexExp.cpp:1762
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2263
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)
Definition: StdHexExp.cpp:147
virtual int v_GetNverts() const
Definition: StdHexExp.cpp:675
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multbyweights=true)
Definition: StdHexExp.cpp:399
Describes the specification for a Basis.
Definition: Basis.h:50
virtual int v_NumDGBndryCoeffs() const
Definition: StdHexExp.cpp:720