Foundations.hpp 7.22 KB
Newer Older
Mike Kirby's avatar
Mike Kirby committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
///////////////////////////////////////////////////////////////////////////////
//
// File Foundations.hpp
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Definition of enum lists and constants
//
///////////////////////////////////////////////////////////////////////////////

#ifndef FOUNDATIONS_H
#define FOUNDATIONS_H

39
40
#include <string>

Mike Kirby's avatar
Mike Kirby committed
41
namespace Nektar
Peter Vos's avatar
Peter Vos committed
42
43
44
45
{    
    /** \brief The namespace associated with the the LibUtilities library 
     * (\ref pageLibUtilities "LibUtilities introduction")
     */
Joe Frazier's avatar
Joe Frazier committed
46
    namespace LibUtilities
Peter Vos's avatar
Peter Vos committed
47
48
49
50
    {     
        /** \page pageLibUtilities The LibUtilities library
         *
         */
Mike Kirby's avatar
Mike Kirby committed
51
52
        enum BasisType
        {
53
            eNoBasisType,
Mike Kirby's avatar
Mike Kirby committed
54
55
56
57
58
59
60
61
62
63
            eOrtho_A,      //!< Principle Orthogonal Functions \f$\widetilde{\psi}^a_p(z_i)\f$
            eOrtho_B,      //!< Principle Orthogonal Functions \f$\widetilde{\psi}^b_{pq}(z_i)\f$
            eOrtho_C,      //!< Principle Orthogonal Functions \f$\widetilde{\psi}^c_{pqr}(z_i)\f$
            eModified_A,   //!< Principle Modified Functions \f$ \phi^a_p(z_i) \f$
            eModified_B,   //!< Principle Modified Functions \f$ \phi^b_{pq}(z_i) \f$
            eModified_C,   //!< Principle Modified Functions \f$ \phi^c_{pqr}(z_i) \f$
            eFourier,      //!< Fourier Expansion \f$ \exp(i p\pi  z_i)\f$
            eGLL_Lagrange, //!< Lagrange for SEM basis \f$ h_p(z_i) \f$
            eLegendre,     //!< Legendre Polynomials \f$ L_p(z_i) = P^{0,0}_p(z_i)\f$. Same as Ortho_A
            eChebyshev,    //!< Chebyshev Polynomials \f$ T_p(z_i) = P^{-1/2,-1/2}_p(z_i)\f$
Sophia Han's avatar
Sophia Han committed
64
            eMonomial,     //!< Monomial polynomials 
Mike Kirby's avatar
Mike Kirby committed
65
66
            SIZE_BasisType //!< Length of enum list
        };
67
68
69

        const char* const BasisTypeMap[] = 
        {
70
            "NoBasisType",
71
72
73
74
75
76
77
78
79
            "Ortho_A",
            "Ortho_B",
            "Ortho_C",
            "Modified_A",
            "Modified_B",
            "Modified_C",
            "Fourier",
            "GLL_Lagrange",
            "Legendre",
Sophia Han's avatar
Sophia Han committed
80
81
            "Chebyshev",
            "Monomial"
82
        };
Mike Kirby's avatar
Mike Kirby committed
83
84
85

        enum PointsType
        {
86
            eNoPointsType,
87
88
89
90
91
92
93
94
95
96
97
98
            eGaussGaussLegendre,     //!<  1D Gauss-Gauss-Legendre quadrature points
            eGaussRadauMLegendre,    //!<  1D Gauss-Radau-Legendre quadrature points, pinned at x=-1
            eGaussRadauPLegendre,    //!<  1D Gauss-Radau-Legendre quadrature points, pinned at x=1
            eGaussLobattoLegendre,   //!<  1D Gauss-Lobatto-Legendre quadrature points
            eGaussGaussChebyshev,    //!<  1D Gauss-Gauss-Chebyshev quadrature points
            eGaussRadauMChebyshev,   //!<  1D Gauss-Radau-Chebyshev quadrature points, pinned at x=-1
            eGaussRadauPChebyshev,   //!<  1D Gauss-Radau-Chebyshev quadrature points, pinned at x=1
            eGaussLobattoChebyshev,  //!<  1D Gauss-Lobatto-Legendre quadrature points
            eGaussRadauMAlpha0Beta1, //!<  Gauss Radau pinned at x=-1, \f$ \alpha =    0, \beta =    1 \f$
            eGaussRadauMAlpha0Beta2, //!<  Gauss Radau pinned at x=-1, \f$ \alpha =    0, \beta =    2 \f$
            eGaussRadauMAlpha1Beta0, //!<  Gauss Radau pinned at x=-1, \f$ \alpha =    1, \beta =    0 \f$
            eGaussRadauMAlpha2Beta0, //!<  Gauss Radau pinned at x=-1, \f$ \alpha =    2, \beta =    0 \f$
Mike Kirby's avatar
Mike Kirby committed
99
100
101
102
            ePolyEvenlySpaced,       //!< 1D Evenly-spaced points using Lagrange polynomial
            eFourierEvenlySpaced,    //!< 1D Evenly-spaced points using Fourier Fit
            eNodalTriElec,           //!< 2D Nodal Electrostatic Points on a Triangle
            eNodalTriFekete,         //!< 2D Nodal Fekete Points on a Triangle
103
            eNodalTriEvenlySpaced,   //!< 2D Evenly-spaced points on a Triangle
104
            eNodalTetEvenlySpaced,   //!< 3D Evenly-spaced points on a Tetrahedron
Mike Kirby's avatar
Mike Kirby committed
105
106
            eNodalTetElec,           //!< 3D Nodal Electrostatic Points on a Tetrahedron
            SIZE_PointsType          //!< Length of enum list
Mike Kirby's avatar
Mike Kirby committed
107
108
        };

109
        const std::string kPointsTypeStr[] = 
110
        {
111
            "NoPointsType",
Joe Frazier's avatar
Joe Frazier committed
112
113
114
115
116
117
118
119
120
121
            "GaussGaussLegendre",
            "GaussRadauMLegendre",
            "GaussRadauPLegendre",
            "GaussLobattoLegendre",
            "GaussGaussChebyshev",
            "GaussRadauMChebyshev",
            "GaussRadauPChebyshev",
            "GaussLobattoChebyshev",
            "GaussRadauMAlpha0Beta1",
            "GaussRadauMAlpha0Beta2",
Sophia Han's avatar
Sophia Han committed
122
123
            "GaussRadauMAlpha1Beta0",
            "GaussRadauMAlpha2Beta0",
Joe Frazier's avatar
Joe Frazier committed
124
125
126
127
            "PolyEvenlySpaced",
            "FourierEvenlySpaced",
            "NodalTriElec",
            "NodalTriFekete",
128
            "NodalTriEvenlySpaced",
129
            "NodalTetEvenlySpaced",
Joe Frazier's avatar
Joe Frazier committed
130
            "NodalTetElec",
131
        };
132
133
134
135

        enum TimeIntegrationType
        {
            eNoTimeIntegrationType,
136
137
138
139
140
141
142
            eAdamsBashforthOrder1,            //!< Adams-Bashforth Forward multi-step scheme of order 1
            eAdamsBashforthOrder2,            //!< Adams-Bashforth Forward multi-step scheme of order 2
            eAdamsMoultonOrder1,              //!< Adams-Moulton Forward multi-step scheme of order 1
            eAdamsMoultonOrder2,              //!< Adams-Moulton Forward multi-step scheme of order 2
            eClassiscalRungeKutta4,           //!< Runge-Kutta multi-stage scheme
            eForwardEuler,                    //!< Forward euler scheme
            eBackwardEuler,                   //!< Backward euler scheme
143
144
145
146
147
148
            SIZE_TimeIntegrationType          //!< Length of enum list
        };

        const char* const TimeIntegrationTypeMap[] = 
        {
            "NoTimeIntegrationType",
149
150
151
152
153
154
155
            "1st order Adams-Bashforth",
            "2nd order Adams-Bashforth",
            "1st order Adams-Moulton",
            "2nd order Adams-Moulton",
            "Classical Runge-Kutta 4",
            "Forward Euler",
            "Backward Euler"
156
        };
157

Mike Kirby's avatar
Mike Kirby committed
158
159
160
161
162
    } // end of namespace
} // end of namespace

#endif //FOUNDATIONS_H