Nektar++
Loading...
Searching...
No Matches
StdHexExp.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: StdHexExp.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 hexahedron routines.
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_LIBRARY_STDREGIONS_STDHEXEXP_H
36#define NEKTAR_LIBRARY_STDREGIONS_STDHEXEXP_H
37
39
40namespace Nektar::StdRegions
41{
42/// Class representing a hexehedral element in reference space.
43class StdHexExp : virtual public StdExpansion3D
44{
45
46public:
48 const LibUtilities::BasisKey &Bb,
49 const LibUtilities::BasisKey &Bc);
51 STD_REGIONS_EXPORT ~StdHexExp() override = default;
52
53protected:
54 //----------------------------
55 // Differentiation Methods
56 //----------------------------
58 const Array<OneD, const NekDouble> &inarray,
60 Array<OneD, NekDouble> &out_d2) override;
62 const int dir, const Array<OneD, const NekDouble> &inarray,
63 Array<OneD, NekDouble> &outarray) override;
65 const Array<OneD, const NekDouble> &inarray,
67 Array<OneD, NekDouble> &out_d2) override;
68
69 //---------------------------------------
70 // Transforms
71 //---------------------------------------
73 const Array<OneD, const NekDouble> &inarray,
74 Array<OneD, NekDouble> &outarray) override;
76 const Array<OneD, const NekDouble> &inarray,
77 Array<OneD, NekDouble> &outarray) override;
82 const Array<OneD, const NekDouble> &inarray,
84 bool doCheckCollDir0, bool doCheckCollDir1,
85 bool doCheckCollDir2) override;
87 const Array<OneD, const NekDouble> &inarray,
88 Array<OneD, NekDouble> &outarray) override;
89
90 //---------------------------------------
91 // Inner product functions
92 //---------------------------------------
94 const Array<OneD, const NekDouble> &inarray,
95 Array<OneD, NekDouble> &outarray) override;
97 const Array<OneD, const NekDouble> &inarray,
98 Array<OneD, NekDouble> &outarray, bool multbyweights = true) override;
100 const Array<OneD, const NekDouble> &base0,
101 const Array<OneD, const NekDouble> &base1,
102 const Array<OneD, const NekDouble> &base2,
103 const Array<OneD, const NekDouble> &inarray,
105 bool doCheckCollDir0, bool doCheckCollDir1,
106 bool doCheckCollDir2) override;
108 const int dir, const Array<OneD, const NekDouble> &inarray,
109 Array<OneD, NekDouble> &outarray) override;
111 const int dir, const Array<OneD, const NekDouble> &inarray,
112 Array<OneD, NekDouble> &outarray) override;
113
114 //---------------------------------------
115 // Evaluation functions
116 //---------------------------------------
119 Array<OneD, NekDouble> &eta) override;
122 Array<OneD, NekDouble> &xi) override;
124 const int mode, Array<OneD, NekDouble> &outarray) override;
126 const Array<OneD, const NekDouble> &coords, int mode) final;
129 const Array<OneD, const NekDouble> &inarray,
130 std::array<NekDouble, 3> &firstOrderDerivs) override;
131
132 //---------------------------
133 // Helper functions
134 //---------------------------
135 STD_REGIONS_EXPORT int v_GetNverts() const override;
136 STD_REGIONS_EXPORT int v_GetNedges() const override;
137 STD_REGIONS_EXPORT int v_GetNtraces() const override;
139 STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override;
140 STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override;
141 STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const override;
142 STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const override;
143 STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const override;
145 const int i, const int j) const override;
147 const std::vector<unsigned int> &nummodes, int &modes_offset) override;
149 const int i, const int k, bool useGLL = false) const override;
153 Array<OneD, NekDouble> &coords_z) override;
155 const int fid, int &numModes0, int &numModes1,
156 Orientation faceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
157 STD_REGIONS_EXPORT int v_GetEdgeNcoeffs(const int i) const override;
158
159 //--------------------------
160 // Mappings
161 //--------------------------
163 int localVertexId, bool useCoeffPacking = false) override;
165 Array<OneD, unsigned int> &outarray) override;
167 Array<OneD, unsigned int> &outarray) override;
169 const unsigned int fid, Array<OneD, unsigned int> &maparray) override;
171 const unsigned int fid, Array<OneD, unsigned int> &maparray,
172 Array<OneD, int> &signarray, Orientation faceOrient, int P,
173 int Q) override;
175 const int tid, Array<OneD, unsigned int> &maparray,
176 Array<OneD, int> &signarray,
177 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
179 const int tid, Array<OneD, unsigned int> &maparray,
180 Array<OneD, int> &signarray,
181 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
182
183 //---------------------------------------
184 // Wrapper functions
185 //---------------------------------------
187 v_GenMatrix(const StdMatrixKey &mkey) override;
189 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
190
191 //---------------------------------------
192 // Output interpolation functions
193 //---------------------------------------
195 Array<OneD, int> &conn, bool standard = true) override;
196
197 //---------------------------------------
198 // Operator evaluation functions
199 //---------------------------------------
201 const Array<OneD, const NekDouble> &inarray,
202 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
204 const Array<OneD, const NekDouble> &inarray,
205 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
207 const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
208 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
210 const int i, const Array<OneD, const NekDouble> &inarray,
211 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
213 const Array<OneD, const NekDouble> &inarray,
214 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
216 const Array<OneD, const NekDouble> &inarray,
217 Array<OneD, NekDouble> &outarray) override;
219 Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override;
221 Array<OneD, NekDouble> &array, const NekDouble alpha,
222 const NekDouble exponent, const NekDouble cutoff) override;
223};
224
225typedef std::shared_ptr<StdHexExp> StdHexExpSharedPtr;
226
227} // namespace Nektar::StdRegions
228
229#endif
#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 hexehedral element in reference space.
Definition StdHexExp.h:44
int v_NumDGBndryCoeffs() const override
void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) 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
Differentiation Methods.
Definition StdHexExp.cpp:73
void v_ExponentialFilter(Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff) override
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset) override
LibUtilities::PointsKey v_GetTracePointsKey(const int i, const int j) const override
NekDouble v_PhysEvaluateBasis(const Array< OneD, const NekDouble > &coords, int mode) final
void v_GetTraceInteriorToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2) override
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) override
int v_GetEdgeNcoeffs(const int i) const override
void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multbyweights=true) override
int v_GetTraceNumPoints(const int i) const override
NekDouble v_PhysEvalFirstDeriv(const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
void v_GetTraceCoeffMap(const unsigned int fid, Array< OneD, unsigned int > &maparray) override
LibUtilities::ShapeType v_DetShapeType() const override
void v_GetTraceNumModes(const int fid, int &numModes0, int &numModes1, Orientation faceOrient=eDir1FwdDir1_Dir2FwdDir2) override
void v_LocCollapsedToLocCoord(const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi) override
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
StdHexExp(const StdHexExp &T)=default
int v_NumBndryCoeffs() const override
int v_GetNedges() const override
void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
int v_GetNtraces() const override
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
int v_GetNverts() const override
bool v_IsBoundaryInteriorExpansion() const override
Definition StdHexExp.cpp:56
void v_GetInteriorMap(Array< OneD, unsigned int > &outarray) override
void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray) override
void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray) override
void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true) override
void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
int v_GetTraceIntNcoeffs(const int i) const 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
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) 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_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
void v_GetEdgeInteriorToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2) override
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
const LibUtilities::BasisKey v_GetTraceBasisKey(const int i, const int k, bool useGLL=false) const override
void v_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z) override
DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
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
int v_GetTraceNcoeffs(const int i) const override
~StdHexExp() override=default
void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
@ P
Monomial polynomials .
Definition BasisType.h:62
std::shared_ptr< StdHexExp > StdHexExpSharedPtr
Definition StdHexExp.h:225
std::shared_ptr< DNekMat > DNekMatSharedPtr