Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TetExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File TetExp.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:
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef TETEXP_H
37 #define TETEXP_H
38 
39 #include <StdRegions/StdTetExp.h>
40 #include <SpatialDomains/TetGeom.h>
41 #include <LocalRegions/MatrixKey.h>
45 
46 namespace Nektar
47 {
48  namespace LocalRegions
49  {
50 
51  class TetExp: virtual public StdRegions::StdTetExp, virtual public Expansion3D
52  {
53 
54  public:
56  const LibUtilities::BasisKey &Bb,
57  const LibUtilities::BasisKey &Bc,
59 
60  LOCAL_REGIONS_EXPORT TetExp(const TetExp &T);
61 
62 
64 
65  protected:
66  //-----------------------------
67  // Integration Methods
68  //-----------------------------
69  LOCAL_REGIONS_EXPORT virtual
70  NekDouble v_Integral(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  // Transforms
84  //-----------------------------
85  LOCAL_REGIONS_EXPORT virtual void v_FwdTrans(
86  const Array<OneD, const NekDouble> & inarray,
87  Array<OneD,NekDouble> &outarray);
88 
89  //-----------------------------
90  // Inner product functions
91  //-----------------------------
93  const Array<OneD, const NekDouble>& inarray,
94  Array<OneD, NekDouble>& outarray);
96  const Array<OneD, const NekDouble>& inarray,
97  Array<OneD, NekDouble>& outarray);
99  const int dir,
100  const Array<OneD, const NekDouble>& inarray,
101  Array<OneD, NekDouble>& outarray);
102 
103 
104  //-----------------------------
105  // Evaluation functions
106  //-----------------------------
108  const Array<OneD, const NekDouble> &Lcoord,
109  const Array<OneD, const NekDouble> &physvals);
110 
112  const Array<OneD, const NekDouble> &coords,
113  const Array<OneD, const NekDouble> & physvals);
114 
115  LOCAL_REGIONS_EXPORT virtual void v_GetCoord(
116  const Array<OneD, const NekDouble> &Lcoords,
117  Array<OneD,NekDouble> &coords);
118 
119  LOCAL_REGIONS_EXPORT virtual void v_GetCoords(
120  Array<OneD, NekDouble> &coords_1,
121  Array<OneD, NekDouble> &coords_2,
122  Array<OneD, NekDouble> &coords_3);
123 
124  //-----------------------------
125  // Helper functions
126  //-----------------------------
127  LOCAL_REGIONS_EXPORT virtual
129 
130  LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
131 
133  const NekDouble *data,
134  const std::vector<unsigned int> &nummodes,
135  const int mode_offset,
136  NekDouble *coeffs);
137 
138  LOCAL_REGIONS_EXPORT virtual
140 
142  const int face,
143  const StdRegions::StdExpansionSharedPtr &FaceExp,
144  const Array<OneD, const NekDouble> &inarray,
145  Array<OneD, NekDouble> &outarray,
146  StdRegions::Orientation orient);
147 
149  const int face,
150  const StdRegions::StdExpansionSharedPtr &FaceExp,
151  const Array<OneD, const NekDouble> &inarray,
152  Array<OneD, NekDouble> &outarray,
153  StdRegions::Orientation orient);
154 
155  LOCAL_REGIONS_EXPORT void v_ComputeFaceNormal(const int face);
156 
157  //-----------------------------
158  // Operator creation functions
159  //-----------------------------
161  const Array<OneD, const NekDouble> &inarray,
162  Array<OneD,NekDouble> &outarray,
163  const StdRegions::StdMatrixKey &mkey);
164 
166  int numMin,
167  const Array<OneD, const NekDouble> &inarray,
168  Array<OneD, NekDouble> &outarray);
169 
171  const Array<OneD, const NekDouble> &inarray,
172  Array<OneD,NekDouble> &outarray,
173  const StdRegions::StdMatrixKey &mkey);
174 
176  const int k1,
177  const int k2,
178  const Array<OneD, const NekDouble> &inarray,
179  Array<OneD,NekDouble> &outarray,
180  const StdRegions::StdMatrixKey &mkey);
181 
182  //-----------------------------
183  // Matrix creation functions
184  //-----------------------------
186  const StdRegions::StdMatrixKey &mkey);
187 
189  const MatrixKey &mkey);
190 
192  const MatrixKey &mkey);
193 
195  const StdRegions::StdMatrixKey &mkey);
196 
198  const MatrixKey &mkey);
199 
200  LOCAL_REGIONS_EXPORT virtual
202  const MatrixKey &mkey);
203 
205  const MatrixKey &mkey);
206 
208  const DNekMatSharedPtr & m_transformationmatrix,
209  DNekMatSharedPtr m_inversetransformationmatrix,
210  DNekMatSharedPtr m_inversetransposedtransformationmatrix);
211 
213  const DNekScalMatSharedPtr & mat);
214 
216 
217  private:
220 
221  TetExp();
222 
224  const Array<OneD, const NekDouble> &inarray,
225  Array<OneD, NekDouble> &outarray,
226  const StdRegions::StdMatrixKey &mkey);
228  const Array<OneD, const NekDouble> &inarray,
229  Array<OneD, NekDouble> &outarray,
230  Array<OneD, NekDouble> &wsp);
231  };
232 
233  // type defines for use of TetExp in a boost vector
234  typedef boost::shared_ptr<TetExp> TetExpSharedPtr;
235  typedef std::vector< TetExpSharedPtr > TetExpVector;
237 
238  } //end of namespace
239 } //end of namespace
240 
241 #endif // TETEXP_H