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
44
46{
47
48class PyrExp : virtual public StdRegions::StdPyrExp, virtual public Expansion3D
49{
50public:
51 /** \brief Constructor using BasisKey class for quadrature points and order
52 definition */
54 const LibUtilities::BasisKey &Bb,
55 const LibUtilities::BasisKey &Bc,
57
59
60 LOCAL_REGIONS_EXPORT ~PyrExp() override = default;
61
62protected:
63 //-------------------------------
64 // Integration Methods
65 //-------------------------------
67 v_Integral(const Array<OneD, const NekDouble> &inarray) override;
68
69 //----------------------------
70 // Differentiation Methods
71 //----------------------------
73 const Array<OneD, const NekDouble> &inarray,
75 Array<OneD, NekDouble> &out_d2) override;
76
77 //---------------------------------------
78 // Transforms
79 //---------------------------------------
81 const Array<OneD, const NekDouble> &inarray,
82 Array<OneD, NekDouble> &outarray) override;
83
84 //---------------------------------------
85 // Inner product functions
86 //---------------------------------------
88 const Array<OneD, const NekDouble> &inarray,
89 Array<OneD, NekDouble> &outarray) override;
91 const Array<OneD, const NekDouble> &inarray,
92 Array<OneD, NekDouble> &outarray,
93 bool multiplybyweights = true) override;
95 const int dir, const Array<OneD, const NekDouble> &inarray,
96 Array<OneD, NekDouble> &outarray) override;
98 const int dir, const Array<OneD, const NekDouble> &inarray,
99 Array<OneD, NekDouble> &outarray) override;
100
102 const int dir, const Array<OneD, const NekDouble> &inarray,
103 Array<OneD, Array<OneD, NekDouble>> &outarray) override;
104
105 //---------------------------------------
106 // Evaluation functions
107 //---------------------------------------
109 void) const override;
110
112 void) const override;
113
115 const Array<OneD, const NekDouble> &Lcoords,
116 Array<OneD, NekDouble> &coords) override;
117
120 Array<OneD, NekDouble> &coords_3) override;
121
123 const NekDouble *data, const std::vector<unsigned int> &nummodes,
124 const int mode_offset, NekDouble *coeffs,
125 std::vector<LibUtilities::BasisType> &fromType) override;
126
129 const Array<OneD, const NekDouble> &physvals) override;
130
133 const Array<OneD, const NekDouble> &physvals) override;
134
137 const Array<OneD, const NekDouble> &inarray,
138 std::array<NekDouble, 3> &firstOrderDerivs) override;
139
140 //---------------------------------------
141 // Helper functions
142 //---------------------------------------
144 const int face, Array<OneD, int> &outarray) override;
145
146 LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int face) override;
147
150 const StdRegions::StdMatrixKey &mkey) override;
151
152 //---------------------------------------
153 // Matrix creation functions
154 //---------------------------------------
156 v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override;
158 v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override;
160 v_GetLocMatrix(const MatrixKey &mkey) override;
162 v_GetLocStaticCondMatrix(const MatrixKey &mkey) override;
163 LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override;
165 const MatrixKey &mkey) override;
168 Array<OneD, Array<OneD, NekDouble>> &d0factors,
169 Array<OneD, Array<OneD, NekDouble>> &d1factors,
170 Array<OneD, Array<OneD, NekDouble>> &d2factors) override;
171
172private:
177
179 const Array<OneD, const NekDouble> &inarray,
180 Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp) override;
181};
182
183typedef std::shared_ptr<PyrExp> PyrExpSharedPtr;
184typedef std::vector<PyrExpSharedPtr> PyrExpVector;
185} // namespace Nektar::LocalRegions
186
187#endif // PYREXP_H
#define LOCAL_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:45
void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType) override
Definition: PyrExp.cpp:541
NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray) override
Integrate the physical point list inarray over pyramidic region and return the value.
Definition: PyrExp.cpp:94
void v_ComputeLaplacianMetric() override
Definition: PyrExp.cpp:1095
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PyrExp.h:174
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
Definition: PyrExp.cpp:534
DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override
Definition: PyrExp.cpp:1064
void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
Definition: PyrExp.cpp:221
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey) override
Definition: PyrExp.cpp:1012
void v_ComputeTraceNormal(const int face) override
Definition: PyrExp.cpp:729
void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
Definition: PyrExp.cpp:517
~PyrExp() override=default
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PyrExp.h:176
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculates the inner product .
Definition: PyrExp.cpp:342
StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const override
Definition: PyrExp.cpp:493
void v_DropLocMatrix(const MatrixKey &mkey) override
Definition: PyrExp.cpp:1080
void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp) override
Definition: PyrExp.cpp:1275
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: PyrExp.cpp:349
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:43
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
Definition: PyrExp.cpp:1043
StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const override
Definition: PyrExp.cpp:500
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey) override
Definition: PyrExp.cpp:1085
void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
Definition: PyrExp.cpp:394
void v_GetTracePhysMap(const int face, Array< OneD, int > &outarray) override
Definition: PyrExp.cpp:631
void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2) override
Calculate the derivative of the physical points.
Definition: PyrExp.cpp:122
NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals) override
This function evaluates the expansion at a single (arbitrary) point of the domain.
Definition: PyrExp.cpp:604
void v_DropLocStaticCondMatrix(const MatrixKey &mkey) override
Definition: PyrExp.cpp:1090
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculate the inner product of inarray with respect to the basis B=base0*base1*base2 and put into out...
Definition: PyrExp.cpp:276
void v_NormalTraceDerivFactors(Array< OneD, Array< OneD, NekDouble > > &d0factors, Array< OneD, Array< OneD, NekDouble > > &d1factors, Array< OneD, Array< OneD, NekDouble > > &d2factors) override
: This method gets all of the factors which are required as part of the Gradient Jump Penalty stabili...
Definition: PyrExp.cpp:1358
DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey) override
Definition: PyrExp.cpp:1075
NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals) override
Definition: PyrExp.cpp:596
void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
Definition: PyrExp.cpp:282
std::vector< PyrExpSharedPtr > PyrExpVector
Definition: PyrExp.h:184
std::shared_ptr< PyrExp > PyrExpSharedPtr
Definition: PyrExp.h:183
std::shared_ptr< PyrGeom > PyrGeomSharedPtr
Definition: PyrGeom.h:75
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:79
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75
double NekDouble