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 
139  const int face,
140  const StdRegions::StdExpansionSharedPtr &FaceExp,
141  const Array<OneD, const NekDouble> &inarray,
142  Array<OneD, NekDouble> &outarray,
143  StdRegions::Orientation orient);
144 
146  const int face,
147  const StdRegions::StdExpansionSharedPtr &FaceExp,
148  const Array<OneD, const NekDouble> &inarray,
149  Array<OneD, NekDouble> &outarray,
150  StdRegions::Orientation orient);
151 
152  LOCAL_REGIONS_EXPORT void v_ComputeFaceNormal(const int face);
153 
154  //-----------------------------
155  // Operator creation functions
156  //-----------------------------
158  const Array<OneD, const NekDouble> &inarray,
159  Array<OneD,NekDouble> &outarray,
160  const StdRegions::StdMatrixKey &mkey);
161 
163  const Array<OneD, const NekDouble> &inarray,
164  Array<OneD,NekDouble> &outarray,
165  const StdRegions::StdMatrixKey &mkey);
166 
168  const int k1,
169  const int k2,
170  const Array<OneD, const NekDouble> &inarray,
171  Array<OneD,NekDouble> &outarray,
172  const StdRegions::StdMatrixKey &mkey);
173 
174  //-----------------------------
175  // Matrix creation functions
176  //-----------------------------
178  const StdRegions::StdMatrixKey &mkey);
179 
181  const MatrixKey &mkey);
182 
184  const MatrixKey &mkey);
185 
187  const StdRegions::StdMatrixKey &mkey);
188 
190  const MatrixKey &mkey);
191 
192  LOCAL_REGIONS_EXPORT virtual
194  const MatrixKey &mkey);
195 
197  const MatrixKey &mkey);
198 
200  const DNekMatSharedPtr & m_transformationmatrix,
201  DNekMatSharedPtr m_inversetransformationmatrix,
202  DNekMatSharedPtr m_inversetransposedtransformationmatrix);
203 
205  const DNekScalMatSharedPtr & mat);
206 
208 
209  private:
212 
213  TetExp();
214 
216  const Array<OneD, const NekDouble> &inarray,
217  Array<OneD, NekDouble> &outarray,
218  const StdRegions::StdMatrixKey &mkey);
220  const Array<OneD, const NekDouble> &inarray,
221  Array<OneD, NekDouble> &outarray,
222  Array<OneD, NekDouble> &wsp);
223  };
224 
225  // type defines for use of TetExp in a boost vector
226  typedef boost::shared_ptr<TetExp> TetExpSharedPtr;
227  typedef std::vector< TetExpSharedPtr > TetExpVector;
229 
230  } //end of namespace
231 } //end of namespace
232 
233 #endif // TETEXP_H