Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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,
109  Array<OneD, NekDouble> &wsp,
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);
131  const Array<OneD, const NekDouble>& base0,
132  const Array<OneD, const NekDouble>& base1,
133  const Array<OneD, const NekDouble>& base2,
134  const Array<OneD, const NekDouble>& inarray,
135  Array<OneD, NekDouble> &outarray,
136  Array<OneD, NekDouble> &wsp,
137  bool doCheckCollDir0,
138  bool doCheckCollDir1,
139  bool doCheckCollDir2);
141  const int dir,
142  const Array<OneD, const NekDouble>& inarray,
143  Array<OneD, NekDouble>& outarray);
145  const int dir,
146  const Array<OneD, const NekDouble>& inarray,
147  Array<OneD, NekDouble>& outarray);
149  const int dir,
150  const Array<OneD, const NekDouble>& inarray,
151  Array<OneD, NekDouble>& outarray);
152 
153 
154  //---------------------------------------
155  // Evaluation functions
156  //---------------------------------------
158  const Array<OneD, const NekDouble>& xi,
159  Array<OneD, NekDouble>& eta);
160  STD_REGIONS_EXPORT virtual void v_GetCoords(
161  Array<OneD, NekDouble> & xi_x,
162  Array<OneD, NekDouble> & xi_y,
163  Array<OneD, NekDouble> & xi_z);
164  STD_REGIONS_EXPORT virtual void v_FillMode(
165  const int mode,
166  Array<OneD, NekDouble> &outarray);
167 
168  //---------------------------------------
169  // Helper functions
170  //---------------------------------------
171  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
172  STD_REGIONS_EXPORT virtual int v_GetNedges() const;
173  STD_REGIONS_EXPORT virtual int v_GetNfaces() const;
175  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
176  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
177  STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const;
178  STD_REGIONS_EXPORT virtual int v_GetTotalEdgeIntNcoeffs() const;
179  STD_REGIONS_EXPORT virtual int v_GetFaceNcoeffs(const int i) const;
180  STD_REGIONS_EXPORT virtual int v_GetFaceNumPoints(const int i) const;
182  const int i, const int j) const;
184  v_DetFaceBasisKey(const int i, const int k) const;
185  STD_REGIONS_EXPORT virtual int v_GetFaceIntNcoeffs(const int i) const;
186  STD_REGIONS_EXPORT virtual int v_GetTotalFaceIntNcoeffs() const;
188  const std::vector<unsigned int> &nummodes,
189  int &modes_offset);
191  const int i) const;
193 
194  //---------------------------------------
195  // Mappings
196  //---------------------------------------
198  const int fid,
199  const Orientation faceOrient,
200  Array<OneD, unsigned int> &maparray,
201  Array<OneD, int> &signarray,
202  int nummodesA = -1,
203  int nummodesB = -1);
205  int localVertexId,
206  bool useCoeffPacking = false);
208  const int eid,
209  const Orientation edgeOrient,
210  Array<OneD, unsigned int> &maparray,
211  Array<OneD, int> &signarray);
213  const int fid,
214  const Orientation faceOrient,
215  Array<OneD, unsigned int> &maparray,
216  Array<OneD, int>& signarray);
218  Array<OneD, unsigned int> &outarray);
220  Array<OneD, unsigned int>& outarray);
221 
222 
223  //---------------------------------------
224  // Wrapper functions
225  //---------------------------------------
227  const StdMatrixKey &mkey);
229  const StdMatrixKey &mkey);
230 
232  const Array<OneD, const NekDouble>& inarray,
233  Array<OneD, NekDouble>& outarray);
234 
235  STD_REGIONS_EXPORT void v_SVVLaplacianFilter(Array<OneD, NekDouble> &array, const StdMatrixKey &mkey);
236 
237  private:
238  //---------------------------------------
239  // Private helper functions
240  //---------------------------------------
241  STD_REGIONS_EXPORT int GetMode(int I, int J, int K);
242  };
243 
244  typedef boost::shared_ptr<StdPrismExp> StdPrismExpSharedPtr;
245 
246  } //end of namespace
247 } //end of namespace
248 
249 #endif //STDPRISMEXP_H