Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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  {
212  };
213 
214  const char* const VarCoeffTypeMap[] = {
215  "VarCoeffMass",
216  "VarCoeffLaplacian",
217  "VarCoeffWeakDeriv",
218  "VarCoeffD00",
219  "VarCoeffD11",
220  "VarCoeffD22",
221  "VarCoeffD01",
222  "VarCoeffD02",
223  "VarCoeffD12",
224  "VarCoeffVelX",
225  "VarCoeffVelY"
226  };
227  typedef std::map<StdRegions::VarCoeffType, Array<OneD, NekDouble> > VarCoeffMap;
228  static VarCoeffMap NullVarCoeffMap;
229 
231  {
240  };
241 
242  const char* const ConstFactorTypeMap[] = {
243  "FactorLambda",
244  "FactorTau",
245  "FactorTime",
246  "FactorSVVCutoffRatio",
247  "FactorSVVDiffCoeff",
248  "FactorGaussVertex",
249  "FactorGaussEdge",
250  "FactorConstant"
251  };
252  typedef std::map<ConstFactorType, NekDouble> ConstFactorMap;
253  static ConstFactorMap NullConstFactorMap;
254 
256  {
263  };
264 
265  const char* const IndexMapTypeMap[] =
266  {
267  "EdgeToElement",
268  "FaceToElement",
269  "EdgeInterior",
270  "FaceInterior",
271  "Boundary",
272  "Vertex"
273  };
274 
276  {
282  eDir1FwdDir1_Dir2FwdDir2, // These flags are interpreted as
283  eDir1FwdDir1_Dir2BwdDir2, // taking the second direction to the
284  eDir1BwdDir1_Dir2FwdDir2, // first direction. So Dir1FwdDir2 takes
285  eDir1BwdDir1_Dir2BwdDir2, // direction 2 and makes it backward
286  eDir1FwdDir2_Dir2FwdDir1, // to direction 1 in the mapped face.
287  eDir1FwdDir2_Dir2BwdDir1, // Note be careful not to flip this
288  eDir1BwdDir2_Dir2FwdDir1, // convention especially when using
289  eDir1BwdDir2_Dir2BwdDir1, // transposed mappings.
291  };
292 
293  const char* const OrientationMap[] =
294  {
295  "NoOrientation",
296  "Fwd",
297  "Bwd",
298  "Forwards",
299  "Backwards",
300  "Dir1FwdDir1_Dir2FwdDir2",
301  "Dir1FwdDir1_Dir2BwdDir2",
302  "Dir1BwdDir1_Dir2FwdDir2",
303  "Dir1BwdDir1_Dir2BwdDir2",
304  "Dir1FwdDir2_Dir2FwdDir1",
305  "Dir1FwdDir2_Dir2BwdDir1",
306  "Dir1BwdDir2_Dir2FwdDir1",
307  "Dir1BwdDir2_Dir2BwdDir1"
308  };
309 
310  // Defines a "fast find"
311  // Assumes that first/last define the beginning/ending of
312  // a continuous range of classes, and that start is
313  // an iterator between first and last
314 
315  template<class InputIterator, class EqualityComparable>
316  InputIterator find(InputIterator first, InputIterator last,
317  InputIterator startingpoint,
318  const EqualityComparable& value)
319  {
320  InputIterator val;
321 
322  if(startingpoint == first)
323  {
324  val = find(first,last,value);
325  }
326  else
327  {
328  val = find(startingpoint,last,value);
329  if(val == last)
330  {
331  val = find(first,startingpoint,value);
332  if(val == startingpoint)
333  {
334  val = last;
335  }
336  }
337  }
338  return val;
339  }
340 
341  } // end of namespace
342 } // end of namespace
343 
344 #endif //STDREGIONS_H
345 
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:252
const char *const ConstFactorTypeMap[]
Definition: StdRegions.hpp:242
const char *const IndexMapTypeMap[]
Definition: StdRegions.hpp:265
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:227
const char *const MatrixTypeMap[]
Definition: StdRegions.hpp:152
const char *const ElementTypeMap[]
Definition: StdRegions.hpp:76
const char *const OrientationMap[]
Definition: StdRegions.hpp:293
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
Definition: StdRegions.hpp:316
const char *const VarCoeffTypeMap[]
Definition: StdRegions.hpp:214
static VarCoeffMap NullVarCoeffMap
Definition: StdRegions.hpp:228
static ConstFactorMap NullConstFactorMap
Definition: StdRegions.hpp:253