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
45namespace Nektar
46{
47namespace LocalRegions
48{
49
50class PyrExp : virtual public StdRegions::StdPyrExp, virtual public Expansion3D
51{
52public:
53 /** \brief Constructor using BasisKey class for quadrature points and order
54 definition */
56 const LibUtilities::BasisKey &Bb,
57 const LibUtilities::BasisKey &Bc,
59
61
62 LOCAL_REGIONS_EXPORT virtual ~PyrExp() override = default;
63
64protected:
65 //-------------------------------
66 // Integration Methods
67 //-------------------------------
69 const Array<OneD, const NekDouble> &inarray) override;
70
71 //----------------------------
72 // Differentiation Methods
73 //----------------------------
75 const Array<OneD, const NekDouble> &inarray,
77 Array<OneD, NekDouble> &out_d2) override;
78
79 //---------------------------------------
80 // Transforms
81 //---------------------------------------
83 const Array<OneD, const NekDouble> &inarray,
84 Array<OneD, NekDouble> &outarray) override;
85
86 //---------------------------------------
87 // Inner product functions
88 //---------------------------------------
90 const Array<OneD, const NekDouble> &inarray,
91 Array<OneD, NekDouble> &outarray) override;
93 const Array<OneD, const NekDouble> &inarray,
94 Array<OneD, NekDouble> &outarray,
95 bool multiplybyweights = true) override;
97 const int dir, const Array<OneD, const NekDouble> &inarray,
98 Array<OneD, NekDouble> &outarray) override;
100 const int dir, const Array<OneD, const NekDouble> &inarray,
101 Array<OneD, NekDouble> &outarray) override;
102
104 const int dir, const Array<OneD, const NekDouble> &inarray,
105 Array<OneD, Array<OneD, NekDouble>> &outarray) override;
106
107 //---------------------------------------
108 // Evaluation functions
109 //---------------------------------------
111 void) const override;
112
114 void) const override;
115
116 LOCAL_REGIONS_EXPORT virtual void v_GetCoord(
117 const Array<OneD, const NekDouble> &Lcoords,
118 Array<OneD, NekDouble> &coords) override;
119
122 Array<OneD, NekDouble> &coords_3) override;
123
125 const NekDouble *data, const std::vector<unsigned int> &nummodes,
126 const int mode_offset, NekDouble *coeffs,
127 std::vector<LibUtilities::BasisType> &fromType) override;
128
131 const Array<OneD, const NekDouble> &physvals) override;
132
134 const Array<OneD, const NekDouble> &coord,
135 const Array<OneD, const NekDouble> &physvals) override;
136
138 const Array<OneD, NekDouble> &coord,
139 const Array<OneD, const NekDouble> &inarray,
140 std::array<NekDouble, 3> &firstOrderDerivs) override;
141
142 //---------------------------------------
143 // Helper functions
144 //---------------------------------------
146 const int face, Array<OneD, int> &outarray) override;
147
148 LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int face) override;
149
152 const StdRegions::StdMatrixKey &mkey) override;
153
154 //---------------------------------------
155 // Matrix creation functions
156 //---------------------------------------
158 const StdRegions::StdMatrixKey &mkey) override;
160 const StdRegions::StdMatrixKey &mkey) override;
162 const MatrixKey &mkey) override;
164 const MatrixKey &mkey) override;
165 LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override;
167 const MatrixKey &mkey) override;
168 LOCAL_REGIONS_EXPORT virtual void v_ComputeLaplacianMetric() override;
170 Array<OneD, Array<OneD, NekDouble>> &d0factors,
171 Array<OneD, Array<OneD, NekDouble>> &d1factors,
172 Array<OneD, Array<OneD, NekDouble>> &d2factors) override;
173
174private:
179
181 const Array<OneD, const NekDouble> &inarray,
182 Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp) override;
183};
184
185typedef std::shared_ptr<PyrExp> PyrExpSharedPtr;
186typedef std::vector<PyrExpSharedPtr> PyrExpVector;
187} // namespace LocalRegions
188} // namespace Nektar
189
190#endif // PYREXP_H
#define LOCAL_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:47
virtual 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:543
virtual 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:96
virtual void v_ComputeLaplacianMetric() override
Definition: PyrExp.cpp:1097
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PyrExp.h:176
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
Definition: PyrExp.cpp:536
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override
Definition: PyrExp.cpp:1066
virtual 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:223
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey) override
Definition: PyrExp.cpp:1014
virtual ~PyrExp() override=default
void v_ComputeTraceNormal(const int face) override
Definition: PyrExp.cpp:731
virtual void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
Definition: PyrExp.cpp:519
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PyrExp.h:178
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculates the inner product .
Definition: PyrExp.cpp:344
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const override
Definition: PyrExp.cpp:495
void v_DropLocMatrix(const MatrixKey &mkey) override
Definition: PyrExp.cpp:1082
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp) override
Definition: PyrExp.cpp:1277
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: PyrExp.cpp:351
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 DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
Definition: PyrExp.cpp:1045
virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const override
Definition: PyrExp.cpp:502
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey) override
Definition: PyrExp.cpp:1087
virtual void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
Definition: PyrExp.cpp:396
virtual void v_GetTracePhysMap(const int face, Array< OneD, int > &outarray) override
Definition: PyrExp.cpp:633
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) override
Calculate the derivative of the physical points.
Definition: PyrExp.cpp:124
virtual 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:606
void v_DropLocStaticCondMatrix(const MatrixKey &mkey) override
Definition: PyrExp.cpp:1092
virtual 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:278
virtual 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:1360
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey) override
Definition: PyrExp.cpp:1077
NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals) override
Definition: PyrExp.cpp:598
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
Definition: PyrExp.cpp:284
std::vector< PyrExpSharedPtr > PyrExpVector
Definition: PyrExp.h:186
std::shared_ptr< PyrExp > PyrExpSharedPtr
Definition: PyrExp.h:185
std::shared_ptr< PyrGeom > PyrGeomSharedPtr
Definition: PyrGeom.h:77
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2
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