Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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
109 
110  LOCAL_REGIONS_EXPORT virtual void v_GetCoord(
111  const Array<OneD, const NekDouble> &Lcoords,
112  Array<OneD, NekDouble> &coords);
113 
114  LOCAL_REGIONS_EXPORT virtual void v_GetCoords(
115  Array<OneD, NekDouble> &coords_1,
116  Array<OneD, NekDouble> &coords_2,
117  Array<OneD, NekDouble> &coords_3);
118 
120  const Array<OneD, const NekDouble>& coord,
121  const Array<OneD, const NekDouble>& physvals);
122 
123 
124  //---------------------------------------
125  // Helper functions
126  //---------------------------------------
127  LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
128 
130  const int face,
131  Array<OneD, int> &outarray);
132 
133  LOCAL_REGIONS_EXPORT void v_ComputeFaceNormal(const int face);
134  //---------------------------------------
135  // Matrix creation functions
136  //---------------------------------------
138  const StdRegions::StdMatrixKey &mkey);
140  const StdRegions::StdMatrixKey &mkey);
142  const MatrixKey &mkey);
144  const MatrixKey &mkey);
146  const MatrixKey &mkey);
148  const MatrixKey &mkey);
150  const MatrixKey &mkey);
152 
153  private:
156 
158  const Array<OneD, const NekDouble> &inarray,
159  Array<OneD, NekDouble> &outarray,
161  };
162 
163  // type defines for use of PyrExp in a boost vector
164  typedef boost::shared_ptr<PyrExp> PyrExpSharedPtr;
165  typedef std::vector<PyrExpSharedPtr> PyrExpVector;
167  } //end of namespace
168 } //end of namespace
169 
170 #endif //PYREXP_H
boost::shared_ptr< PyrGeom > PyrGeomSharedPtr
Definition: PyrGeom.h:84
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:923
void v_ComputeFaceNormal(const int face)
Definition: PyrExp.cpp:478
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PyrExp.h:155
virtual void v_ComputeLaplacianMetric()
Definition: PyrExp.cpp:1036
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:797
virtual void v_GetFacePhysMap(const int face, Array< OneD, int > &outarray)
Definition: PyrExp.cpp:378
std::vector< PyrExpSharedPtr >::iterator PyrExpVectorIter
Definition: PyrExp.h:166
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: PyrExp.cpp:771
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:750
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
Definition: PyrExp.cpp:304
virtual int v_GetCoordim()
Definition: PyrExp.cpp:373
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
Definition: PyrExp.cpp:1190
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:329
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:164
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:792
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:782
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:787
#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:347
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:355
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PyrExp.h:154
std::vector< PyrExpSharedPtr > PyrExpVector
Definition: PyrExp.h:165
Describes the specification for a Basis.
Definition: Basis.h:50
virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const
Definition: PyrExp.cpp:312
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