Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Header file for Standard Segment Expansions
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_LIBS_STDREGIONS_STDSEGEXP_H
37 #define NEKTAR_LIBS_STDREGIONS_STDSEGEXP_H
38 
41 
42 namespace Nektar
43 {
44  namespace StdRegions
45  {
46 
47  class StdSegExp;
48  typedef boost::shared_ptr<StdSegExp> StdSegExpSharedPtr;
49 
50  /// Class representing a segment element in reference space
51 
52  /// All interface of this class sits in StdExpansion class
53 
54  class StdSegExp: virtual public StdExpansion1D
55  {
56  public:
57 
59 
61 
62  STD_REGIONS_EXPORT StdSegExp(const StdSegExp &T);
63 
65 
66 
67  protected:
68 
69 
70  //----------------------------
71  // Integration Methods
72  //----------------------------
73 
75  const Array<OneD, const NekDouble>& inarray);
76 
77  //-----------------------------
78  // Differentiation Methods
79  //-----------------------------
80 
81  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
82  const Array<OneD, const NekDouble>& inarray,
83  Array<OneD, NekDouble> &out_d0,
86 
87  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
88  const int dir,
89  const Array<OneD, const NekDouble>& inarray,
90  Array<OneD, NekDouble> &outarray);
91 
93  const Array<OneD, const NekDouble>& inarray,
94  Array<OneD, NekDouble> &out_d0,
97 
98  STD_REGIONS_EXPORT virtual void v_StdPhysDeriv (
99  const int dir,
100  const Array<OneD, const NekDouble>& inarray,
101  Array<OneD, NekDouble> &outarray);
102 
103  //-----------------------------
104  // Transforms
105  //-----------------------------
106 
107  STD_REGIONS_EXPORT virtual void v_BwdTrans(
108  const Array<OneD, const NekDouble>& inarray,
109  Array<OneD, NekDouble> &outarray);
110 
111  STD_REGIONS_EXPORT virtual void v_FwdTrans(
112  const Array<OneD, const NekDouble>& inarray,
113  Array<OneD, NekDouble> &outarray);
114 
116  const Array<OneD, const NekDouble>& inarray,
117  Array<OneD, NekDouble> &outarray);
118 
120  const Array<OneD, const NekDouble>& inarray,
121  Array<OneD, NekDouble> &outarray);
122 
123  //----------------------------
124  // Inner product functions
125  //----------------------------
126 
128  const Array<OneD, const NekDouble>& inarray,
129  Array<OneD, NekDouble> &outarray);
130 
132  const Array<OneD, const NekDouble>& base,
133  const Array<OneD, const NekDouble>& inarray,
134  Array<OneD, NekDouble> &outarray,
135  int coll_check);
136 
138  const Array<OneD, const NekDouble>& inarray,
139  Array<OneD, NekDouble> &outarray,
140  bool multiplybyweights = true);
141 
143  const int dir,
144  const Array<OneD, const NekDouble> &inarray,
145  Array<OneD, NekDouble> &outarray);
146 
147 
148 
149  //----------------------------
150  // Evaluations Methods
151  //---------------------------
152 
154  const Array<OneD, const NekDouble>& Lcoords,
155  const Array<OneD, const NekDouble>& physvals);
156 
158  const Array<OneD, const NekDouble> &inarray,
159  Array<OneD,NekDouble> &outarray,
160  const StdMatrixKey &mkey);
161 
163  const Array<OneD, const NekDouble> &inarray,
164  Array<OneD,NekDouble> &outarray,
165  const StdMatrixKey &mkey);
166 
168  const Array<OneD, const NekDouble> &inarray,
169  Array<OneD, NekDouble> &outarray);
170 
171  STD_REGIONS_EXPORT virtual void v_FillMode(
172  const int mode,
173  Array<OneD, NekDouble> &outarray);
174 
175  STD_REGIONS_EXPORT virtual void v_GetCoords(
176  Array<OneD, NekDouble> &coords_0,
177  Array<OneD, NekDouble> &coords_1,
178  Array<OneD, NekDouble> &coords_2);
179 
180 
181  //----------------------------
182  // Public Mappings
183  //---------------------------
184 
186  Array<OneD, unsigned int>& outarray);
187 
189  Array<OneD, unsigned int>& outarray);
190 
191  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
192  bool useCoeffPacking = false);
193 
194  //----------------------------
195  // Helper functions
196  //---------------------------
197 
198  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
199  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
200  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
203  const std::vector<unsigned int> &nummodes,
204  int &modes_offset);
206  v_DetShapeType() const;
207 
208  //----------------------------
209  // Wrapper functions
210  //---------------------------
211 
213  const StdMatrixKey &mkey);
214 
216  const StdMatrixKey &mkey);
217 
218  //---------------------------------------
219  // Output interpolation functions
220  //---------------------------------------
222  Array<OneD, int> &conn,
223  bool standard = true);
224 
225  // Operator evaluation functions
226  //---------------------------------------
227 
229  int numMin,
230  const Array<OneD, const NekDouble> &inarray,
231  Array<OneD, NekDouble> &outarray);
232 
233  private:
234 
235  };
236 
237 
238  } //end of namespace
239 } //end of namespace
240 
241 #endif //STDSEGEXP_H
242 
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:122
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdSegExp.cpp:477
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Definition: StdSegExp.cpp:712
virtual int v_NumDGBndryCoeffs() const
Definition: StdSegExp.cpp:617
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:173
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2)
Definition: StdSegExp.cpp:590
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:218
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdSegExp.cpp:398
virtual int v_NumBndryCoeffs() const
Definition: StdSegExp.cpp:612
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:302
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
Definition: StdSegExp.cpp:518
StdSegExp()
Default constructor.
Definition: StdSegExp.cpp:49
boost::shared_ptr< StdSegExp > StdSegExpSharedPtr
Definition: StdSegExp.h:47
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
virtual bool v_IsBoundaryInteriorExpansion()
Definition: StdSegExp.cpp:89
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
Definition: StdSegExp.cpp:774
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
Definition: StdSegExp.cpp:622
Class representing a segment element in reference space.
Definition: StdSegExp.h:54
virtual int v_GetNverts() const
Definition: StdSegExp.cpp:607
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
Definition: StdSegExp.cpp:636
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
Definition: StdSegExp.cpp:702
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:471
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &Lcoords, const Array< OneD, const NekDouble > &physvals)
Definition: StdSegExp.cpp:530
#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:324
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdSegExp.cpp:578
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdSegExp.cpp:248
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
Definition: StdSegExp.cpp:789
virtual LibUtilities::ShapeType v_DetShapeType() const
Return Shape of region, using ShapeType enum list. i.e. Segment.
Definition: StdSegExp.cpp:84
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdSegExp.cpp:537
Describes the specification for a Basis.
Definition: Basis.h:50
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:155
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Definition: StdSegExp.cpp:486
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
Definition: StdSegExp.cpp:741