Nektar++
PrismExp.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: PrismExp.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 PrismExp routines
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef PRISMEXP_H
36#define PRISMEXP_H
37
44
46{
47class PrismExp : virtual public StdRegions::StdPrismExp,
48 virtual public Expansion3D
49{
50public:
51 /// \brief Constructor using BasisKey class for quadrature
52 /// points and order definition
55 const LibUtilities::BasisKey &Bc,
57
59
60 LOCAL_REGIONS_EXPORT ~PrismExp() 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;
101 const int dir, const Array<OneD, const NekDouble> &inarray,
102 Array<OneD, Array<OneD, NekDouble>> &outarray) override;
103
104 //---------------------------------------
105 // Evaluation functions
106 //---------------------------------------
108 const Array<OneD, const NekDouble> &Lcoords,
109 Array<OneD, NekDouble> &coords) override;
110
113 Array<OneD, NekDouble> &coords_3) override;
114
117 const Array<OneD, const NekDouble> &physvals) override;
118
121 const Array<OneD, const NekDouble> &physvals) override;
122
125 const Array<OneD, const NekDouble> &inarray,
126 std::array<NekDouble, 3> &firstOrderDerivs) override;
127
128 //---------------------------------------
129 // Helper functions
130 //---------------------------------------
131
133 void) const override;
134
136 void) const override;
137
139 const NekDouble *data, const std::vector<unsigned int> &nummodes,
140 const int mode_offset, NekDouble *coeffs,
141 std::vector<LibUtilities::BasisType> &fromType) override;
142
144 const int face, Array<OneD, int> &outarray) override;
145
146 LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int face) override;
147
148 //---------------------------------------
149 // Operator creation functions
150 //---------------------------------------
152 const Array<OneD, const NekDouble> &inarray,
153 Array<OneD, NekDouble> &outarray,
154 const StdRegions::StdMatrixKey &mkey) override;
156 const Array<OneD, const NekDouble> &inarray,
157 Array<OneD, NekDouble> &outarray,
158 const StdRegions::StdMatrixKey &mkey) override;
160 const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
161 Array<OneD, NekDouble> &outarray,
162 const StdRegions::StdMatrixKey &mkey) override;
164 const Array<OneD, const NekDouble> &inarray,
165 Array<OneD, NekDouble> &outarray,
166 const StdRegions::StdMatrixKey &mkey) override;
167
170 const StdRegions::StdMatrixKey &mkey) override;
171
172 //---------------------------------------
173 // Matrix creation functions
174 //---------------------------------------
176 v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override;
178 v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override;
180 v_GetLocMatrix(const MatrixKey &mkey) override;
182 v_GetLocStaticCondMatrix(const MatrixKey &mkey) override;
183 LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override;
185 const MatrixKey &mkey) override;
186
189 bool standard = true) override;
190
192 Array<OneD, Array<OneD, NekDouble>> &d0factors,
193 Array<OneD, Array<OneD, NekDouble>> &d1factors,
194 Array<OneD, Array<OneD, NekDouble>> &d2factors) override;
195
196private:
201
203 const Array<OneD, const NekDouble> &inarray,
204 Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp) override;
205};
206
207typedef std::shared_ptr<PrismExp> PrismExpSharedPtr;
208typedef std::vector<PrismExpSharedPtr> PrismExpVector;
209} // namespace Nektar::LocalRegions
210
211#define H_PRISMEXP
212#endif
#define LOCAL_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:45
DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override
Definition: PrismExp.cpp:1068
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
Definition: PrismExp.cpp:1045
StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const override
Definition: PrismExp.cpp:458
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
Definition: PrismExp.cpp:992
void v_DropLocStaticCondMatrix(const MatrixKey &mkey) override
Definition: PrismExp.cpp:1096
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
Definition: PrismExp.cpp:1007
void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true) override
Definition: PrismExp.cpp:1305
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: PrismExp.cpp:261
DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey) override
Definition: PrismExp.cpp:1080
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculates the inner product .
Definition: PrismExp.cpp:327
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: PrismExp.cpp:123
~PrismExp() override=default
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PrismExp.h:200
void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
Definition: PrismExp.cpp:267
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: PrismExp.cpp:545
void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
Get the coordinates #coords at the local coordinates #Lcoords.
Definition: PrismExp.cpp:482
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: PrismExp.cpp:1549
void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
Definition: PrismExp.cpp:378
StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const override
Definition: PrismExp.cpp:465
void v_ComputeTraceNormal(const int face) override
Get the normals along specficied face Get the face normals interplated to a points0 x points 0 type d...
Definition: PrismExp.cpp:703
void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
Definition: PrismExp.cpp:985
void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp) override
Calculate the Laplacian multiplication in a matrix-free manner.
Definition: PrismExp.cpp:1119
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: PrismExp.cpp:334
NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals) override
Definition: PrismExp.cpp:511
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: PrismExp.cpp:209
PrismExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, const SpatialDomains::PrismGeomSharedPtr &geom)
Constructor using BasisKey class for quadrature points and order definition.
Definition: PrismExp.cpp:45
void v_GetTracePhysMap(const int face, Array< OneD, int > &outarray) override
Definition: PrismExp.cpp:602
void v_DropLocMatrix(const MatrixKey &mkey) override
Definition: PrismExp.cpp:1085
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: PrismExp.cpp:519
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey) override
Definition: PrismExp.cpp:1014
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PrismExp.h:198
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey) override
Definition: PrismExp.cpp:1090
NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray) override
Integrate the physical point list inarray over prismatic region and return the value.
Definition: PrismExp.cpp:96
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
Definition: PrismExp.cpp:499
Class representing a prismatic element in reference space.
Definition: StdPrismExp.h:45
std::shared_ptr< PrismExp > PrismExpSharedPtr
Definition: PrismExp.h:207
std::vector< PrismExpSharedPtr > PrismExpVector
Definition: PrismExp.h:208
std::shared_ptr< PrismGeom > PrismGeomSharedPtr
Definition: PrismGeom.h:82
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