Nektar++
Loading...
Searching...
No Matches
StdQuadExp.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: StdQuadExp.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 Quadrilateral routines built upon
32// StdExpansion2D
33//
34///////////////////////////////////////////////////////////////////////////////
35
36#ifndef NEKTAR_LIB_STDREGIONS_STDQUADEXP_H
37#define NEKTAR_LIB_STDREGIONS_STDQUADEXP_H
38
41
42namespace Nektar::StdRegions
43{
44class StdQuadExp : virtual public StdExpansion2D
45{
46public:
48 const LibUtilities::BasisKey &Bb);
50 STD_REGIONS_EXPORT ~StdQuadExp() 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 //---------------------------------------
86 // Evaluation functions
87 //---------------------------------------
90 Array<OneD, NekDouble> &eta) override;
93 Array<OneD, NekDouble> &xi) override;
94 STD_REGIONS_EXPORT void v_FillMode(const int mode,
95 Array<OneD, NekDouble> &array) override;
96
97 //---------------------------
98 // Helper functions
99 //---------------------------
100 STD_REGIONS_EXPORT int v_GetNverts() const final;
101 STD_REGIONS_EXPORT int v_GetNtraces() const final;
102 STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const final;
103 STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const final;
104 STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const final;
105 STD_REGIONS_EXPORT int v_NumBndryCoeffs() const final;
106 STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const final;
108 const std::vector<unsigned int> &nummodes, int &modes_offset) override;
110 const int i, const int j, bool UseGLL = false) const final;
111 STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const final;
114 Array<OneD, NekDouble> &coords_0, Array<OneD, NekDouble> &coords_1,
115 Array<OneD, NekDouble> &coords_2) override;
117 const Array<OneD, const NekDouble> &coords, int mode) override;
120 const Array<OneD, const NekDouble> &inarray,
121 std::array<NekDouble, 3> &firstOrderDerivs) override;
122
123 //--------------------------
124 // Mappings
125 //--------------------------
127 Array<OneD, unsigned int> &outarray) override;
129 Array<OneD, unsigned int> &outarray) override;
131 int localVertexId, bool useCoeffPacking = false) override;
133 const unsigned int traceid,
134 Array<OneD, unsigned int> &maparray) override;
136 const int eid, Array<OneD, unsigned int> &maparray,
137 Array<OneD, int> &signarray,
138 const Orientation edgeOrient = eForwards) override;
139
140 //---------------------------------------
141 // Wrapper functions
142 //---------------------------------------
144 v_GenMatrix(const StdMatrixKey &mkey) override;
146 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
147
148 //---------------------------------------
149 // Operator evaluation functions
150 //---------------------------------------
152 const Array<OneD, const NekDouble> &inarray,
153 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
155 const Array<OneD, const NekDouble> &inarray,
156 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
158 const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
159 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
161 const int i, const Array<OneD, const NekDouble> &inarray,
162 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
164 const Array<OneD, const NekDouble> &inarray,
165 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
167 Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override;
169 Array<OneD, NekDouble> &array, const NekDouble alpha,
170 const NekDouble exponent, const NekDouble cutoff) override;
172 int numMin, const Array<OneD, const NekDouble> &inarray,
173 Array<OneD, NekDouble> &outarray) override;
174
175 //---------------------------------------
176 // Output interpolation functions
177 //---------------------------------------
179 Array<OneD, int> &conn, bool standard = true) override;
180};
181typedef std::shared_ptr<StdQuadExp> StdQuadExpSharedPtr;
182
183} // namespace Nektar::StdRegions
184
185#endif // STDQUADEXP_H
#define STD_REGIONS_EXPORT
Describes the specification for a Basis.
Definition Basis.h:45
void v_ExponentialFilter(Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff) override
int v_NumDGBndryCoeffs() const final
void v_FwdTransBndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
bool v_IsBoundaryInteriorExpansion() const override
int v_GetTraceNcoeffs(const int i) const final
void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
int v_GetTraceNumPoints(const int i) const final
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
int v_NumBndryCoeffs() const final
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2) override
NekDouble v_PhysEvaluateBasis(const Array< OneD, const NekDouble > &coords, int mode) override
This function evaluates the basis function mode mode at a point coords of the domain.
int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset) override
StdQuadExp(const StdQuadExp &T)=default
void v_GetInteriorMap(Array< OneD, unsigned int > &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=NullNekDouble1DArray) override
Calculate the derivative of the physical points.
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
void v_LocCollapsedToLocCoord(const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi) 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 traceid, Array< OneD, unsigned int > &maparray) override
Get the map of the coefficient location to teh local trace coefficients.
const LibUtilities::BasisKey v_GetTraceBasisKey(const int i, const int j, bool UseGLL=false) const final
DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) override
~StdQuadExp() override=default
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_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_GetTraceInteriorToElementMap(const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation edgeOrient=eForwards) override
void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray) override
DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
int v_GetTraceIntNcoeffs(const int i) const final
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
LibUtilities::ShapeType v_DetShapeType() const final
void v_FillMode(const int mode, Array< OneD, NekDouble > &array) override
Fill outarray with mode mode of expansion.
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...
std::shared_ptr< StdQuadExp > StdQuadExpSharedPtr
Definition StdQuadExp.h:181
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
STL namespace.