Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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);
169  const int fid,
170  const Orientation faceOrient,
171  int &numModes0,
172  int &numModes1);
173 
174  //---------------------------------------
175  // Helper functions
176  //---------------------------------------
177  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
178  STD_REGIONS_EXPORT virtual int v_GetNedges() const;
179  STD_REGIONS_EXPORT virtual int v_GetNfaces() const;
181  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
182  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
183  STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const;
184  STD_REGIONS_EXPORT virtual int v_GetTotalEdgeIntNcoeffs() const;
185  STD_REGIONS_EXPORT virtual int v_GetFaceNcoeffs(const int i) const;
186  STD_REGIONS_EXPORT virtual int v_GetFaceNumPoints(const int i) const;
188  const int i, const int j) const;
190  v_DetFaceBasisKey(const int i, const int k) const;
191  STD_REGIONS_EXPORT virtual int v_GetFaceIntNcoeffs(const int i) const;
192  STD_REGIONS_EXPORT virtual int v_GetTotalFaceIntNcoeffs() const;
194  const std::vector<unsigned int> &nummodes,
195  int &modes_offset);
197  const int i) const;
199 
200  //---------------------------------------
201  // Mappings
202  //---------------------------------------
204  const int fid,
205  const Orientation faceOrient,
206  Array<OneD, unsigned int> &maparray,
207  Array<OneD, int> &signarray,
208  int P = -1,
209  int Q = -1);
211  int localVertexId,
212  bool useCoeffPacking = false);
214  const int eid,
215  const Orientation edgeOrient,
216  Array<OneD, unsigned int> &maparray,
217  Array<OneD, int> &signarray);
219  const int fid,
220  const Orientation faceOrient,
221  Array<OneD, unsigned int> &maparray,
222  Array<OneD, int>& signarray);
224  Array<OneD, unsigned int> &outarray);
226  Array<OneD, unsigned int>& outarray);
227 
228 
229  //---------------------------------------
230  // Wrapper functions
231  //---------------------------------------
233  const StdMatrixKey &mkey);
235  const StdMatrixKey &mkey);
236 
238  const Array<OneD, const NekDouble>& inarray,
239  Array<OneD, NekDouble>& outarray);
240 
242 
243  //---------------------------------------
244  // Method for applying sensors
245  //---------------------------------------
247  int numMin,
248  const Array<OneD, const NekDouble> &inarray,
249  Array<OneD, NekDouble> &outarray);
250 
251  private:
252  //---------------------------------------
253  // Private helper functions
254  //---------------------------------------
255  STD_REGIONS_EXPORT int GetMode(int I, int J, int K);
256  };
257 
258  typedef boost::shared_ptr<StdPrismExp> StdPrismExpSharedPtr;
259 
260  } //end of namespace
261 } //end of namespace
262 
263 #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 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:258
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:98
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
virtual int v_NumBndryCoeffs() const
virtual void v_GetFaceNumModes(const int fid, const Orientation faceOrient, int &numModes0, int &numModes1)
virtual void v_GetFaceToElementMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P=-1, int Q=-1)
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()