Nektar++
Loading...
Searching...
No Matches
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
40
41namespace Nektar::StdRegions
42{
43/// Class representing a prismatic element in reference space.
44class StdPrismExp : virtual public StdExpansion3D
45{
46public:
48 const LibUtilities::BasisKey &Bb,
49 const LibUtilities::BasisKey &Bc);
51 const LibUtilities::BasisKey &Bb,
52 const LibUtilities::BasisKey &Bc,
53 NekDouble *coeffs, NekDouble *phys);
56 STD_REGIONS_EXPORT ~StdPrismExp() override = default;
57
58protected:
59 //---------------------------------------
60 // Differentiation Methods
61 //---------------------------------------
63 const Array<OneD, const NekDouble> &inarray,
65 Array<OneD, NekDouble> &out_d2) override;
66
67 //---------------------------------------
68 // Transforms
69 //---------------------------------------
71 const Array<OneD, const NekDouble> &inarray,
72 Array<OneD, NekDouble> &outarray) override;
73
74 //---------------------------------------
75 // Inner product functions
76 //---------------------------------------
81 const Array<OneD, const NekDouble> &inarray,
83 const bool Deformed, [[maybe_unused]] bool CollDir0 = false,
84 [[maybe_unused]] bool CollDir1 = false,
85 [[maybe_unused]] bool CollDir2 = false) override;
87 const int dir, const Array<OneD, const NekDouble> &inarray,
88 Array<OneD, NekDouble> &outarray) override;
89
90 //---------------------------------------
91 // Evaluation functions
92 //---------------------------------------
95 Array<OneD, NekDouble> &eta) override;
98 Array<OneD, NekDouble> &xi) override;
101 Array<OneD, NekDouble> &xi_z) override;
103 const int mode, Array<OneD, NekDouble> &outarray) override;
105 const Array<OneD, const NekDouble> &coords, int mode) final;
107 const int fid, int &numModes0, int &numModes1,
108 Orientation faceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
111 const Array<OneD, const NekDouble> &inarray,
112 std::array<NekDouble, 3> &firstOrderDerivs) override;
113
114 //---------------------------------------
115 // Helper functions
116 //---------------------------------------
117 STD_REGIONS_EXPORT int v_GetNverts() const final;
118 STD_REGIONS_EXPORT int v_GetNedges() const final;
119 STD_REGIONS_EXPORT int v_GetNtraces() const final;
120 STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const override;
121 STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override;
122 STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override;
123 STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const override;
124 STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const override;
125 STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const override;
126 STD_REGIONS_EXPORT int v_GetEdgeNcoeffs(const int i) const override;
128 const int i, const int k, bool UseGLL = false) const override;
130 const int i, const int j) const override;
132 const std::vector<unsigned int> &nummodes, int &modes_offset) override;
134
135 //---------------------------------------
136 // Mappings
137 //---------------------------------------
139 int v_GetVertexMap(int localVertexId,
140 bool useCoeffPacking = false) override;
142 Array<OneD, unsigned int> &outarray) override;
144 Array<OneD, unsigned int> &outarray) override;
146 const unsigned int fid, Array<OneD, unsigned int> &maparray) override;
148 const unsigned int fid, Array<OneD, unsigned int> &maparray,
149 Array<OneD, int> &signarray, Orientation faceOrient, int P,
150 int Q) override;
152 const int tid, Array<OneD, unsigned int> &maparray,
153 Array<OneD, int> &signarray,
154 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
156 const int tid, Array<OneD, unsigned int> &maparray,
157 Array<OneD, int> &signarray,
158 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
159
160 //---------------------------------------
161 // Wrapper functions
162 //---------------------------------------
164 v_GenMatrix(const StdMatrixKey &mkey) override;
166 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
168 Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override;
169
170 //---------------------------------------
171 // Method for applying sensors
172 //---------------------------------------
174 int numMin, const Array<OneD, const NekDouble> &inarray,
175 Array<OneD, NekDouble> &outarray) override;
176
177private:
178 //---------------------------------------
179 // Private helper functions
180 //---------------------------------------
181 STD_REGIONS_EXPORT int GetMode(int I, int J, int K);
182};
183
185
186} // namespace Nektar::StdRegions
187
188#endif // STDPRISMEXP_H
#define STD_REGIONS_EXPORT
Describes the specification for a Basis.
Definition Basis.h:45
Defines a specification for a set of points.
Definition Points.h:50
Class representing a prismatic element in reference space.
Definition StdPrismExp.h:45
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
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
void v_GetEdgeInteriorToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2) override
LibUtilities::PointsKey v_GetTracePointsKey(const int i, const int j) const override
const LibUtilities::BasisKey v_GetTraceBasisKey(const int i, const int k, bool UseGLL=false) const override
NekDouble v_PhysEvalFirstDeriv(const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset) override
StdPrismExp(const StdPrismExp &T)=default
int v_GetTraceIntNcoeffs(const int i) const override
int v_NumBndryCoeffs() const override
void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray) override
NekDouble v_PhysEvaluateBasis(const Array< OneD, const NekDouble > &coords, int mode) final
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
LibUtilities::ShapeType v_DetShapeType() const override
Return Shape of region, using ShapeType enum list; i.e. prism.
int v_NumDGBndryCoeffs() const override
void v_GetTraceNumModes(const int fid, int &numModes0, int &numModes1, Orientation faceOrient=eDir1FwdDir1_Dir2FwdDir2) override
void v_GetCoords(Array< OneD, NekDouble > &xi_x, Array< OneD, NekDouble > &xi_y, Array< OneD, NekDouble > &xi_z) override
void v_IProductWRTBaseKernel(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, const Array< OneD, NekDouble > &jac, const bool Deformed, bool CollDir0=false, bool CollDir1=false, bool CollDir2=false) override
Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return...
void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray) override
DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) override
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
Calculate the derivative of the physical points.
int GetMode(int I, int J, int K)
Compute the local mode number in the expansion for a particular tensorial combination.
int v_GetTraceNcoeffs(const int i) const override
StdPrismExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, NekDouble *coeffs, NekDouble *phys)
~StdPrismExp() override=default
int v_GetEdgeNcoeffs(const int i) const override
void v_LocCollapsedToLocCoord(const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi) override
void v_GetInteriorMap(Array< OneD, unsigned int > &outarray) override
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
DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
int v_GetTraceNumPoints(const int i) const override
bool v_IsBoundaryInteriorExpansion() const override
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 ...
void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
std::shared_ptr< StdPrismExp > StdPrismExpSharedPtr
std::shared_ptr< DNekMat > DNekMatSharedPtr
STL namespace.