Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PyrExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File PyrExp.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 PyrExp routines
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef PYREXP_H
37 #define PYREXP_H
38 
39 #include <StdRegions/StdPyrExp.h>
40 #include <SpatialDomains/PyrGeom.h>
41 #include <LocalRegions/MatrixKey.h>
45 
46 namespace Nektar
47 {
48  namespace LocalRegions
49  {
50 
51  class PyrExp: virtual public StdRegions::StdPyrExp,
52  virtual public Expansion3D
53  {
54  public:
55 
56  /** \brief Constructor using BasisKey class for quadrature points and order
57  definition */
59  const LibUtilities::BasisKey &Bb,
60  const LibUtilities::BasisKey &Bc,
62 
63  LOCAL_REGIONS_EXPORT PyrExp(const PyrExp &T);
64 
66 
67  protected:
68  //-------------------------------
69  // Integration Methods
70  //-------------------------------
72  const Array<OneD, const NekDouble>& inarray);
73 
74 
75  //----------------------------
76  // Differentiation Methods
77  //----------------------------
78  LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv(
79  const Array<OneD, const NekDouble>& inarray,
80  Array<OneD, NekDouble>& out_d0,
81  Array<OneD, NekDouble>& out_d1,
82  Array<OneD, NekDouble>& out_d2);
83 
84 
85  //---------------------------------------
86  // Transforms
87  //---------------------------------------
88  LOCAL_REGIONS_EXPORT virtual void v_FwdTrans(
89  const Array<OneD, const NekDouble> &inarray,
90  Array<OneD, NekDouble> &outarray);
91 
92 
93  //---------------------------------------
94  // Inner product functions
95  //---------------------------------------
97  const Array<OneD, const NekDouble>& inarray,
98  Array<OneD, NekDouble>& outarray);
99 
100 
101  //---------------------------------------
102  // Evaluation functions
103  //---------------------------------------
104  LOCAL_REGIONS_EXPORT virtual void v_GetCoord(
105  const Array<OneD, const NekDouble> &Lcoords,
106  Array<OneD, NekDouble> &coords);
107 
108  LOCAL_REGIONS_EXPORT virtual void v_GetCoords(
109  Array<OneD, NekDouble> &coords_1,
110  Array<OneD, NekDouble> &coords_2,
111  Array<OneD, NekDouble> &coords_3);
112 
114  const Array<OneD, const NekDouble>& coord,
115  const Array<OneD, const NekDouble>& physvals);
116 
117 
118  //---------------------------------------
119  // Helper functions
120  //---------------------------------------
121  LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
122  LOCAL_REGIONS_EXPORT virtual
124  LOCAL_REGIONS_EXPORT void v_ComputeFaceNormal(const int face);
126  const int face,
127  const StdRegions::StdExpansionSharedPtr &FaceExp,
128  const Array<OneD, const NekDouble> &inarray,
129  Array<OneD, NekDouble> &outarray,
130  StdRegions::Orientation orient);
131 
132  //---------------------------------------
133  // Matrix creation functions
134  //---------------------------------------
136  const StdRegions::StdMatrixKey &mkey);
138  const StdRegions::StdMatrixKey &mkey);
140  const MatrixKey &mkey);
142  const MatrixKey &mkey);
144  const MatrixKey &mkey);
146  const MatrixKey &mkey);
148  const MatrixKey &mkey);
150 
151  private:
154 
156  const Array<OneD, const NekDouble> &inarray,
157  Array<OneD, NekDouble> &outarray,
158  Array<OneD, NekDouble> &wsp);
159  };
160 
161  // type defines for use of PyrExp in a boost vector
162  typedef boost::shared_ptr<PyrExp> PyrExpSharedPtr;
163  typedef std::vector<PyrExpSharedPtr> PyrExpVector;
165  } //end of namespace
166 } //end of namespace
167 
168 #endif //PYREXP_H