Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PrismExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File PrismExp.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 PrismExp routines
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef PRISMEXP_H
37 #define PRISMEXP_H
38 
39 #include <StdRegions/StdPrismExp.h>
41 #include <LocalRegions/MatrixKey.h>
45 
46 namespace Nektar
47 {
48  namespace LocalRegions
49  {
50  class PrismExp : virtual public StdRegions::StdPrismExp,
51  virtual public Expansion3D
52  {
53  public:
54  /// \brief Constructor using BasisKey class for quadrature
55  /// points and order definition
57  const LibUtilities::BasisKey &Bb,
58  const LibUtilities::BasisKey &Bc,
60 
61  LOCAL_REGIONS_EXPORT PrismExp(const PrismExp &T);
62 
64 
65  protected:
66  //-------------------------------
67  // Integration Methods
68  //-------------------------------
70  const Array<OneD, const NekDouble>& inarray);
71 
72 
73  //----------------------------
74  // Differentiation Methods
75  //----------------------------
76  LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv(
77  const Array<OneD, const NekDouble>& inarray,
78  Array<OneD, NekDouble>& out_d0,
79  Array<OneD, NekDouble>& out_d1,
80  Array<OneD, NekDouble>& out_d2);
81 
82 
83  //---------------------------------------
84  // Transforms
85  //---------------------------------------
86  LOCAL_REGIONS_EXPORT virtual void v_FwdTrans(
87  const Array<OneD, const NekDouble> &inarray,
88  Array<OneD, NekDouble> &outarray);
89 
90 
91  //---------------------------------------
92  // Inner product functions
93  //---------------------------------------
95  const Array<OneD, const NekDouble>& inarray,
96  Array<OneD, NekDouble>& outarray);
98  const Array<OneD, const NekDouble>& inarray,
99  Array<OneD, NekDouble>& outarray);
101  const int dir,
102  const Array<OneD, const NekDouble>& inarray,
103  Array<OneD, NekDouble>& outarray);
105  const int dir,
106  const Array<OneD, const NekDouble>& inarray,
107  Array<OneD, NekDouble>& outarray);
108 
109 
110  //---------------------------------------
111  // Evaluation functions
112  //---------------------------------------
113  LOCAL_REGIONS_EXPORT virtual void v_GetCoord(
114  const Array<OneD, const NekDouble> &Lcoords,
115  Array<OneD, NekDouble> &coords);
116 
117  LOCAL_REGIONS_EXPORT virtual void v_GetCoords(
118  Array<OneD, NekDouble> &coords_1,
119  Array<OneD, NekDouble> &coords_2,
120  Array<OneD, NekDouble> &coords_3);
121 
123  const Array<OneD, const NekDouble> &Lcoord,
124  const Array<OneD, const NekDouble> &physvals);
125 
127  const Array<OneD, const NekDouble>& coord,
128  const Array<OneD, const NekDouble>& physvals);
129 
130 
131  //---------------------------------------
132  // Helper functions
133  //---------------------------------------
134  LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
136  const NekDouble *data,
137  const std::vector<unsigned int > &nummodes,
138  const int mode_offset,
139  NekDouble * coeffs);
140  LOCAL_REGIONS_EXPORT virtual
143  const int face,
144  const StdRegions::StdExpansionSharedPtr &FaceExp,
145  const Array<OneD, const NekDouble> &inarray,
146  Array<OneD, NekDouble> &outarray,
147  StdRegions::Orientation orient);
148 
150  const int face,
151  const StdRegions::StdExpansionSharedPtr &FaceExp,
152  const Array<OneD, const NekDouble> &inarray,
153  Array<OneD, NekDouble> &outarray,
154  StdRegions::Orientation orient);
155 
156  LOCAL_REGIONS_EXPORT void v_ComputeFaceNormal(const int face);
157 
158  //---------------------------------------
159  // Operator creation functions
160  //---------------------------------------
162  const Array<OneD, const NekDouble> &inarray,
163  Array<OneD,NekDouble> &outarray,
164  const StdRegions::StdMatrixKey &mkey);
166  const Array<OneD, const NekDouble> &inarray,
167  Array<OneD,NekDouble> &outarray,
168  const StdRegions::StdMatrixKey &mkey);
170  const int k1,
171  const int k2,
172  const Array<OneD, const NekDouble> &inarray,
173  Array<OneD,NekDouble> &outarray,
174  const StdRegions::StdMatrixKey &mkey);
176  const Array<OneD, const NekDouble> &inarray,
177  Array<OneD, NekDouble> &outarray,
178  const StdRegions::StdMatrixKey &mkey);
180  const Array<OneD, const NekDouble> &inarray,
181  Array<OneD,NekDouble> &outarray,
182  const StdRegions::StdMatrixKey &mkey);
184  int numMin,
185  const Array<OneD, const NekDouble> &inarray,
186  Array<OneD, NekDouble> &outarray);
187 
188  //---------------------------------------
189  // Matrix creation functions
190  //---------------------------------------
192  const StdRegions::StdMatrixKey &mkey);
194  const StdRegions::StdMatrixKey &mkey);
196  const MatrixKey &mkey);
198  const MatrixKey &mkey);
200  const MatrixKey &mkey);
202  const MatrixKey &mkey);
204  const MatrixKey &mkey);
205 
206  private:
209 
211  const Array<OneD, const NekDouble> &inarray,
212  Array<OneD, NekDouble> &outarray,
213  Array<OneD, NekDouble> &wsp);
214  };
215 
216  // type defines for use of PrismExp in a boost vector
217  typedef boost::shared_ptr<PrismExp> PrismExpSharedPtr;
218  typedef std::vector<PrismExpSharedPtr> PrismExpVector;
220  } //end of namespace
221 } //end of namespace
222 
223 #define H_PRISMEXP
224 #endif