Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StdRegions.hpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File StdRegions.hpp
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: Definition of enum lists and constants
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef STDREGIONS_HPP
37 #define STDREGIONS_HPP
38 
39 
40 #include<map>
41 #include <LibUtilities/BasicUtils/SharedArray.hpp> // for Array, etc
43 
44 namespace Nektar
45 {
46 
47  /** \brief The namespace associated with the the StdRegions library
48  * (\ref pageStdRegions "StdRegions introduction")
49  */
50  namespace StdRegions
51  {
53  {
54  //eStdPointExp,
74  };
75 
76  const char* const ElementTypeMap[] =
77  {
78  //"StdPointExp",
79  "StdSegExp",
80  "SegExp",
81  "StdQuadExp",
82  "StdTriExp",
83  "StdNodalTriExp",
84  "QuadExp",
85  "TriExp",
86  "NodalTriExp",
87  "StdHexExp",
88  "StdPrismExp",
89  "StdPyrExp",
90  "StdTetExp",
91  "StdNodalTetExp",
92  "HexExp",
93  "PrismExp",
94  "PyrExp",
95  "TetExp",
96  "NodalTetExp",
97  };
98 
99  /** @todo we need to tidy up matrix construction approach
100  * probably using a factory type approach */
102  {
150  };
151 
152  const char* const MatrixTypeMap[] =
153  {
154  "Mass",
155  "InvMass",
156  "Laplacian",
157  "Laplacian00",
158  "Laplacian01",
159  "Laplacian02",
160  "Laplacian10",
161  "Laplacian11",
162  "Laplacian12",
163  "Laplacian20",
164  "Laplacian21",
165  "Laplacian22",
166  "InvLaplacianWithUnityMean",
167  "WeakDeriv0",
168  "WeakDeriv1",
169  "WeakDeriv2",
170  "WeakDirectionalDeriv",
171  "MassLevelCurvature",
172  "LinearAdvectionReaction",
173  "LinearAdvectionDiffusionReaction",
174  "NBasisTrans",
175  "InvNBasisTrans",
176  "BwdTrans",
177  "IProductWRTBase",
178  "IProductWRTDerivBase0",
179  "IProductWRTDerivBase1",
180  "IProductWRTDerivBase2",
181  "Helmholtz",
182  "HybridDGHelmholz",
183  "InvHybridDGHelmholtz",
184  "HybridDGHelmBndLam",
185  "HybridDGLamToQ0",
186  "HybridDGLamToQ1",
187  "HybridDGLamToQ2",
188  "HybridDGLamToU",
189  "FwdTrans",
190  "PreconR",
191  "PreconRT",
192  "PreconLinearSpace",
193  "InterpGauss",
194  "GaussDG",
195  "PhysInterpToEquiSpaced"
196  };
197 
199  {
211  };
212 
213  const char* const VarCoeffTypeMap[] = {
214  "VarCoeffMass",
215  "VarCoeffLaplacian",
216  "VarCoeffWeakDeriv",
217  "VarCoeffD00",
218  "VarCoeffD11",
219  "VarCoeffD22",
220  "VarCoeffD01",
221  "VarCoeffD02",
222  "VarCoeffD12",
223  "VarCoeffVelX",
224  "VarCoeffVelY"
225  };
226  typedef std::map<StdRegions::VarCoeffType, Array<OneD, NekDouble> > VarCoeffMap;
227  static VarCoeffMap NullVarCoeffMap;
228 
230  {
239  };
240 
241  const char* const ConstFactorTypeMap[] = {
242  "FactorLambda",
243  "FactorTau",
244  "FactorTime",
245  "FactorSVVCutoffRatio",
246  "FactorSVVDiffCoeff",
247  "FactorGaussVertex",
248  "FactorGaussEdge",
249  "FactorConstant"
250  };
251  typedef std::map<ConstFactorType, NekDouble> ConstFactorMap;
252  static ConstFactorMap NullConstFactorMap;
253 
255  {
262  };
263 
264  const char* const IndexMapTypeMap[] =
265  {
266  "EdgeToElement",
267  "FaceToElement",
268  "EdgeInterior",
269  "FaceInterior",
270  "Boundary",
271  "Vertex"
272  };
273 
275  {
281  eDir1FwdDir1_Dir2FwdDir2, // These flags are interpreted as
282  eDir1FwdDir1_Dir2BwdDir2, // taking the second direction to the
283  eDir1BwdDir1_Dir2FwdDir2, // first direction. So Dir1FwdDir2 takes
284  eDir1BwdDir1_Dir2BwdDir2, // direction 2 and makes it backward
285  eDir1FwdDir2_Dir2FwdDir1, // to direction 1 in the mapped face.
286  eDir1FwdDir2_Dir2BwdDir1, // Note be careful not to flip this
287  eDir1BwdDir2_Dir2FwdDir1, // convention especially when using
288  eDir1BwdDir2_Dir2BwdDir1, // transposed mappings.
290  };
291 
292  const char* const OrientationMap[] =
293  {
294  "NoOrientation",
295  "Fwd",
296  "Bwd",
297  "Forwards",
298  "Backwards",
299  "Dir1FwdDir1_Dir2FwdDir2",
300  "Dir1FwdDir1_Dir2BwdDir2",
301  "Dir1BwdDir1_Dir2FwdDir2",
302  "Dir1BwdDir1_Dir2BwdDir2",
303  "Dir1FwdDir2_Dir2FwdDir1",
304  "Dir1FwdDir2_Dir2BwdDir1",
305  "Dir1BwdDir2_Dir2FwdDir1",
306  "Dir1BwdDir2_Dir2BwdDir1"
307  };
308 
309  // Defines a "fast find"
310  // Assumes that first/last define the beginning/ending of
311  // a continuous range of classes, and that start is
312  // an iterator between first and last
313 
314  template<class InputIterator, class EqualityComparable>
315  InputIterator find(InputIterator first, InputIterator last,
316  InputIterator startingpoint,
317  const EqualityComparable& value)
318  {
319  InputIterator val;
320 
321  if(startingpoint == first)
322  {
323  val = find(first,last,value);
324  }
325  else
326  {
327  val = find(startingpoint,last,value);
328  if(val == last)
329  {
330  val = find(first,startingpoint,value);
331  if(val == startingpoint)
332  {
333  val = last;
334  }
335  }
336  }
337  return val;
338  }
339 
340  } // end of namespace
341 } // end of namespace
342 
343 #endif //STDREGIONS_H
344 
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:251
const char *const ConstFactorTypeMap[]
Definition: StdRegions.hpp:241
const char *const IndexMapTypeMap[]
Definition: StdRegions.hpp:264
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:226
const char *const MatrixTypeMap[]
Definition: StdRegions.hpp:152
const char *const ElementTypeMap[]
Definition: StdRegions.hpp:76
const char *const OrientationMap[]
Definition: StdRegions.hpp:292
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
Definition: StdRegions.hpp:315
const char *const VarCoeffTypeMap[]
Definition: StdRegions.hpp:213
static VarCoeffMap NullVarCoeffMap
Definition: StdRegions.hpp:227
static ConstFactorMap NullConstFactorMap
Definition: StdRegions.hpp:252