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
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 
127  const int face,
128  Array<OneD, int> &outarray);
129 
130  LOCAL_REGIONS_EXPORT void v_ComputeFaceNormal(const int face);
131  //---------------------------------------
132  // Matrix creation functions
133  //---------------------------------------
135  const StdRegions::StdMatrixKey &mkey);
137  const StdRegions::StdMatrixKey &mkey);
139  const MatrixKey &mkey);
141  const MatrixKey &mkey);
143  const MatrixKey &mkey);
145  const MatrixKey &mkey);
147  const MatrixKey &mkey);
149 
150  private:
153 
155  const Array<OneD, const NekDouble> &inarray,
156  Array<OneD, NekDouble> &outarray,
158  };
159 
160  // type defines for use of PyrExp in a boost vector
161  typedef boost::shared_ptr<PyrExp> PyrExpSharedPtr;
162  typedef std::vector<PyrExpSharedPtr> PyrExpVector;
164  } //end of namespace
165 } //end of namespace
166 
167 #endif //PYREXP_H
boost::shared_ptr< PyrGeom > PyrGeomSharedPtr
Definition: PyrGeom.h:84
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:910
void v_ComputeFaceNormal(const int face)
Definition: PyrExp.cpp:465
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PyrExp.h:152
virtual void v_ComputeLaplacianMetric()
Definition: PyrExp.cpp:1023
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:784
virtual void v_GetFacePhysMap(const int face, Array< OneD, int > &outarray)
Definition: PyrExp.cpp:365
std::vector< PyrExpSharedPtr >::iterator PyrExpVectorIter
Definition: PyrExp.h:163
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: PyrExp.cpp:758
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:737
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:1177
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:161
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
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:779
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:769
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:774
#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:151
std::vector< PyrExpSharedPtr > PyrExpVector
Definition: PyrExp.h:162
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