Nektar++
Loading...
Searching...
No Matches
StdTetExp.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: StdTetExp.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 tetrahedral routines built upon
32// StdExpansion3D
33//
34///////////////////////////////////////////////////////////////////////////////
35
36#ifndef NEKTAR_LIB_STDREGIONS_STDTETEXP_H
37#define NEKTAR_LIB_STDREGIONS_STDTETEXP_H
38
40
41namespace Nektar::StdRegions
42{
43class StdTetExp : virtual public StdExpansion3D
44{
45public:
47 const LibUtilities::BasisKey &Bb,
48 const LibUtilities::BasisKey &Bc);
50 const LibUtilities::BasisKey &Bb,
51 const LibUtilities::BasisKey &Bc,
52 NekDouble *coeffs, NekDouble *phys);
54 STD_REGIONS_EXPORT ~StdTetExp() override = default;
55
60
61protected:
62 //----------------------------
63 // Differentiation Methods
64 //----------------------------
66 const Array<OneD, const NekDouble> &inarray,
68 Array<OneD, NekDouble> &out_dz) override;
70 const int dir, const Array<OneD, const NekDouble> &inarray,
71 Array<OneD, NekDouble> &outarray) override;
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;
84 const Array<OneD, const NekDouble> &inarray,
85 Array<OneD, NekDouble> &outarray) override;
90 const Array<OneD, const NekDouble> &inarray,
92 bool doCheckCollDir0, bool doCheckCollDir1,
93 bool doCheckCollDir2) override;
95 const Array<OneD, const NekDouble> &inarray,
96 Array<OneD, NekDouble> &outarray) override;
97
98 //---------------------------------------
99 // Inner product functions
100 //---------------------------------------
102 const Array<OneD, const NekDouble> &inarray,
103 Array<OneD, NekDouble> &outarray) override;
105 const Array<OneD, const NekDouble> &inarray,
106 Array<OneD, NekDouble> &outarray,
107 bool multiplybyweights = true) override;
109 const Array<OneD, const NekDouble> &base0,
110 const Array<OneD, const NekDouble> &base1,
111 const Array<OneD, const NekDouble> &base2,
112 const Array<OneD, const NekDouble> &inarray,
114 bool doCheckCollDir0, bool doCheckCollDir1,
115 bool doCheckCollDir2) override;
117 const int dir, const Array<OneD, const NekDouble> &inarray,
118 Array<OneD, NekDouble> &outarray) override;
120 const int dir, const Array<OneD, const NekDouble> &inarray,
121 Array<OneD, NekDouble> &outarray) override;
122
123 //---------------------------------------
124 // Evaluation functions
125 //---------------------------------------
128 Array<OneD, NekDouble> &eta) override;
131 Array<OneD, NekDouble> &xi) override;
134 Array<OneD, NekDouble> &coords_z) override;
136 const int mode, Array<OneD, NekDouble> &outarray) override;
138 const Array<OneD, const NekDouble> &coords, int mode) final;
141 const Array<OneD, const NekDouble> &inarray,
142 std::array<NekDouble, 3> &firstOrderDerivs) override;
144 const int fid, int &numModes0, int &numModes1,
145 Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
146
147 //---------------------------
148 // Helper functions
149 //---------------------------
150 STD_REGIONS_EXPORT int v_GetNverts() const override;
151 STD_REGIONS_EXPORT int v_GetNedges() const override;
152 STD_REGIONS_EXPORT int v_GetNtraces() const override;
154 STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override;
155 STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override;
156 STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const override;
157 STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const override;
158 STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const override;
159 STD_REGIONS_EXPORT int v_GetEdgeNcoeffs(const int i) const override;
161 const int i, const int j) const override;
163 const std::vector<unsigned int> &nummodes, int &modes_offset) override;
165 const int i, const int k, bool UseGLL = false) const override;
167
168 //--------------------------
169 // Mappings
170 //--------------------------
172 int localVertexId, bool useCoeffPacking = false) override;
174 Array<OneD, unsigned int> &outarray) override;
176 Array<OneD, unsigned int> &outarray) override;
178 const unsigned int fid, Array<OneD, unsigned int> &maparray) override;
180 const unsigned int tid, Array<OneD, unsigned int> &maparray,
181 Array<OneD, int> &signarray, Orientation traceOrient = eForwards,
182 int P = -1, int Q = -1) override;
184 const int tid, Array<OneD, unsigned int> &maparray,
185 Array<OneD, int> &signarray,
186 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
188 const int tid, Array<OneD, unsigned int> &maparray,
189 Array<OneD, int> &signarray,
190 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
191
192 //---------------------------------------
193 // Wrapper functions
194 //---------------------------------------
196 v_GenMatrix(const StdMatrixKey &mkey) override;
198 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
200 const Array<OneD, const NekDouble> &inarray,
201 Array<OneD, NekDouble> &outarray) override;
203 Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override;
204
205 //---------------------------------------
206 // Method for applying sensors
207 //---------------------------------------
209 int numMin, const Array<OneD, const NekDouble> &inarray,
210 Array<OneD, NekDouble> &outarray) override;
211
212 //---------------------------------------
213 // Output interpolation functions
215 Array<OneD, int> &conn, bool standard = true) override;
216
217private:
218 //---------------------------------------
219 // Private helper functions
220 //---------------------------------------
221 STD_REGIONS_EXPORT int GetMode(const int i, const int j, const int k);
222};
223
224typedef std::shared_ptr<StdTetExp> StdTetExpSharedPtr;
225} // namespace Nektar::StdRegions
226
227#endif // STDTETEXP_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
int v_GetNtraces() const override
int v_GetTraceNcoeffs(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_GetTraceNumModes(const int fid, int &numModes0, int &numModes1, Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2) override
int v_GetTraceIntNcoeffs(const int i) const override
void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray) override
void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_GetInteriorMap(Array< OneD, unsigned int > &outarray) override
int v_GetNedges() const override
int GetMode(const int i, const int j, const int k)
Compute the mode number in the expansion for a particular tensorial combination.
int v_GetEdgeNcoeffs(const int i) const override
bool v_IsBoundaryInteriorExpansion() const 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
StdTetExp(const StdTetExp &T)=default
void v_GetEdgeInteriorToElementMap(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
int v_GetTraceNumPoints(const int i) const override
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) 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_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) override
void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray) override
void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true) override
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
int v_NumBndryCoeffs() const override
void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
StdTetExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, NekDouble *coeffs, NekDouble *phys)
void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) 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_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z) 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
void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_GetElmtTraceToTraceMap(const unsigned int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient=eForwards, int P=-1, int Q=-1) override
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
int v_GetNverts() const override
void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_dx, Array< OneD, NekDouble > &out_dy, Array< OneD, NekDouble > &out_dz) override
Calculate the derivative of the physical points.
Definition StdTetExp.cpp:83
const LibUtilities::BasisKey v_GetTraceBasisKey(const int i, const int k, bool UseGLL=false) const override
LibUtilities::ShapeType v_DetShapeType() const override
void v_LocCollapsedToLocCoord(const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi) override
LibUtilities::ShapeType DetShapeType() const
Definition StdTetExp.h:56
int v_NumDGBndryCoeffs() const override
~StdTetExp() override=default
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_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset) override
DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
@ P
Monomial polynomials .
Definition BasisType.h:62
std::shared_ptr< StdTetExp > StdTetExpSharedPtr
Definition StdTetExp.h:224
std::shared_ptr< DNekMat > DNekMatSharedPtr