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
42{
43
44// Orientation of adjacent edge for use with boundary
45// constraints
47{
50};
51
52// Orientation of adjacent face for use with boundary
53// constraints
55{
64};
65
67{
68 eNoSolnType, ///< No Solution type specified
82};
83
84const char *const GlobalSysSolnTypeMap[] = {"No Solution Type",
85 "DirectFull",
86 "DirectStaticCond",
87 "DirectMultiLevelStaticCond",
88 "IterativeFull",
89 "IterativeStaticCond",
90 "IterativeMultiLevelStaticCond",
91 "XxtFull",
92 "XxtStaticCond",
93 "XxtMultiLevelStaticCond",
94 "PETScFull",
95 "PETScStaticCond",
96 "PETScMultiLevelStaticCond"};
97
98/// Type of Galerkin projection.
100{
105
107{
112
114{
115 eNoLinSysIterSolver, ///< No Solution type specified
116 eConjugateGradient, ///< Conjugate Gradient
117 eGMRES, ///< GMRES
118 eGMRESLoc ///< GMRES in Local storage
120
121const char *const LinSysIterSolverMap[] = {
122 "NoLinSysIterSolver", "ConjugateGradient", "GMRES", "GMRESLoc"};
123
124// let's keep this for linking to external
125// sparse libraries
127{
128 eSmvBSR
130
131const char *const MatrixStorageTypeMap[] = {"SmvBSR"};
132
133typedef std::vector<SpatialDomains::BoundaryConditionType> BndTypesVector;
134typedef std::vector<SpatialDomains::BoundaryConditionType>::iterator
136
137// structure to hold information about robin boundary conditions
138
140{
141 RobinBCInfo(const int id, const Array<OneD, const NekDouble> &primCoeffs)
142 : m_robinID(id), m_robinPrimitiveCoeffs(primCoeffs)
143 {
144 }
145
146 virtual ~RobinBCInfo(){};
147
148 int m_robinID; /// id of which edge/face is robin condition
150 std::shared_ptr<RobinBCInfo> next;
151};
152
153typedef std::shared_ptr<RobinBCInfo> RobinBCInfoSharedPtr;
154
156{
158 const bool isLocal)
160 {
161 }
162
164 {
165 }
166
167 /// Geometry ID of entity.
168 int id;
169 /// Orientation of entity within higher dimensional entity.
171 /// Flag specifying if this entity is local to this partition.
173};
174
175typedef std::map<int, std::vector<PeriodicEntity>> PeriodicMap;
177
179{
180 RotPeriodicInfo(const int dir, const NekDouble angle, const NekDouble tol)
181 : m_dir(dir), m_angle(angle), m_tol(tol)
182 {
183 }
184
186 {
187 }
188
189 /// Axis of rotation. 0 = 'x', 1 = 'y', 2 = 'z'
190 int m_dir;
191 /// Angle of rotation in radians
193 /// Tolerance to rotation is considered identical
195};
196
197} // namespace Nektar::MultiRegions
198
199#endif
const char *const MatrixStorageTypeMap[]
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
@ eGMRESLoc
GMRES in Local storage.
@ eNoLinSysIterSolver
No Solution type specified.
@ eConjugateGradient
Conjugate Gradient.
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.