Nektar++
Loading...
Searching...
No Matches
StdSegExp.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: StdSegExp.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 Standard Segment Expansions
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_LIBS_STDREGIONS_STDSEGEXP_H
36#define NEKTAR_LIBS_STDREGIONS_STDSEGEXP_H
37
39
40namespace Nektar::StdRegions
41{
42/// Class representing a segment element in reference space
43/// All interface of this class sits in StdExpansion class
44class StdSegExp : virtual public StdExpansion1D
45{
46public:
49 STD_REGIONS_EXPORT ~StdSegExp() override = default;
50
51protected:
52 //-----------------------------
53 // Differentiation Methods
54 //-----------------------------
56 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 //----------------------------
76 const Array<OneD, const NekDouble> &inarray,
77 Array<OneD, NekDouble> &outarray,
78 const Array<OneD, const NekDouble> &jac, const bool Deformed) override;
80 const int dir, const Array<OneD, const NekDouble> &inarray,
81 Array<OneD, NekDouble> &outarray) override;
82
83 //----------------------------
84 // Evaluations Methods
85 //---------------------------
88 Array<OneD, NekDouble> &eta) override;
91 Array<OneD, NekDouble> &xi) override;
93 const Array<OneD, const NekDouble> &coords, int mode) final;
96 const Array<OneD, const NekDouble> &inarray,
97 std::array<NekDouble, 3> &firstOrderDerivs) override;
99 const Array<OneD, NekDouble> &coord,
100 const Array<OneD, const NekDouble> &inarray,
101 std::array<NekDouble, 3> &firstOrderDerivs,
102 std::array<NekDouble, 6> &secondOrderDerivs) override;
104 const Array<OneD, const NekDouble> &inarray,
105 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
107 const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
108 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
110 const Array<OneD, const NekDouble> &inarray,
111 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
113 Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override;
115 Array<OneD, NekDouble> &array, const NekDouble alpha,
116 const NekDouble exponent, const NekDouble cutoff) override;
118 const int mode, Array<OneD, NekDouble> &outarray) override;
121 Array<OneD, NekDouble> &coords_2) override;
122
123 //----------------------------
124 // Public Mappings
125 //---------------------------
127 Array<OneD, unsigned int> &outarray) override;
129 Array<OneD, unsigned int> &outarray) override;
131 int localVertexId, bool useCoeffPacking = false) override;
132
133 //----------------------------
134 // Helper functions
135 //---------------------------
136 STD_REGIONS_EXPORT int v_GetNverts() const final;
137 STD_REGIONS_EXPORT int v_GetNtraces() const final;
138 STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const final;
139 STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const final;
140 STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const final;
141 STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override;
142 STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override;
145 const std::vector<unsigned int> &nummodes, int &modes_offset) override;
146 STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const override;
147
148 //----------------------------
149 // Wrapper functions
150 //---------------------------
152 v_GenMatrix(const StdMatrixKey &mkey) override;
154 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
155
156 //---------------------------------------
157 // Output interpolation functions
158 //---------------------------------------
160 Array<OneD, int> &conn, bool standard = true) override;
161
162 //---------------------------------------
163 // Operator evaluation functions
164 //---------------------------------------
166 int numMin, const Array<OneD, const NekDouble> &inarray,
167 Array<OneD, NekDouble> &outarray) override;
169 const unsigned int traceid,
170 Array<OneD, unsigned int> &maparray) override;
172 const unsigned int eid, Array<OneD, unsigned int> &maparray,
173 Array<OneD, int> &signarray, Orientation edgeOrient, int P,
174 int Q) override;
176 const int tid, Array<OneD, unsigned int> &maparray,
177 Array<OneD, int> &signarray, Orientation edgeOrient, int P,
178 int Q) override;
179
180private:
181};
182typedef std::shared_ptr<StdSegExp> StdSegExpSharedPtr;
183
184} // namespace Nektar::StdRegions
185
186#endif // STDSEGEXP_H
#define STD_REGIONS_EXPORT
Describes the specification for a Basis.
Definition Basis.h:45
Class representing a segment element in reference space All interface of this class sits in StdExpans...
Definition StdSegExp.h:45
int v_NumDGBndryCoeffs() const override
NekDouble v_PhysEvalFirstDeriv(const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
void v_GetInteriorMap(Array< OneD, unsigned int > &outarray) override
NekDouble v_PhysEvaluateBasis(const Array< OneD, const NekDouble > &coords, int mode) final
LibUtilities::ShapeType v_DetShapeType() const override
Return Shape of region, using ShapeType enum list. i.e. Segment.
Definition StdSegExp.cpp:68
NekDouble v_PhysEvalFirstSecondDeriv(const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs, std::array< NekDouble, 6 > &secondOrderDerivs) override
int v_NumBndryCoeffs() const override
void v_HelmholtzMatrixOp(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_LocCollapsedToLocCoord(const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi) 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.
int v_GetNverts() const final
int v_GetTraceNumPoints(const int i) const final
void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray) override
int v_GetTraceNcoeffs(const int i) const final
void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true) override
void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2) override
int v_GetTraceIntNcoeffs(const int i) const final
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
~StdSegExp() override=default
void v_ExponentialFilter(Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff) override
DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) override
StdSegExp(const StdSegExp &T)=default
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Backward transform from coefficient space given in inarray and evaluate at the physical quadrature po...
int v_GetNtraces() const final
void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray) override
void v_GetTraceToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient, int P, int Q) override
void v_GetElmtTraceToTraceMap(const unsigned int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient, int P, int Q) override
void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
Evaluate the derivative at the physical quadrature points given by inarray and return in outarray.
void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
bool v_IsBoundaryInteriorExpansion() const override
Definition StdSegExp.cpp:73
int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset) override
DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
void v_FwdTransBndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_IProductWRTBaseKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, const NekDouble > &jac, const bool Deformed) override
Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return...
std::shared_ptr< StdSegExp > StdSegExpSharedPtr
Definition StdSegExp.h:182
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
STL namespace.