Nektar++
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);
202 
203 
204  //--------------------------
205  // Mappings
206  //--------------------------
208  const int fid,
209  const Orientation faceOrient,
210  Array<OneD, unsigned int> &maparray,
211  Array<OneD, int> &signarray,
212  int nummodesA = -1,
213  int nummodesB = -1);
215  int localVertexId,
216  bool useCoeffPacking = false);
218  const int eid,
219  const Orientation edgeOrient,
220  Array<OneD, unsigned int> &maparray,
221  Array<OneD, int> &signarray);
223  const int fid,
224  const Orientation faceOrient,
225  Array<OneD, unsigned int> &maparray,
226  Array<OneD, int>& signarray);
228  Array<OneD, unsigned int> &outarray);
230  Array<OneD, unsigned int> &outarray);
231 
232 
233  //---------------------------------------
234  // Wrapper functions
235  //---------------------------------------
237  const StdMatrixKey &mkey);
239  const StdMatrixKey &mkey);
240 
241 
242  //---------------------------------------
243  // Operator evaluation functions
244  //---------------------------------------
245  STD_REGIONS_EXPORT virtual void v_MassMatrixOp(
246  const Array<OneD, const NekDouble> &inarray,
247  Array<OneD,NekDouble> &outarray,
248  const StdMatrixKey &mkey);
249 
251  const Array<OneD, const NekDouble> &inarray,
252  Array<OneD,NekDouble> &outarray,
253  const StdMatrixKey &mkey);
254 
256  const int k1,
257  const int k2,
258  const Array<OneD, const NekDouble> &inarray,
259  Array<OneD,NekDouble> &outarray,
260  const StdMatrixKey &mkey);
261 
263  const int i,
264  const Array<OneD, const NekDouble> &inarray,
265  Array<OneD,NekDouble> &outarray,
266  const StdMatrixKey &mkey);
267 
269  const Array<OneD, const NekDouble> &inarray,
270  Array<OneD,NekDouble> &outarray,
271  const StdMatrixKey &mkey);
272 
274  const Array<OneD, const NekDouble> &inarray,
275  Array<OneD,NekDouble> &outarray,
276  const StdMatrixKey &mkey);
277 
279  const Array<OneD, const NekDouble>& inarray,
280  Array<OneD, NekDouble> &outarray);
281 
283 
284  };
285 
286  typedef boost::shared_ptr<StdHexExp> StdHexExpSharedPtr;
287 
288  }
289 }
290 
291 #endif
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
Definition: StdHexExp.cpp:2020
virtual LibUtilities::PointsKey v_GetFacePointsKey(const int i, const int j) const
Definition: StdHexExp.cpp:826
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Definition: StdHexExp.cpp:611
virtual int v_GetEdgeNcoeffs(const int i) const
Definition: StdHexExp.cpp:738
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2175
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z)
Definition: StdHexExp.cpp:902
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2224
virtual int v_NumBndryCoeffs() const
Definition: StdHexExp.cpp:697
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:560
virtual int v_GetNedges() const
Definition: StdHexExp.cpp:679
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
Definition: StdHexExp.cpp:884
virtual const LibUtilities::BasisKey v_DetFaceBasisKey(const int i, const int k) const
Definition: StdHexExp.cpp:855
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:364
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:622
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Definition: StdHexExp.cpp:2084
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
Definition: StdHexExp.cpp:846
boost::shared_ptr< StdHexExp > StdHexExpSharedPtr
Definition: StdHexExp.h:286
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:303
virtual int v_GetFaceNcoeffs(const int i) const
Definition: StdHexExp.cpp:762
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2187
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2215
virtual bool v_IsBoundaryInteriorExpansion()
Definition: StdHexExp.cpp:83
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:435
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:2233
virtual int v_GetNfaces() const
Definition: StdHexExp.cpp:685
virtual int v_GetFaceNumPoints(const int i) const
Definition: StdHexExp.cpp:805
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:530
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:2256
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Definition: StdHexExp.cpp:1382
virtual int v_GetTotalEdgeIntNcoeffs() const
Definition: StdHexExp.cpp:756
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2196
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:383
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:239
double NekDouble
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:212
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
Definition: StdHexExp.cpp:1248
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2289
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:932
virtual int v_GetTotalFaceIntNcoeffs() const
Definition: StdHexExp.cpp:798
#define STD_REGIONS_EXPORT
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:182
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdHexExp.cpp:522
virtual LibUtilities::ShapeType v_DetShapeType() const
Definition: StdHexExp.cpp:691
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:98
virtual int v_GetFaceIntNcoeffs(const int i) const
Definition: StdHexExp.cpp:780
virtual void v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Definition: StdHexExp.cpp:1680
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
Definition: StdHexExp.cpp:2181
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:145
virtual int v_GetNverts() const
Definition: StdHexExp.cpp:673
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multbyweights=true)
Definition: StdHexExp.cpp:397
Describes the specification for a Basis.
Definition: Basis.h:50
virtual int v_NumDGBndryCoeffs() const
Definition: StdHexExp.cpp:718