Nektar++
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 
40 
41 namespace Nektar
42 {
43  namespace StdRegions
44  {
45 
46  class StdSegExp;
47  typedef std::shared_ptr<StdSegExp> StdSegExpSharedPtr;
48 
49  /// Class representing a segment element in reference space
50 
51  /// All interface of this class sits in StdExpansion class
52 
53  class StdSegExp: virtual public StdExpansion1D
54  {
55  public:
56 
58 
60 
61  STD_REGIONS_EXPORT StdSegExp(const StdSegExp &T);
62 
64 
65 
66  protected:
67 
68 
69  //----------------------------
70  // Integration Methods
71  //----------------------------
72 
74  const Array<OneD, const NekDouble>& inarray);
75 
76  //-----------------------------
77  // Differentiation Methods
78  //-----------------------------
79 
80  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
81  const Array<OneD, const NekDouble>& inarray,
82  Array<OneD, NekDouble> &out_d0,
85 
86  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
87  const int dir,
88  const Array<OneD, const NekDouble>& inarray,
89  Array<OneD, NekDouble> &outarray);
90 
92  const Array<OneD, const NekDouble>& inarray,
93  Array<OneD, NekDouble> &out_d0,
96 
97  STD_REGIONS_EXPORT virtual void v_StdPhysDeriv (
98  const int dir,
99  const Array<OneD, const NekDouble>& inarray,
100  Array<OneD, NekDouble> &outarray);
101 
102  //-----------------------------
103  // Transforms
104  //-----------------------------
105 
106  STD_REGIONS_EXPORT virtual void v_BwdTrans(
107  const Array<OneD, const NekDouble>& inarray,
108  Array<OneD, NekDouble> &outarray);
109 
110  STD_REGIONS_EXPORT virtual void v_FwdTrans(
111  const Array<OneD, const NekDouble>& inarray,
112  Array<OneD, NekDouble> &outarray);
113 
115  const Array<OneD, const NekDouble>& inarray,
116  Array<OneD, NekDouble> &outarray);
117 
119  const Array<OneD, const NekDouble>& inarray,
120  Array<OneD, NekDouble> &outarray);
121 
122  //----------------------------
123  // Inner product functions
124  //----------------------------
125 
127  const Array<OneD, const NekDouble>& inarray,
128  Array<OneD, NekDouble> &outarray);
129 
131  const Array<OneD, const NekDouble>& base,
132  const Array<OneD, const NekDouble>& inarray,
133  Array<OneD, NekDouble> &outarray,
134  int coll_check);
135 
137  const Array<OneD, const NekDouble>& inarray,
138  Array<OneD, NekDouble> &outarray,
139  bool multiplybyweights = true);
140 
142  const int dir,
143  const Array<OneD, const NekDouble> &inarray,
144  Array<OneD, NekDouble> &outarray);
145 
146 
147 
148  //----------------------------
149  // Evaluations Methods
150  //---------------------------
151 
153  const Array<OneD, const NekDouble>& Lcoords,
154  const Array<OneD, const NekDouble>& physvals);
155 
157  const Array<OneD, const NekDouble> &inarray,
158  Array<OneD,NekDouble> &outarray,
159  const StdMatrixKey &mkey);
160 
162  const Array<OneD, const NekDouble> &inarray,
163  Array<OneD,NekDouble> &outarray,
164  const StdMatrixKey &mkey);
165 
167  Array<OneD, NekDouble> &array,
168  const StdMatrixKey &mkey);
169 
171  Array<OneD, NekDouble> &array,
172  const NekDouble alpha,
173  const NekDouble exponent,
174  const NekDouble cutoff);
175 
177  const Array<OneD, const NekDouble> &inarray,
178  Array<OneD, NekDouble> &outarray);
179 
180  STD_REGIONS_EXPORT virtual void v_FillMode(
181  const int mode,
182  Array<OneD, NekDouble> &outarray);
183 
184  STD_REGIONS_EXPORT virtual void v_GetCoords(
185  Array<OneD, NekDouble> &coords_0,
186  Array<OneD, NekDouble> &coords_1,
187  Array<OneD, NekDouble> &coords_2);
188 
189 
190  //----------------------------
191  // Public Mappings
192  //---------------------------
193 
195  Array<OneD, unsigned int>& outarray);
196 
198  Array<OneD, unsigned int>& outarray);
199 
200  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
201  bool useCoeffPacking = false);
202 
203  //----------------------------
204  // Helper functions
205  //---------------------------
206 
207  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
208  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
209  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
212  const std::vector<unsigned int> &nummodes,
213  int &modes_offset);
215  v_DetShapeType() const;
216 
217  //----------------------------
218  // Wrapper functions
219  //---------------------------
220 
222  const StdMatrixKey &mkey);
223 
225  const StdMatrixKey &mkey);
226 
227  //---------------------------------------
228  // Output interpolation functions
229  //---------------------------------------
231  Array<OneD, int> &conn,
232  bool standard = true);
233 
234  // Operator evaluation functions
235  //---------------------------------------
236 
238  int numMin,
239  const Array<OneD, const NekDouble> &inarray,
240  Array<OneD, NekDouble> &outarray);
241 
242  private:
243 
244  };
245 
246 
247  } //end of namespace
248 } //end of namespace
249 
250 #endif //STDSEGEXP_H
251 
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrate the physical point list inarray over region and return the value.
Definition: StdSegExp.cpp:123
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdSegExp.cpp:474
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Definition: StdSegExp.cpp:794
virtual void v_ExponentialFilter(Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff)
Definition: StdSegExp.cpp:618
virtual 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)
Definition: StdSegExp.cpp:176
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2)
Definition: StdSegExp.cpp:671
static Array< OneD, NekDouble > NullNekDouble1DArray
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Backward transform from coefficient space given in inarray and evaluate at the physical quadrature po...
Definition: StdSegExp.cpp:223
virtual int v_GetNverts() const
Definition: StdSegExp.cpp:689
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdSegExp.cpp:393
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
Definition: StdSegExp.cpp:297
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
Definition: StdSegExp.cpp:516
StdSegExp()
Default constructor.
Definition: StdSegExp.cpp:50
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
virtual bool v_IsBoundaryInteriorExpansion()
Definition: StdSegExp.cpp:90
virtual LibUtilities::ShapeType v_DetShapeType() const
Return Shape of region, using ShapeType enum list. i.e. Segment.
Definition: StdSegExp.cpp:85
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
Definition: StdSegExp.cpp:856
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
Definition: StdSegExp.cpp:704
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
Definition: StdSegExp.cpp:577
virtual int v_NumDGBndryCoeffs() const
Definition: StdSegExp.cpp:699
virtual int v_NumBndryCoeffs() const
Definition: StdSegExp.cpp:694
Class representing a segment element in reference space.
Definition: StdSegExp.h:53
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
Definition: StdSegExp.cpp:718
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
Definition: StdSegExp.cpp:784
double NekDouble
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return...
Definition: StdSegExp.cpp:468
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &Lcoords, const Array< OneD, const NekDouble > &physvals)
Definition: StdSegExp.cpp:528
#define STD_REGIONS_EXPORT
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdSegExp.cpp:555
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdSegExp.cpp:319
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdSegExp.cpp:659
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdSegExp.cpp:243
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
Definition: StdSegExp.cpp:872
std::shared_ptr< StdSegExp > StdSegExpSharedPtr
Definition: StdSegExp.h:46
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdSegExp.cpp:535
Describes the specification for a Basis.
Definition: Basis.h:49
virtual 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)
Evaluate the derivative at the physical quadrature points given by inarray and return in outarray...
Definition: StdSegExp.cpp:156
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Definition: StdSegExp.cpp:484
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
Definition: StdSegExp.cpp:823