Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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,
84  Array<OneD, NekDouble> &out_d1 = NullNekDouble1DArray,
85  Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray);
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,
95  Array<OneD, NekDouble> &out_d1 = NullNekDouble1DArray,
96  Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray);
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 
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 
166  STD_REGIONS_EXPORT virtual void v_FillMode(
167  const int mode,
168  Array<OneD, NekDouble> &outarray);
169 
170  STD_REGIONS_EXPORT virtual void v_GetCoords(
171  Array<OneD, NekDouble> &coords_0,
172  Array<OneD, NekDouble> &coords_1,
173  Array<OneD, NekDouble> &coords_2);
174 
175 
176  //----------------------------
177  // Public Mappings
178  //---------------------------
179 
181  Array<OneD, unsigned int>& outarray);
182 
184  Array<OneD, unsigned int>& outarray);
185 
186  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
187  bool useCoeffPacking = false);
188 
189  //----------------------------
190  // Helper functions
191  //---------------------------
192 
193  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
194  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
195  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
198  const std::vector<unsigned int> &nummodes,
199  int &modes_offset);
201  v_DetShapeType() const;
202 
203  //----------------------------
204  // Wrapper functions
205  //---------------------------
206 
208  const StdMatrixKey &mkey);
209 
211  const StdMatrixKey &mkey);
212 
213  private:
214 
215  };
216 
217 
218  } //end of namespace
219 } //end of namespace
220 
221 #endif //STDSEGEXP_H
222