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);
55 STD_REGIONS_EXPORT ~StdTetExp() override = default;
56
57protected:
58 //----------------------------
59 // Differentiation Methods
60 //----------------------------
62 const Array<OneD, const NekDouble> &inarray,
64 Array<OneD, NekDouble> &out_dz) override;
65
66 //---------------------------------------
67 // Transforms
68 //---------------------------------------
70 const Array<OneD, const NekDouble> &inarray,
71 Array<OneD, NekDouble> &outarray) override;
72
73 //---------------------------------------
74 // Inner product functions
75 //---------------------------------------
80 const Array<OneD, const NekDouble> &inarray,
82 const bool Deformed, [[maybe_unused]] bool CollDir0 = false,
83 [[maybe_unused]] bool CollDir1 = false,
84 [[maybe_unused]] bool CollDir2 = false) override;
86 const int dir, const Array<OneD, const NekDouble> &inarray,
87 Array<OneD, NekDouble> &outarray) override;
88
89 //---------------------------------------
90 // Evaluation functions
91 //---------------------------------------
94 Array<OneD, NekDouble> &eta) override;
97 Array<OneD, NekDouble> &xi) override;
100 Array<OneD, NekDouble> &coords_z) override;
102 const int mode, Array<OneD, NekDouble> &outarray) override;
104 const Array<OneD, const NekDouble> &coords, int mode) final;
107 const Array<OneD, const NekDouble> &inarray,
108 std::array<NekDouble, 3> &firstOrderDerivs) override;
110 const int fid, int &numModes0, int &numModes1,
111 Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
112
113 //---------------------------
114 // Helper functions
115 //---------------------------
116 STD_REGIONS_EXPORT int v_GetNverts() const override;
117 STD_REGIONS_EXPORT int v_GetNedges() const override;
118 STD_REGIONS_EXPORT int v_GetNtraces() const override;
120 STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override;
121 STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override;
122 STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const override;
123 STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const override;
124 STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const override;
125 STD_REGIONS_EXPORT int v_GetEdgeNcoeffs(const int i) const override;
127 const int i, const int j) const override;
129 const std::vector<unsigned int> &nummodes, int &modes_offset) override;
131 const int i, const int k, bool UseGLL = false) const override;
133
134 //--------------------------
135 // Mappings
136 //--------------------------
138 int localVertexId, bool useCoeffPacking = false) override;
140 Array<OneD, unsigned int> &outarray) override;
142 Array<OneD, unsigned int> &outarray) override;
144 const unsigned int fid, Array<OneD, unsigned int> &maparray) override;
146 const unsigned int tid, Array<OneD, unsigned int> &maparray,
147 Array<OneD, int> &signarray, Orientation traceOrient = eForwards,
148 int P = -1, int Q = -1) override;
150 const int tid, Array<OneD, unsigned int> &maparray,
151 Array<OneD, int> &signarray,
152 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
154 const int tid, Array<OneD, unsigned int> &maparray,
155 Array<OneD, int> &signarray,
156 const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override;
157
158 //---------------------------------------
159 // Wrapper functions
160 //---------------------------------------
162 v_GenMatrix(const StdMatrixKey &mkey) override;
164 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
166 Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override;
167
168 //---------------------------------------
169 // Method for applying sensors
170 //---------------------------------------
172 int numMin, const Array<OneD, const NekDouble> &inarray,
173 Array<OneD, NekDouble> &outarray) override;
174
175 //---------------------------------------
176 // Output interpolation functions
178 Array<OneD, int> &conn, bool standard = true) override;
179
180private:
181 //---------------------------------------
182 // Private helper functions
183 //---------------------------------------
184 STD_REGIONS_EXPORT int GetMode(const int i, const int j, const int k);
185};
186
187typedef std::shared_ptr<StdTetExp> StdTetExpSharedPtr;
188} // namespace Nektar::StdRegions
189
190#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_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
int v_GetTraceNumPoints(const int i) const 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
int v_NumBndryCoeffs() const 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_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_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_StdPhysDeriv(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.
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
int v_NumDGBndryCoeffs() const override
~StdTetExp() override=default
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...
int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset) override
DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
std::shared_ptr< StdTetExp > StdTetExpSharedPtr
Definition StdTetExp.h:187
std::shared_ptr< DNekMat > DNekMatSharedPtr