Nektar++
Loading...
Searching...
No Matches
StdTriExp.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: StdTriExp.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 triangle routines built upon StdExpansion2D
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_LIB_STDREGIONS_STDTRIEXP_H
36#define NEKTAR_LIB_STDREGIONS_STDTRIEXP_H
37
39#include <StdRegions/StdSegExp.h> // for StdSegExp, etc
40
41namespace Nektar::StdRegions
42{
43class StdTriExp : virtual public StdExpansion2D
44{
45public:
47 const LibUtilities::BasisKey &Bb);
50 STD_REGIONS_EXPORT ~StdTriExp() override = default;
51
52protected:
53 //----------------------------
54 // Differentiation Methods
55 //----------------------------
57 const Array<OneD, const NekDouble> &inarray,
60
61 //---------------------------------------
62 // Transforms
63 //---------------------------------------
65 const Array<OneD, const NekDouble> &inarray,
66 Array<OneD, NekDouble> &outarray) override;
68 const Array<OneD, const NekDouble> &inarray,
69 Array<OneD, NekDouble> &outarray) override;
70
71 //---------------------------------------
72 // Inner product functions
73 //---------------------------------------
77 const Array<OneD, const NekDouble> &inarray,
79 const bool Deformed, [[maybe_unused]] const bool CollDir0 = false,
80 [[maybe_unused]] const bool CollDir1 = false) override;
82 const int dir, const Array<OneD, const NekDouble> &inarray,
83 Array<OneD, NekDouble> &outarray) override;
84 //---------------------------------------
85 // Evaluation functions
86 //---------------------------------------
89 Array<OneD, NekDouble> &eta) override;
92 Array<OneD, NekDouble> &xi) override;
94 const int mode, Array<OneD, NekDouble> &outarray) override;
96 const Array<OneD, const NekDouble> &coords, int mode) final;
99 const Array<OneD, const NekDouble> &inarray,
100 std::array<NekDouble, 3> &firstOrderDerivs) override;
101
102 //---------------------------
103 // Helper functions
104 //---------------------------
105 STD_REGIONS_EXPORT int v_GetNverts() const final;
106 STD_REGIONS_EXPORT int v_GetNtraces() const final;
107 STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const override;
108 STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override;
109 STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override;
110 STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const override;
111 STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const override;
112 STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const override;
114 const std::vector<unsigned int> &nummodes, int &modes_offset) override;
116 Array<OneD, NekDouble> &coords_x, Array<OneD, NekDouble> &coords_y,
117 Array<OneD, NekDouble> &coords_z) override;
120 const int i, const int j, bool UseGLL = false) const override;
121
122 //--------------------------
123 // Mappings
124 //--------------------------
126 int localVertexId, bool useCoeffPacking = false) override;
128 Array<OneD, unsigned int> &outarray) override;
130 Array<OneD, unsigned int> &outarray) override;
132 const unsigned int traceid,
133 Array<OneD, unsigned int> &maparray) override;
135 const int eid, Array<OneD, unsigned int> &maparray,
136 Array<OneD, int> &signarray,
137 const Orientation edgeOrient = eForwards) override;
138
139 //---------------------------------------
140 // Wrapper functions
141 //---------------------------------------
143 v_GenMatrix(const StdMatrixKey &mkey) override;
145 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
146
147 //---------------------------------------
148 // Operator evaluation functions
149 //---------------------------------------
151 const Array<OneD, const NekDouble> &inarray,
152 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
154 const Array<OneD, const NekDouble> &inarray,
155 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
157 Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override;
159 int numMin, const Array<OneD, const NekDouble> &inarray,
160 Array<OneD, NekDouble> &outarray) override;
162 const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
163 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
165 const int i, const Array<OneD, const NekDouble> &inarray,
166 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
168 const Array<OneD, const NekDouble> &inarray,
169 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
170
171 //---------------------------------------
172 // Output interpolation functions
173 //---------------------------------------
175 Array<OneD, int> &conn, bool standard = true) override;
176};
177typedef std::shared_ptr<StdTriExp> StdTriExpSharedPtr;
178} // namespace Nektar::StdRegions
179#endif // STDTRIEXP_H
#define STD_REGIONS_EXPORT
Describes the specification for a Basis.
Definition Basis.h:45
void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
int v_GetTraceNumPoints(const int i) const override
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Backward tranform for triangular elements.
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_LocCollapsedToLocCoord(const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi) override
void v_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z) override
int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset) override
const LibUtilities::BasisKey v_GetTraceBasisKey(const int i, const int j, bool UseGLL=false) const override
void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true) override
void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray) override
int v_GetNtraces() const final
void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
Calculate the derivative of the physical points.
Definition StdTriExp.cpp:89
void v_GetTraceInteriorToElementMap(const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation edgeOrient=eForwards) override
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) override
DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
~StdTriExp() override=default
int v_GetTraceNcoeffs(const int i) const override
void v_GetTraceCoeffMap(const unsigned int traceid, Array< OneD, unsigned int > &maparray) override
bool v_IsBoundaryInteriorExpansion() const override
void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray) override
void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_FwdTransBndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
StdTriExp(const StdTriExp &T)=default
LibUtilities::ShapeType v_DetShapeType() const override
int v_GetTraceIntNcoeffs(const int i) const override
int v_NumDGBndryCoeffs() const override
void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
NekDouble v_PhysEvaluateBasis(const Array< OneD, const NekDouble > &coords, int mode) final
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
NekDouble v_PhysEvalFirstDeriv(const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
void v_GetInteriorMap(Array< OneD, unsigned int > &outarray) override
int v_GetNverts() const final
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
void v_IProductWRTBaseKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &jac, const bool Deformed, const bool CollDir0=false, const bool CollDir1=false) override
Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return...
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
int v_NumBndryCoeffs() const override
std::shared_ptr< StdTriExp > StdTriExpSharedPtr
Definition StdTriExp.h:177
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
STL namespace.