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 // Integration Methods
54 //----------------------------
56 v_Integral(const Array<OneD, const NekDouble> &inarray) override;
57
58 //-----------------------------
59 // Differentiation Methods
60 //-----------------------------
62 const Array<OneD, const NekDouble> &inarray,
67 const int dir, const Array<OneD, const NekDouble> &inarray,
68 Array<OneD, NekDouble> &outarray) override;
70 const Array<OneD, const NekDouble> &inarray,
74
75 //-----------------------------
76 // Transforms
77 //-----------------------------
79 const Array<OneD, const NekDouble> &inarray,
80 Array<OneD, NekDouble> &outarray) override;
82 const Array<OneD, const NekDouble> &inarray,
83 Array<OneD, NekDouble> &outarray) override;
85 const Array<OneD, const NekDouble> &inarray,
86 Array<OneD, NekDouble> &outarray) override;
88 const Array<OneD, const NekDouble> &inarray,
89 Array<OneD, NekDouble> &outarray) override;
90
91 //----------------------------
92 // Inner product functions
93 //----------------------------
95 const Array<OneD, const NekDouble> &inarray,
96 Array<OneD, NekDouble> &outarray) override;
99 const Array<OneD, const NekDouble> &inarray,
100 Array<OneD, NekDouble> &outarray, int coll_check) override;
102 const Array<OneD, const NekDouble> &inarray,
103 Array<OneD, NekDouble> &outarray,
104 bool multiplybyweights = true) override;
106 const int dir, const Array<OneD, const NekDouble> &inarray,
107 Array<OneD, NekDouble> &outarray) override;
109 const int dir, const Array<OneD, const NekDouble> &inarray,
110 Array<OneD, NekDouble> &outarray) override;
111
112 //----------------------------
113 // Evaluations Methods
114 //---------------------------
117 Array<OneD, NekDouble> &eta) override;
120 Array<OneD, NekDouble> &xi) override;
122 const Array<OneD, const NekDouble> &coords, int mode) final;
125 const Array<OneD, const NekDouble> &inarray,
126 std::array<NekDouble, 3> &firstOrderDerivs) override;
128 const Array<OneD, NekDouble> &coord,
129 const Array<OneD, const NekDouble> &inarray,
130 std::array<NekDouble, 3> &firstOrderDerivs,
131 std::array<NekDouble, 6> &secondOrderDerivs) override;
133 const Array<OneD, const NekDouble> &inarray,
134 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
136 const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
137 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
139 const Array<OneD, const NekDouble> &inarray,
140 Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override;
142 Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override;
144 Array<OneD, NekDouble> &array, const NekDouble alpha,
145 const NekDouble exponent, const NekDouble cutoff) override;
147 const Array<OneD, const NekDouble> &inarray,
148 Array<OneD, NekDouble> &outarray) override;
150 const int mode, Array<OneD, NekDouble> &outarray) override;
153 Array<OneD, NekDouble> &coords_2) override;
154
155 //----------------------------
156 // Public Mappings
157 //---------------------------
159 Array<OneD, unsigned int> &outarray) override;
161 Array<OneD, unsigned int> &outarray) override;
163 int localVertexId, bool useCoeffPacking = false) override;
164
165 //----------------------------
166 // Helper functions
167 //---------------------------
168 STD_REGIONS_EXPORT int v_GetNverts() const final;
169 STD_REGIONS_EXPORT int v_GetNtraces() const final;
170 STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const final;
171 STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const final;
172 STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const final;
173 STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override;
174 STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override;
177 const std::vector<unsigned int> &nummodes, int &modes_offset) override;
178 STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const override;
179
180 //----------------------------
181 // Wrapper functions
182 //---------------------------
184 v_GenMatrix(const StdMatrixKey &mkey) override;
186 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
187
188 //---------------------------------------
189 // Output interpolation functions
190 //---------------------------------------
192 Array<OneD, int> &conn, bool standard = true) override;
193
194 //---------------------------------------
195 // Operator evaluation functions
196 //---------------------------------------
198 int numMin, const Array<OneD, const NekDouble> &inarray,
199 Array<OneD, NekDouble> &outarray) override;
201 const unsigned int traceid,
202 Array<OneD, unsigned int> &maparray) override;
204 const unsigned int eid, Array<OneD, unsigned int> &maparray,
205 Array<OneD, int> &signarray, Orientation edgeOrient, int P,
206 int Q) override;
208 const int tid, Array<OneD, unsigned int> &maparray,
209 Array<OneD, int> &signarray, Orientation edgeOrient, int P,
210 int Q) override;
211
212private:
213};
214typedef std::shared_ptr<StdSegExp> StdSegExpSharedPtr;
215
216} // namespace Nektar::StdRegions
217
218#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
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return...
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_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) 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:57
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_BwdTrans_SumFac(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
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
void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
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_PhysDeriv(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_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
NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray) override
Integrate the physical point list inarray over region and return the value.
Definition StdSegExp.cpp:92
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_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
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
void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
bool v_IsBoundaryInteriorExpansion() const override
Definition StdSegExp.cpp:62
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
@ P
Monomial polynomials .
Definition BasisType.h:62
std::shared_ptr< StdSegExp > StdSegExpSharedPtr
Definition StdSegExp.h:214
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
STL namespace.