Nektar++
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
106 
107  LOCAL_REGIONS_EXPORT virtual void v_GetCoord(
108  const Array<OneD, const NekDouble> &Lcoords,
109  Array<OneD, NekDouble> &coords);
110 
111  LOCAL_REGIONS_EXPORT virtual void v_GetCoords(
112  Array<OneD, NekDouble> &coords_1,
113  Array<OneD, NekDouble> &coords_2,
114  Array<OneD, NekDouble> &coords_3);
115 
117  const Array<OneD, const NekDouble>& coord,
118  const Array<OneD, const NekDouble>& physvals);
119 
120 
121  //---------------------------------------
122  // Helper functions
123  //---------------------------------------
124  LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
125  LOCAL_REGIONS_EXPORT void v_ComputeFaceNormal(const int face);
127  const int face,
128  const StdRegions::StdExpansionSharedPtr &FaceExp,
129  const Array<OneD, const NekDouble> &inarray,
130  Array<OneD, NekDouble> &outarray,
131  StdRegions::Orientation orient);
132 
133  //---------------------------------------
134  // Matrix creation functions
135  //---------------------------------------
137  const StdRegions::StdMatrixKey &mkey);
139  const StdRegions::StdMatrixKey &mkey);
141  const MatrixKey &mkey);
143  const MatrixKey &mkey);
145  const MatrixKey &mkey);
147  const MatrixKey &mkey);
149  const MatrixKey &mkey);
151 
152  private:
155 
157  const Array<OneD, const NekDouble> &inarray,
158  Array<OneD, NekDouble> &outarray,
160  };
161 
162  // type defines for use of PyrExp in a boost vector
163  typedef boost::shared_ptr<PyrExp> PyrExpSharedPtr;
164  typedef std::vector<PyrExpSharedPtr> PyrExpVector;
166  } //end of namespace
167 } //end of namespace
168 
169 #endif //PYREXP_H
boost::shared_ptr< PyrGeom > PyrGeomSharedPtr
Definition: PyrGeom.h:83
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:957
void v_ComputeFaceNormal(const int face)
Definition: PyrExp.cpp:512
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PyrExp.h:154
virtual void v_ComputeLaplacianMetric()
Definition: PyrExp.cpp:1070
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:831
std::vector< PyrExpSharedPtr >::iterator PyrExpVectorIter
Definition: PyrExp.h:165
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: PyrExp.cpp:805
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculate the inner product of inarray with respect to the basis B=base0*base1*base2 and put into out...
Definition: PyrExp.cpp:276
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: PyrExp.cpp:784
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
Definition: PyrExp.cpp:304
virtual int v_GetCoordim()
Definition: PyrExp.cpp:360
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
Definition: PyrExp.cpp:1224
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
virtual void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
Definition: PyrExp.cpp:316
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrate the physical point list inarray over pyramidic region and return the value.
Definition: PyrExp.cpp:110
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
Definition: PyrExp.cpp:219
boost::shared_ptr< PyrExp > PyrExpSharedPtr
Definition: PyrExp.h:163
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
virtual void v_GetFacePhysVals(const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
Definition: PyrExp.cpp:365
double NekDouble
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
Calculate the derivative of the physical points.
Definition: PyrExp.cpp:137
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:826
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:816
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:821
#define LOCAL_REGIONS_EXPORT
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
Definition: PyrExp.cpp:334
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals)
This function evaluates the expansion at a single (arbitrary) point of the domain.
Definition: PyrExp.cpp:342
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PyrExp.h:153
std::vector< PyrExpSharedPtr > PyrExpVector
Definition: PyrExp.h:164
Describes the specification for a Basis.
Definition: Basis.h:50
PyrExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, const SpatialDomains::PyrGeomSharedPtr &geom)
Constructor using BasisKey class for quadrature points and order definition.
Definition: PyrExp.cpp:44