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 
46  // Orientation of adjacent edge for use with boundary
47  // constraints
49  {
52  };
53 
54  // Orientation of adjacent face for use with boundary
55  // constraints
57  {
66  };
67 
69  {
70  eNoSolnType, ///< No Solution type specified
84  };
85 
86 
87  const char* const GlobalSysSolnTypeMap[] =
88  {
89  "No Solution Type",
90  "DirectFull",
91  "DirectStaticCond",
92  "DirectMultiLevelStaticCond",
93  "IterativeFull",
94  "IterativeStaticCond",
95  "IterativeMultiLevelStaticCond",
96  "XxtFull",
97  "XxtStaticCond",
98  "XxtMultiLevelStaticCond",
99  "PETScFull",
100  "PETScStaticCond",
101  "PETScMultiLevelStaticCond"
102  };
103 
104  /// Type of Galerkin projection.
106  {
110  };
111 
113  {
114  eNull, ///< No Solution type specified
122  };
123 
124  const char* const PreconditionerTypeMap[] =
125  {
126  "Null",
127  "Diagonal",
128  "FullLinearSpaceWithDiagonal",
129  "FullLinearSpace",
130  "LowEnergyBlock",
131  "FullLinearSpaceWithLowEnergyBlock",
132  "Block",
133  "FullLinearSpaceWithBlock"
134  };
135 
136 
138  {
139  eNoLinSysIterSolver,///< No Solution type specified
141  eGMRES
142  };
143 
144  const char* const LinSysIterSolverMap[] =
145  {
146  "NoLinSysIterSolver",
147  "ConjugateGradient",
148  "GMRES"
149  };
150 
151 
152  // let's keep this for linking to external
153  // sparse libraries
155  {
156  eSmvBSR
157  };
158 
159  const char* const MatrixStorageTypeMap[] =
160  {
161  "SmvBSR"
162  };
163 
164 
165  typedef std::vector<SpatialDomains::BoundaryConditionType> BndTypesVector;
166  typedef std::vector<SpatialDomains::BoundaryConditionType>::iterator BndTypesVectorIter;
167 
168 
169  // structure to hold information about robin boundary conditions
170 
171  struct RobinBCInfo
172  {
173  RobinBCInfo(const int id, const Array<OneD, const NekDouble > &primCoeffs):
174  m_robinID(id),
175  m_robinPrimitiveCoeffs(primCoeffs)
176  {
177  }
178 
179  virtual ~RobinBCInfo()
180  {};
181 
182  int m_robinID; /// id of which edge/face is robin condition
184  std::shared_ptr<RobinBCInfo> next;
185  };
186 
187  typedef std::shared_ptr<RobinBCInfo> RobinBCInfoSharedPtr;
188 
190  {
192  const int id,
194  const bool isLocal) :
195  id(id), orient(orient), isLocal(isLocal) {}
196 
198 
199  /// Geometry ID of entity.
200  int id;
201  /// Orientation of entity within higher dimensional entity.
203  /// Flag specifying if this entity is local to this partition.
204  bool isLocal;
205  };
206 
207  typedef std::map<int, std::vector<PeriodicEntity> > PeriodicMap;
209 
211  {
213  const int dir,
214  const NekDouble angle,
215  const NekDouble tol) :
216  m_dir(dir), m_angle(angle), m_tol(tol) {}
217 
219 
220  /// Axis of rotation. 0 = 'x', 1 = 'y', 2 = 'z'
221  int m_dir;
222  /// Angle of rotation in radians
224  /// Tolerance to rotation is considered identical
226  };
227 
228  }// end of namespace
229 }// end of namespace
230 
231 #endif
const char *const MatrixStorageTypeMap[]
const char *const PreconditionerTypeMap[]
static PeriodicMap NullPeriodicMap
std::vector< SpatialDomains::BoundaryConditionType > BndTypesVector
@ eNoSolnType
No Solution type specified.
std::vector< SpatialDomains::BoundaryConditionType >::iterator BndTypesVectorIter
ProjectionType
Type of Galerkin projection.
std::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
const char *const GlobalSysSolnTypeMap[]
const char *const LinSysIterSolverMap[]
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
@ eNoLinSysIterSolver
No Solution type specified.
@ eNull
No Solution type specified.
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
double NekDouble
int id
Geometry ID of entity.
PeriodicEntity(const int id, const StdRegions::Orientation orient, const bool isLocal)
StdRegions::Orientation orient
Orientation of entity within higher dimensional entity.
bool isLocal
Flag specifying if this entity is local to this partition.
RobinBCInfo(const int id, const Array< OneD, const NekDouble > &primCoeffs)
std::shared_ptr< RobinBCInfo > next
Array< OneD, const NekDouble > m_robinPrimitiveCoeffs
id of which edge/face is robin condition
RotPeriodicInfo(const int dir, const NekDouble angle, const NekDouble tol)
NekDouble m_tol
Tolerance to rotation is considered identical.
int m_dir
Axis of rotation. 0 = 'x', 1 = 'y', 2 = 'z'.
NekDouble m_angle
Angle of rotation in radians.