Nektar++
StdPrismExp.h
Go to the documentation of this file.
1//////////////////////////////////////////////////////////////////////////////
2//
3// File: StdPrismExp.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 field for prismatic routines built upon
32// StdExpansion3D
33//
34///////////////////////////////////////////////////////////////////////////////
35
36#ifndef NEKTAR_LIB_STDREGIONS_STDPRISMEXP_H
37#define NEKTAR_LIB_STDREGIONS_STDPRISMEXP_H
38
41
42namespace Nektar
43{
44namespace StdRegions
45{
46
47/// Class representing a prismatic element in reference space.
48class StdPrismExp : virtual public StdExpansion3D
49{
50
51public:
53
55 const LibUtilities::BasisKey &Bb,
56 const LibUtilities::BasisKey &Bc);
57
59 const LibUtilities::BasisKey &Bb,
60 const LibUtilities::BasisKey &Bc,
61 NekDouble *coeffs, NekDouble *phys);
62
64
65 STD_REGIONS_EXPORT virtual ~StdPrismExp() override;
66
67protected:
68 //---------------------------------------
69 // Differentiation Methods
70 //---------------------------------------
72 const Array<OneD, const NekDouble> &inarray,
74 Array<OneD, NekDouble> &out_d2) override;
76 const int dir, const Array<OneD, const NekDouble> &inarray,
77 Array<OneD, NekDouble> &outarray) override;
79 const Array<OneD, const NekDouble> &inarray,
81 Array<OneD, NekDouble> &out_d2) override;
83 const int dir, const Array<OneD, const NekDouble> &inarray,
84 Array<OneD, NekDouble> &outarray) override;
85
86 //---------------------------------------
87 // Transforms
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) override;
99 const Array<OneD, const NekDouble> &inarray,
101 bool doCheckCollDir0, bool doCheckCollDir1,
102 bool doCheckCollDir2) override;
103 STD_REGIONS_EXPORT virtual void v_FwdTrans(
104 const Array<OneD, const NekDouble> &inarray,
105 Array<OneD, NekDouble> &outarray) override;
106
107 //---------------------------------------
108 // Inner product functions
109 //---------------------------------------
111 const Array<OneD, const NekDouble> &inarray,
112 Array<OneD, NekDouble> &outarray) override;
114 const Array<OneD, const NekDouble> &inarray,
115 Array<OneD, NekDouble> &outarray,
116 bool multiplybyweights = true) override;
118 const Array<OneD, const NekDouble> &base0,
119 const Array<OneD, const NekDouble> &base1,
120 const Array<OneD, const NekDouble> &base2,
121 const Array<OneD, const NekDouble> &inarray,
123 bool doCheckCollDir0, bool doCheckCollDir1,
124 bool doCheckCollDir2) override;
126 const int dir, const Array<OneD, const NekDouble> &inarray,
127 Array<OneD, NekDouble> &outarray) override;
129 const int dir, const Array<OneD, const NekDouble> &inarray,
130 Array<OneD, NekDouble> &outarray) override;
131
132 //---------------------------------------
133 // Evaluation functions
134 //---------------------------------------
137 Array<OneD, NekDouble> &eta) override;
140 Array<OneD, NekDouble> &xi) override;
141 STD_REGIONS_EXPORT virtual void v_GetCoords(
143 Array<OneD, NekDouble> &xi_z) override;
144 STD_REGIONS_EXPORT virtual void v_FillMode(
145 const int mode, Array<OneD, NekDouble> &outarray) override;
147 const Array<OneD, const NekDouble> &coords, int mode) final override;
149 const int fid, int &numModes0, int &numModes1,
150 Orientation faceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
152 const Array<OneD, NekDouble> &coord,
153 const Array<OneD, const NekDouble> &inarray,
154 std::array<NekDouble, 3> &firstOrderDerivs) override;
155
156 //---------------------------------------
157 // Helper functions
158 //---------------------------------------
159 STD_REGIONS_EXPORT virtual int v_GetNverts() const override;
160 STD_REGIONS_EXPORT virtual int v_GetNedges() const override;
161 STD_REGIONS_EXPORT virtual int v_GetNtraces() const override;
163 const override;
164 STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const override;
165 STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const override;
167 const int i) const override;
169 const int i) const override;
171 const int i) const override;
172
173 STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const override;
174
176 const int i, const int k) const override;
178 const int i, const int j) const override;
179
181 const std::vector<unsigned int> &nummodes, int &modes_offset) override;
183 const override;
184
185 //---------------------------------------
186 // Mappings
187 //---------------------------------------
189 int localVertexId, bool useCoeffPacking = false) override;
191 Array<OneD, unsigned int> &outarray) override;
193 Array<OneD, unsigned int> &outarray) override;
195 const unsigned int fid, Array<OneD, unsigned int> &maparray) override;
197 const unsigned int fid, Array<OneD, unsigned int> &maparray,
198 Array<OneD, int> &signarray, Orientation faceOrient, int P,
199 int Q) override;
201 const int tid, Array<OneD, unsigned int> &maparray,
202 Array<OneD, int> &signarray,
203 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
204
206 const int tid, Array<OneD, unsigned int> &maparray,
207 Array<OneD, int> &signarray,
208 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
209
210 //---------------------------------------
211 // Wrapper functions
212 //---------------------------------------
214 const StdMatrixKey &mkey) override;
216 const StdMatrixKey &mkey) override;
217
219 const Array<OneD, const NekDouble> &inarray,
220 Array<OneD, NekDouble> &outarray) override;
221
223 Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override;
224
225 //---------------------------------------
226 // Method for applying sensors
227 //---------------------------------------
229 int numMin, const Array<OneD, const NekDouble> &inarray,
230 Array<OneD, NekDouble> &outarray) override;
231
232private:
233 //---------------------------------------
234 // Private helper functions
235 //---------------------------------------
236 STD_REGIONS_EXPORT int GetMode(int I, int J, int K);
237};
238
239typedef std::shared_ptr<StdPrismExp> StdPrismExpSharedPtr;
240
241} // namespace StdRegions
242} // namespace Nektar
243
244#endif // STDPRISMEXP_H
#define STD_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:47
Defines a specification for a set of points.
Definition: Points.h:55
Class representing a prismatic element in reference space.
Definition: StdPrismExp.h:49
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
virtual void v_GetElmtTraceToTraceMap(const unsigned int fid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation faceOrient, int P, int Q) override
void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual void v_GetEdgeInteriorToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2) override
virtual LibUtilities::PointsKey v_GetTracePointsKey(const int i, const int j) const override
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset) override
virtual int v_GetTraceIntNcoeffs(const int i) const override
virtual int v_NumBndryCoeffs() const override
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray) override
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual const LibUtilities::BasisKey v_GetTraceBasisKey(const int i, const int k) const override
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
virtual LibUtilities::ShapeType v_DetShapeType() const override
Return Shape of region, using ShapeType enum list; i.e. prism.
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...
virtual int v_GetNverts() const override
virtual int v_NumDGBndryCoeffs() const override
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: StdPrismExp.cpp:93
virtual void v_GetTraceNumModes(const int fid, int &numModes0, int &numModes1, Orientation faceOrient=eDir1FwdDir1_Dir2FwdDir2) override
virtual void v_GetCoords(Array< OneD, NekDouble > &xi_x, Array< OneD, NekDouble > &xi_y, Array< OneD, NekDouble > &xi_z) override
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray) override
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) override
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual int v_GetNtraces() const override
virtual ~StdPrismExp() override
Definition: StdPrismExp.cpp:71
virtual void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2) override
int GetMode(int I, int J, int K)
Compute the local mode number in the expansion for a particular tensorial combination.
virtual int v_GetTraceNcoeffs(const int i) const override
virtual void v_IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2) override
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...
StdPrismExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, NekDouble *coeffs, NekDouble *phys)
NekDouble v_PhysEvaluateBasis(const Array< OneD, const NekDouble > &coords, int mode) final override
virtual NekDouble v_PhysEvaluate(const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
virtual void v_BwdTrans_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2) override
virtual int v_GetEdgeNcoeffs(const int i) const override
virtual void v_LocCollapsedToLocCoord(const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi) override
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray) override
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual void v_GetTraceCoeffMap(const unsigned int fid, Array< OneD, unsigned int > &maparray) override
void v_GetTraceInteriorToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2) override
void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
virtual int v_GetTraceNumPoints(const int i) const override
virtual bool v_IsBoundaryInteriorExpansion() const override
virtual int v_GetNedges() const override
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Inner product of inarray over region with respect to the object's default expansion basis; output in ...
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
@ P
Monomial polynomials .
Definition: BasisType.h:64
std::shared_ptr< StdPrismExp > StdPrismExpSharedPtr
Definition: StdPrismExp.h:239
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75
double NekDouble