Nektar++
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;
69 const int dir, const Array<OneD, const NekDouble> &inarray,
70 Array<OneD, NekDouble> &outarray) override;
71
72 //---------------------------------------
73 // Transforms
74 //---------------------------------------
76 const Array<OneD, const NekDouble> &inarray,
77 Array<OneD, NekDouble> &outarray) override;
79 const Array<OneD, const NekDouble> &inarray,
80 Array<OneD, NekDouble> &outarray) override;
85 const Array<OneD, const NekDouble> &inarray,
87 bool doCheckCollDir0, bool doCheckCollDir1,
88 bool doCheckCollDir2) override;
90 const Array<OneD, const NekDouble> &inarray,
91 Array<OneD, NekDouble> &outarray) override;
92
93 //---------------------------------------
94 // Inner product functions
95 //---------------------------------------
97 const Array<OneD, const NekDouble> &inarray,
98 Array<OneD, NekDouble> &outarray) override;
100 const Array<OneD, const NekDouble> &inarray,
101 Array<OneD, NekDouble> &outarray, bool multbyweights = true) override;
103 const Array<OneD, const NekDouble> &base0,
104 const Array<OneD, const NekDouble> &base1,
105 const Array<OneD, const NekDouble> &base2,
106 const Array<OneD, const NekDouble> &inarray,
108 bool doCheckCollDir0, bool doCheckCollDir1,
109 bool doCheckCollDir2) override;
111 const int dir, const Array<OneD, const NekDouble> &inarray,
112 Array<OneD, NekDouble> &outarray) override;
114 const int dir, const Array<OneD, const NekDouble> &inarray,
115 Array<OneD, NekDouble> &outarray) override;
116
117 //---------------------------------------
118 // Evaluation functions
119 //---------------------------------------
122 Array<OneD, NekDouble> &eta) override;
125 Array<OneD, NekDouble> &xi) override;
127 const int mode, Array<OneD, NekDouble> &outarray) override;
129 const Array<OneD, const NekDouble> &coords, int mode) final;
132 const Array<OneD, const NekDouble> &inarray,
133 std::array<NekDouble, 3> &firstOrderDerivs) override;
134
135 //---------------------------
136 // Helper functions
137 //---------------------------
138 STD_REGIONS_EXPORT int v_GetNverts() const override;
139 STD_REGIONS_EXPORT int v_GetNedges() const override;
140 STD_REGIONS_EXPORT int v_GetNtraces() const override;
142 STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override;
143 STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override;
144 STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const override;
145 STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const override;
146 STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const override;
148 const int i, const int j) const override;
150 const std::vector<unsigned int> &nummodes, int &modes_offset) override;
152 const int i, const int k) const override;
156 Array<OneD, NekDouble> &coords_z) override;
158 const int fid, int &numModes0, int &numModes1,
159 Orientation faceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
160 STD_REGIONS_EXPORT int v_GetEdgeNcoeffs(const int i) const override;
161
162 //--------------------------
163 // Mappings
164 //--------------------------
166 int localVertexId, bool useCoeffPacking = false) override;
168 Array<OneD, unsigned int> &outarray) override;
170 Array<OneD, unsigned int> &outarray) override;
172 const unsigned int fid, Array<OneD, unsigned int> &maparray) override;
174 const unsigned int fid, Array<OneD, unsigned int> &maparray,
175 Array<OneD, int> &signarray, Orientation faceOrient, int P,
176 int Q) override;
178 const int tid, Array<OneD, unsigned int> &maparray,
179 Array<OneD, int> &signarray,
180 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
182 const int tid, Array<OneD, unsigned int> &maparray,
183 Array<OneD, int> &signarray,
184 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
185
186 //---------------------------------------
187 // Wrapper functions
188 //---------------------------------------
190 v_GenMatrix(const StdMatrixKey &mkey) override;
192 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
193
194 //---------------------------------------
195 // Output interpolation functions
196 //---------------------------------------
198 Array<OneD, int> &conn, bool standard = true) override;
199
200 //---------------------------------------
201 // Operator evaluation functions
202 //---------------------------------------
204 const Array<OneD, const NekDouble> &inarray,
205 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
207 const Array<OneD, const NekDouble> &inarray,
208 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
210 const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
211 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
213 const int i, 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, const StdMatrixKey &mkey) override;
219 const Array<OneD, const NekDouble> &inarray,
220 Array<OneD, NekDouble> &outarray) override;
222 Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override;
224 Array<OneD, NekDouble> &array, const NekDouble alpha,
225 const NekDouble exponent, const NekDouble cutoff) override;
226};
227
228typedef std::shared_ptr<StdHexExp> StdHexExpSharedPtr;
229
230} // namespace Nektar::StdRegions
231
232#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
Definition: StdHexExp.cpp:630
void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
Definition: StdHexExp.cpp:2270
void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: StdHexExp.cpp:2307
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:72
void v_ExponentialFilter(Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff) override
Definition: StdHexExp.cpp:2468
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
Definition: StdHexExp.cpp:835
void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
Definition: StdHexExp.cpp:505
int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset) override
Definition: StdHexExp.cpp:721
LibUtilities::PointsKey v_GetTracePointsKey(const int i, const int j) const override
Definition: StdHexExp.cpp:701
NekDouble v_PhysEvaluateBasis(const Array< OneD, const NekDouble > &coords, int mode) final
Definition: StdHexExp.cpp:569
void v_GetTraceInteriorToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2) override
Definition: StdHexExp.cpp:1835
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: StdHexExp.cpp:459
DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) override
Definition: StdHexExp.cpp:2265
NekDouble v_PhysEvaluate(const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
Definition: StdHexExp.cpp:1113
int v_GetEdgeNcoeffs(const int i) const override
Definition: StdHexExp.cpp:2159
void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multbyweights=true) override
Definition: StdHexExp.cpp:337
StdHexExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc)
Definition: StdHexExp.cpp:45
int v_GetTraceNumPoints(const int i) const override
Definition: StdHexExp.cpp:683
const LibUtilities::BasisKey v_GetTraceBasisKey(const int i, const int k) const override
Definition: StdHexExp.cpp:731
void v_GetTraceCoeffMap(const unsigned int fid, Array< OneD, unsigned int > &maparray) override
Definition: StdHexExp.cpp:1123
LibUtilities::ShapeType v_DetShapeType() const override
Definition: StdHexExp.cpp:605
void v_GetTraceNumModes(const int fid, int &numModes0, int &numModes1, Orientation faceOrient=eDir1FwdDir1_Dir2FwdDir2) override
Definition: StdHexExp.cpp:787
void v_LocCollapsedToLocCoord(const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi) override
Definition: StdHexExp.cpp:513
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
Definition: StdHexExp.cpp:2277
StdHexExp(const StdHexExp &T)=default
int v_NumBndryCoeffs() const override
Definition: StdHexExp.cpp:610
int v_GetNedges() const override
Definition: StdHexExp.cpp:595
void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: StdHexExp.cpp:262
int v_GetNtraces() const override
Definition: StdHexExp.cpp:600
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
Definition: StdHexExp.cpp:2300
int v_GetNverts() const override
Definition: StdHexExp.cpp:590
bool v_IsBoundaryInteriorExpansion() const override
Definition: StdHexExp.cpp:55
void v_GetInteriorMap(Array< OneD, unsigned int > &outarray) override
Definition: StdHexExp.cpp:963
void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray) override
Definition: StdHexExp.cpp:1024
void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray) override
Definition: StdHexExp.cpp:524
void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true) override
Definition: StdHexExp.cpp:2530
void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
Definition: StdHexExp.cpp:2292
int v_GetTraceIntNcoeffs(const int i) const override
Definition: StdHexExp.cpp:666
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
Definition: StdHexExp.cpp:118
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: StdHexExp.cpp:320
void v_GetElmtTraceToTraceMap(const unsigned int fid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation faceOrient, int P, int Q) override
Definition: StdHexExp.cpp:1247
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
Definition: StdHexExp.cpp:205
void v_GetEdgeInteriorToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2) override
Definition: StdHexExp.cpp:1542
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: StdHexExp.cpp:153
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
Definition: StdHexExp.cpp:2340
void v_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z) override
Definition: StdHexExp.cpp:759
DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
Definition: StdHexExp.cpp:2177
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: StdHexExp.cpp:452
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
Definition: StdHexExp.cpp:371
int v_GetTraceNcoeffs(const int i) const override
Definition: StdHexExp.cpp:649
~StdHexExp() override=default
void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: StdHexExp.cpp:180
@ P
Monomial polynomials .
Definition: BasisType.h:62
std::shared_ptr< StdHexExp > StdHexExpSharedPtr
Definition: StdHexExp.h:228
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75
double NekDouble