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 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: Header file for PyrExp routines
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef PYREXP_H
36 #define PYREXP_H
37 
38 #include <StdRegions/StdPyrExp.h>
39 #include <SpatialDomains/PyrGeom.h>
40 #include <LocalRegions/MatrixKey.h>
44 
45 namespace Nektar
46 {
47  namespace LocalRegions
48  {
49 
50  class PyrExp: virtual public StdRegions::StdPyrExp,
51  virtual public Expansion3D
52  {
53  public:
54 
55  /** \brief Constructor using BasisKey class for quadrature points and order
56  definition */
58  const LibUtilities::BasisKey &Bb,
59  const LibUtilities::BasisKey &Bc,
61 
63 
65 
66  protected:
67  //-------------------------------
68  // Integration Methods
69  //-------------------------------
71  const Array<OneD, const NekDouble>& inarray);
72 
73 
74  //----------------------------
75  // Differentiation Methods
76  //----------------------------
77  LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv(
78  const Array<OneD, const NekDouble>& inarray,
79  Array<OneD, NekDouble>& out_d0,
80  Array<OneD, NekDouble>& out_d1,
81  Array<OneD, NekDouble>& out_d2);
82 
83 
84  //---------------------------------------
85  // Transforms
86  //---------------------------------------
87  LOCAL_REGIONS_EXPORT virtual void v_FwdTrans(
88  const Array<OneD, const NekDouble> &inarray,
89  Array<OneD, NekDouble> &outarray);
90 
91 
92  //---------------------------------------
93  // Inner product functions
94  //---------------------------------------
96  const Array<OneD, const NekDouble>& inarray,
97  Array<OneD, NekDouble>& outarray);
99  const Array<OneD, const NekDouble>& inarray,
100  Array<OneD, NekDouble>& outarray,
101  bool multiplybyweights = true);
103  const int dir,
104  const Array<OneD, const NekDouble>& inarray,
105  Array<OneD, NekDouble>& outarray);
107  const int dir,
108  const Array<OneD, const NekDouble>& inarray,
109  Array<OneD, NekDouble>& outarray);
110 
112  const int dir,
113  const Array<OneD, const NekDouble> &inarray,
114  Array<OneD, Array<OneD, NekDouble> > &outarray);
115 
116  //---------------------------------------
117  // Evaluation functions
118  //---------------------------------------
119  LOCAL_REGIONS_EXPORT virtual
121 
122  LOCAL_REGIONS_EXPORT virtual
124 
125  LOCAL_REGIONS_EXPORT virtual void v_GetCoord(
126  const Array<OneD, const NekDouble> &Lcoords,
127  Array<OneD, NekDouble> &coords);
128 
129  LOCAL_REGIONS_EXPORT virtual void v_GetCoords(
130  Array<OneD, NekDouble> &coords_1,
131  Array<OneD, NekDouble> &coords_2,
132  Array<OneD, NekDouble> &coords_3);
133 
135  const NekDouble *data,
136  const std::vector<unsigned int > &nummodes,
137  const int mode_offset,
138  NekDouble * coeffs,
139  std::vector<LibUtilities::BasisType> &fromType);
140 
142  const Array<OneD, const NekDouble> &Lcoord,
143  const Array<OneD, const NekDouble> &physvals);
144 
146  const Array<OneD, const NekDouble>& coord,
147  const Array<OneD, const NekDouble>& physvals);
148 
149 
150  //---------------------------------------
151  // Helper functions
152  //---------------------------------------
153  LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
154 
156  const int face,
157  Array<OneD, int> &outarray);
158 
159  LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int face);
160 
161 
163  Array<OneD, NekDouble> &array,
164  const StdRegions::StdMatrixKey &mkey);
165 
166  //---------------------------------------
167  // Matrix creation functions
168  //---------------------------------------
170  const StdRegions::StdMatrixKey &mkey);
172  const StdRegions::StdMatrixKey &mkey);
174  const MatrixKey &mkey);
176  const MatrixKey &mkey);
178  const MatrixKey &mkey);
180  const MatrixKey &mkey);
182  const MatrixKey &mkey);
184 
185  private:
188 
190  const Array<OneD, const NekDouble> &inarray,
191  Array<OneD, NekDouble> &outarray,
193  };
194 
195  typedef std::shared_ptr<PyrExp> PyrExpSharedPtr;
196  typedef std::vector<PyrExpSharedPtr> PyrExpVector;
197  } //end of namespace
198 } //end of namespace
199 
200 #endif //PYREXP_H
#define LOCAL_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:50
virtual int v_GetCoordim()
Definition: PyrExp.cpp:645
virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const
Definition: PyrExp.cpp:515
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: PyrExp.cpp:1073
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PyrExp.h:186
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
Definition: PyrExp.cpp:1039
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:1105
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:1115
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:138
virtual void v_GetTracePhysMap(const int face, Array< OneD, int > &outarray)
Definition: PyrExp.cpp:650
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: PyrExp.cpp:1094
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:278
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: PyrExp.cpp:359
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:627
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PyrExp.h:187
NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
Definition: PyrExp.cpp:619
void v_ComputeTraceNormal(const int face)
Definition: PyrExp.cpp:750
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
Definition: PyrExp.cpp:550
virtual void v_ComputeLaplacianMetric()
Definition: PyrExp.cpp:1380
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
Definition: PyrExp.cpp:507
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:45
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:1110
virtual void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
Definition: PyrExp.cpp:532
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:111
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:220
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType)
Definition: PyrExp.cpp:559
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculates the inner product .
Definition: PyrExp.cpp:351
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Definition: PyrExp.cpp:285
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:1120
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
Definition: PyrExp.cpp:1534
virtual void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
Definition: PyrExp.cpp:410
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
Definition: PyrExp.cpp:1268
std::vector< PyrExpSharedPtr > PyrExpVector
Definition: PyrExp.h:196
std::shared_ptr< PyrExp > PyrExpSharedPtr
Definition: PyrExp.h:195
std::shared_ptr< PyrGeom > PyrGeomSharedPtr
Definition: PyrGeom.h:74
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:73
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
double NekDouble