Nektar++
MultiRegions.hpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: MultiRegions.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 
39 #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 const char *const GlobalSysSolnTypeMap[] = {"No Solution Type",
87  "DirectFull",
88  "DirectStaticCond",
89  "DirectMultiLevelStaticCond",
90  "IterativeFull",
91  "IterativeStaticCond",
92  "IterativeMultiLevelStaticCond",
93  "XxtFull",
94  "XxtStaticCond",
95  "XxtMultiLevelStaticCond",
96  "PETScFull",
97  "PETScStaticCond",
98  "PETScMultiLevelStaticCond"};
99 
100 /// Type of Galerkin projection.
102 {
106 };
107 
109 {
110  eNull, ///< No Solution type specified
118 };
119 
120 const char *const PreconditionerTypeMap[] = {
121  "Null",
122  "Diagonal",
123  "FullLinearSpaceWithDiagonal",
124  "FullLinearSpace",
125  "LowEnergyBlock",
126  "FullLinearSpaceWithLowEnergyBlock",
127  "Block",
128  "FullLinearSpaceWithBlock"};
129 
131 {
132  eNoLinSysIterSolver, ///< No Solution type specified
134  eGMRES
135 };
136 
137 const char *const LinSysIterSolverMap[] = {"NoLinSysIterSolver",
138  "ConjugateGradient", "GMRES"};
139 
140 // let's keep this for linking to external
141 // sparse libraries
143 {
144  eSmvBSR
145 };
146 
147 const char *const MatrixStorageTypeMap[] = {"SmvBSR"};
148 
149 typedef std::vector<SpatialDomains::BoundaryConditionType> BndTypesVector;
150 typedef std::vector<SpatialDomains::BoundaryConditionType>::iterator
152 
153 // structure to hold information about robin boundary conditions
154 
156 {
157  RobinBCInfo(const int id, const Array<OneD, const NekDouble> &primCoeffs)
158  : m_robinID(id), m_robinPrimitiveCoeffs(primCoeffs)
159  {
160  }
161 
162  virtual ~RobinBCInfo(){};
163 
164  int m_robinID; /// id of which edge/face is robin condition
166  std::shared_ptr<RobinBCInfo> next;
167 };
168 
169 typedef std::shared_ptr<RobinBCInfo> RobinBCInfoSharedPtr;
170 
172 {
174  const bool isLocal)
176  {
177  }
178 
180  {
181  }
182 
183  /// Geometry ID of entity.
184  int id;
185  /// Orientation of entity within higher dimensional entity.
187  /// Flag specifying if this entity is local to this partition.
188  bool isLocal;
189 };
190 
191 typedef std::map<int, std::vector<PeriodicEntity>> PeriodicMap;
193 
195 {
196  RotPeriodicInfo(const int dir, const NekDouble angle, const NekDouble tol)
197  : m_dir(dir), m_angle(angle), m_tol(tol)
198  {
199  }
200 
202  {
203  }
204 
205  /// Axis of rotation. 0 = 'x', 1 = 'y', 2 = 'z'
206  int m_dir;
207  /// Angle of rotation in radians
209  /// Tolerance to rotation is considered identical
211 };
212 
213 } // namespace MultiRegions
214 } // namespace Nektar
215 
216 #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:2
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.