Nektar++
StdPrismExp.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // File StdPrismExp.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 prismatic routines built upon
33 // StdExpansion3D
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
37 #ifndef NEKTAR_LIB_STDREGIONS_STDPRISMEXP_H
38 #define NEKTAR_LIB_STDREGIONS_STDPRISMEXP_H
39 
42 
43 namespace Nektar
44 {
45  namespace StdRegions
46  {
47 
48  /// Class representing a prismatic element in reference space.
49  class StdPrismExp: virtual public StdExpansion3D
50  {
51 
52  public:
53 
55 
57  const LibUtilities::BasisKey &Bb,
58  const LibUtilities::BasisKey &Bc);
59 
61  const LibUtilities::BasisKey &Bb,
62  const LibUtilities::BasisKey &Bc,
63  NekDouble *coeffs,
64  NekDouble *phys);
65 
66  STD_REGIONS_EXPORT StdPrismExp(const StdPrismExp &T);
67 
69 
70  protected:
71  //---------------------------------------
72  // Differentiation Methods
73  //---------------------------------------
74  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
75  const Array<OneD, const NekDouble>& inarray,
76  Array<OneD, NekDouble> &out_d0,
77  Array<OneD, NekDouble> &out_d1,
78  Array<OneD, NekDouble> &out_d2);
79  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
80  const int dir,
81  const Array<OneD, const NekDouble>& inarray,
82  Array<OneD, NekDouble>& outarray);
84  const Array<OneD, const NekDouble>& inarray,
85  Array<OneD, NekDouble>& out_d0,
86  Array<OneD, NekDouble>& out_d1,
87  Array<OneD, NekDouble>& out_d2);
89  const int dir,
90  const Array<OneD, const NekDouble>& inarray,
91  Array<OneD, NekDouble>& outarray);
92 
93 
94  //---------------------------------------
95  // Transforms
96  //---------------------------------------
97  STD_REGIONS_EXPORT virtual void v_BwdTrans(
98  const Array<OneD, const NekDouble>& inarray,
99  Array<OneD, NekDouble>& outarray);
101  const Array<OneD, const NekDouble>& inarray,
102  Array<OneD, NekDouble>& outarray);
104  const Array<OneD, const NekDouble> &base0,
105  const Array<OneD, const NekDouble> &base1,
106  const Array<OneD, const NekDouble> &base2,
107  const Array<OneD, const NekDouble> &inarray,
108  Array<OneD, NekDouble> &outarray,
110  bool doCheckCollDir0,
111  bool doCheckCollDir1,
112  bool doCheckCollDir2);
113  STD_REGIONS_EXPORT virtual void v_FwdTrans(
114  const Array<OneD, const NekDouble>& inarray,
115  Array<OneD, NekDouble> &outarray);
116 
117 
118  //---------------------------------------
119  // Inner product functions
120  //---------------------------------------
122  const Array<OneD, const NekDouble>& inarray,
123  Array<OneD, NekDouble>& outarray);
125  const Array<OneD, const NekDouble>& inarray,
126  Array<OneD, NekDouble>& outarray);
128  const Array<OneD, const NekDouble>& inarray,
129  Array<OneD, NekDouble>& outarray,
130  bool multiplybyweights = true);
132  const Array<OneD, const NekDouble>& base0,
133  const Array<OneD, const NekDouble>& base1,
134  const Array<OneD, const NekDouble>& base2,
135  const Array<OneD, const NekDouble>& inarray,
136  Array<OneD, NekDouble> &outarray,
138  bool doCheckCollDir0,
139  bool doCheckCollDir1,
140  bool doCheckCollDir2);
142  const int dir,
143  const Array<OneD, const NekDouble>& inarray,
144  Array<OneD, NekDouble>& outarray);
146  const int dir,
147  const Array<OneD, const NekDouble>& inarray,
148  Array<OneD, NekDouble>& outarray);
150  const int dir,
151  const Array<OneD, const NekDouble>& inarray,
152  Array<OneD, NekDouble>& outarray);
153 
154 
155  //---------------------------------------
156  // Evaluation functions
157  //---------------------------------------
161  STD_REGIONS_EXPORT virtual void v_GetCoords(
162  Array<OneD, NekDouble> & xi_x,
163  Array<OneD, NekDouble> & xi_y,
164  Array<OneD, NekDouble> & xi_z);
165  STD_REGIONS_EXPORT virtual void v_FillMode(
166  const int mode,
167  Array<OneD, NekDouble> &outarray);
168 
169  //---------------------------------------
170  // Helper functions
171  //---------------------------------------
172  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
173  STD_REGIONS_EXPORT virtual int v_GetNedges() const;
174  STD_REGIONS_EXPORT virtual int v_GetNfaces() const;
176  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
177  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
178  STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const;
179  STD_REGIONS_EXPORT virtual int v_GetTotalEdgeIntNcoeffs() const;
180  STD_REGIONS_EXPORT virtual int v_GetFaceNcoeffs(const int i) const;
181  STD_REGIONS_EXPORT virtual int v_GetFaceNumPoints(const int i) const;
183  const int i, const int j) const;
185  v_DetFaceBasisKey(const int i, const int k) const;
186  STD_REGIONS_EXPORT virtual int v_GetFaceIntNcoeffs(const int i) const;
187  STD_REGIONS_EXPORT virtual int v_GetTotalFaceIntNcoeffs() const;
189  const std::vector<unsigned int> &nummodes,
190  int &modes_offset);
192  const int i) const;
194 
195  //---------------------------------------
196  // Mappings
197  //---------------------------------------
199  const int fid,
200  const Orientation faceOrient,
201  Array<OneD, unsigned int> &maparray,
202  Array<OneD, int> &signarray,
203  int nummodesA = -1,
204  int nummodesB = -1);
206  int localVertexId,
207  bool useCoeffPacking = false);
209  const int eid,
210  const Orientation edgeOrient,
211  Array<OneD, unsigned int> &maparray,
212  Array<OneD, int> &signarray);
214  const int fid,
215  const Orientation faceOrient,
216  Array<OneD, unsigned int> &maparray,
217  Array<OneD, int>& signarray);
219  Array<OneD, unsigned int> &outarray);
221  Array<OneD, unsigned int>& outarray);
222 
223 
224  //---------------------------------------
225  // Wrapper functions
226  //---------------------------------------
228  const StdMatrixKey &mkey);
230  const StdMatrixKey &mkey);
231 
233  const Array<OneD, const NekDouble>& inarray,
234  Array<OneD, NekDouble>& outarray);
235 
237 
238  //---------------------------------------
239  // Method for applying sensors
240  //---------------------------------------
242  int numMin,
243  const Array<OneD, const NekDouble> &inarray,
244  Array<OneD, NekDouble> &outarray);
245 
246  private:
247  //---------------------------------------
248  // Private helper functions
249  //---------------------------------------
250  STD_REGIONS_EXPORT int GetMode(int I, int J, int K);
251  };
252 
253  typedef boost::shared_ptr<StdPrismExp> StdPrismExpSharedPtr;
254 
255  } //end of namespace
256 } //end of namespace
257 
258 #endif //STDPRISMEXP_H
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
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)
virtual int v_GetNedges() const
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetFaceIntNcoeffs(const int i) const
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)
virtual int v_GetTotalEdgeIntNcoeffs() const
virtual void v_GetCoords(Array< OneD, NekDouble > &xi_x, Array< OneD, NekDouble > &xi_y, Array< OneD, NekDouble > &xi_z)
boost::shared_ptr< StdPrismExp > StdPrismExpSharedPtr
Definition: StdPrismExp.h:253
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Inner product of inarray over region with respect to the object's default expansion basis; output in ...
virtual LibUtilities::PointsKey v_GetFacePointsKey(const int i, const int j) const
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculate the inner product of inarray with respect to the basis B=base0*base1*base2 and put into out...
virtual int v_GetTotalFaceIntNcoeffs() const
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
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)
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
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)
Calculate the derivative of the physical points.
Definition: StdPrismExp.cpp:96
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
virtual int v_NumBndryCoeffs() const
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
virtual int v_GetFaceNumPoints(const int i) const
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)
Class representing a prismatic element in reference space.
Definition: StdPrismExp.h:49
virtual int v_GetNverts() const
virtual void v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Defines a specification for a set of points.
Definition: Points.h:58
double NekDouble
virtual int v_NumDGBndryCoeffs() const
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
#define STD_REGIONS_EXPORT
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetNfaces() const
virtual const LibUtilities::BasisKey v_DetFaceBasisKey(const int i, const int k) const
virtual int v_GetEdgeNcoeffs(const int i) const
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
int GetMode(int I, int J, int K)
Compute the local mode number in the expansion for a particular tensorial combination.
virtual LibUtilities::ShapeType v_DetShapeType() const
Return Shape of region, using ShapeType enum list; i.e. prism.
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Describes the specification for a Basis.
Definition: Basis.h:50
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
virtual int v_GetFaceNcoeffs(const int i) const
virtual bool v_IsBoundaryInteriorExpansion()