Nektar++
MultiRegions.hpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File MultiRegsions.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 // 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: Multiregion overall header
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef MULTIREGIONS_H
36 #define MULTIREGIONS_H
37 
38 #include <vector>
40 
41 namespace Nektar
42 {
43  namespace MultiRegions
44  {
45 
47  {
48  eNotSet, ///< No state set
49  eLocal, ///< Local coefficients
50  eHybrid, ///< Hybrid coefficients
51  eGlobal, ///< Global coefficients
52  };
53 
54  // Orientation of adjacent edge for use with boundary
55  // constraints
57  {
60  };
61 
62  // Orientation of adjacent face for use with boundary
63  // constraints
65  {
74  };
75 
77  {
78  eNoSolnType, ///< No Solution type specified
92  };
93 
94 
95  const char* const GlobalSysSolnTypeMap[] =
96  {
97  "No Solution Type",
98  "DirectFull",
99  "DirectStaticCond",
100  "DirectMultiLevelStaticCond",
101  "IterativeFull",
102  "IterativeStaticCond",
103  "IterativeMultiLevelStaticCond",
104  "XxtFull",
105  "XxtStaticCond",
106  "XxtMultiLevelStaticCond",
107  "PETScFull",
108  "PETScStaticCond",
109  "PETScMultiLevelStaticCond"
110  };
111 
112  /// Type of Galerkin projection.
114  {
118  };
119 
121  {
122  eNull, ///< No Solution type specified
130  };
131 
132  const char* const PreconditionerTypeMap[] =
133  {
134  "Null",
135  "Diagonal",
136  "FullLinearSpaceWithDiagonal",
137  "FullLinearSpace",
138  "LowEnergyBlock",
139  "FullLinearSpaceWithLowEnergyBlock",
140  "Block",
141  "FullLinearSpaceWithBlock"
142  };
143 
144 
145  // let's keep this for linking to external
146  // sparse libraries
148  {
150  };
151 
152  const char* const MatrixStorageTypeMap[] =
153  {
154  "SmvBSR"
155  };
156 
157 
158  typedef std::vector<SpatialDomains::BoundaryConditionType> BndTypesVector;
159  typedef std::vector<SpatialDomains::BoundaryConditionType>::iterator BndTypesVectorIter;
160 
161 
162  // structure to hold information about robin boundary conditions
163 
164  struct RobinBCInfo
165  {
166  RobinBCInfo(const int id, const Array<OneD, const NekDouble > &primCoeffs):
167  m_robinID(id),
168  m_robinPrimitiveCoeffs(primCoeffs)
169  {
170  }
171 
172  virtual ~RobinBCInfo()
173  {};
174 
175  int m_robinID; /// id of which edge/face is robin condition
177  std::shared_ptr<RobinBCInfo> next;
178  };
179 
180  typedef std::shared_ptr<RobinBCInfo> RobinBCInfoSharedPtr;
181 
183  {
185  const int id,
186  const StdRegions::Orientation orient,
187  const bool isLocal) :
188  id(id), orient(orient), isLocal(isLocal) {}
189 
191 
192  /// Geometry ID of entity.
193  int id;
194  /// Orientation of entity within higher dimensional entity.
196  /// Flag specifying if this entity is local to this partition.
197  bool isLocal;
198  };
199 
200  typedef std::map<int, std::vector<PeriodicEntity> > PeriodicMap;
201  static PeriodicMap NullPeriodicMap;
202 
204  {
206  const int dir,
207  const NekDouble angle,
208  const NekDouble tol) :
209  m_dir(dir), m_angle(angle), m_tol(tol) {}
210 
212 
213  /// Axis of rotation. 0 = 'x', 1 = 'y', 2 = 'z'
214  int m_dir;
215  /// Angle of rotation in radians
217  /// Tolerance to rotation is considered identical
219  };
220 
221  }// end of namespace
222 }// end of namespace
223 
224 #endif
std::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
Local coefficients.
int id
Geometry ID of entity.
std::vector< SpatialDomains::BoundaryConditionType >::iterator BndTypesVectorIter
RobinBCInfo(const int id, const Array< OneD, const NekDouble > &primCoeffs)
Array< OneD, const NekDouble > m_robinPrimitiveCoeffs
id of which edge/face is robin condition
const char *const MatrixStorageTypeMap[]
ProjectionType
Type of Galerkin projection.
RotPeriodicInfo(const int dir, const NekDouble angle, const NekDouble tol)
std::vector< SpatialDomains::BoundaryConditionType > BndTypesVector
Hybrid coefficients.
NekDouble m_tol
Tolerance to rotation is considered identical.
Global coefficients.
const char *const GlobalSysSolnTypeMap[]
std::shared_ptr< RobinBCInfo > next
static PeriodicMap NullPeriodicMap
bool isLocal
Flag specifying if this entity is local to this partition.
StdRegions::Orientation orient
Orientation of entity within higher dimensional entity.
double NekDouble
PeriodicEntity(const int id, const StdRegions::Orientation orient, const bool isLocal)
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
No Solution type specified.
int m_dir
Axis of rotation. 0 = &#39;x&#39;, 1 = &#39;y&#39;, 2 = &#39;z&#39;.
NekDouble m_angle
Angle of rotation in radians.
No Solution type specified.
const char *const PreconditionerTypeMap[]