Nektar++
CFLtester.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: CFLtester.h
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: CFL tester solve routines
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_CFLTESTER_H
36#define NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_CFLTESTER_H
37
40
41using namespace Nektar::SolverUtils;
42
43namespace Nektar
44{
46 {18.849560, 37.699110, 62.254810, 92.114370, 127.199300, 167.209300,
47 212.189900, 261.852900, 316.311600, 375.280200, 438.911800, 506.922500,
48 579.489600, 656.332100},
49 {32.277580, 67.919290, 113.860500, 169.431300, 234.151800, 307.678500,
50 389.746800, 480.143200, 578.689500, 685.233500, 799.642600, 921.799700,
51 1051.600000, 1188.949000},
52 {56.418920, 115.463200, 191.215900, 282.444600, 388.469600, 508.597500,
53 642.523200, 789.745400, 950.116100, 1123.225000, 1309.009000, 1507.109000,
54 1717.513000, 1939.900000},
55 {77.988010, 158.974000, 262.115100, 385.943600, 529.415800, 691.770100,
56 872.414200, 1070.867000, 1286.725000, 1519.644000, 1769.323000,
57 2035.496000, 2317.925000, 2616.397000},
58 {102.518800, 207.512500, 340.960200, 500.891100, 686.042600, 895.336300,
59 1128.107000, 1383.623000, 1661.474000, 1961.100000, 2282.224000,
60 2624.386000, 2987.395000, 3370.856000},
61 {125.653700, 253.549800, 415.661800, 609.711500, 834.071300, 1087.549000,
62 1369.216000, 1678.315000, 2014.214000, 2376.369000, 2764.308000,
63 3177.613000, 3615.910000, 4078.863000},
64 {150.392200, 302.534600, 495.170300, 725.542200, 991.784100, 1292.405000,
65 1626.378000, 1992.722000, 2390.769000, 2819.785000, 3279.297000,
66 3768.717000, 4287.691000, 4835.729000},
67 {174.106400, 349.636100, 571.545300, 836.751500, 1143.031000, 1488.755000,
68 1872.650000, 2293.681000, 2750.981000, 3243.808000, 3771.512000,
69 4333.522000, 4929.325000, 5558.461000},
70 {198.947800, 398.852300, 651.400800, 953.050400, 1301.327000, 1694.312000,
71 2130.624000, 2609.014000, 3128.566000, 3688.361000, 4287.733000,
72 4925.959000, 5602.527000, 6316.841000},
73 {222.978700, 446.558300, 728.737000, 1065.639000, 1454.438000, 1893.064000,
74 2379.896000, 2913.620000, 3493.132000, 4117.485000, 4785.857000,
75 5497.519000, 6251.820000, 7079.855200}};
76
78 {18.849560, 37.699110, 62.254810, 92.114370, 127.199300, 167.209300,
79 212.189900, 261.852900, 316.311600, 375.280200, 438.911800, 506.922500,
80 579.489600, 656.332100},
81 {625.358147, 1196.328877, 1817.986152, 2475.195638, 3162.726621,
82 3867.689152, 4595.324620, 5340.967597, 6188.286000, 7399.972000,
83 8708.072000, 10111.160000, 11608.000000, 13197.470000},
84 {705.738221, 1268.022370, 1883.167893, 2533.621042, 3215.460527,
85 3915.574276, 4638.993612, 5380.985954, 6153.131100, 6914.337599,
86 7721.969961, 8529.801758, 9326.138300, 10138.712574},
87 {733.261678, 1293.053007, 1905.511959, 2553.681869, 3233.562783,
88 3932.056639, 4654.037626, 5394.854534, 6165.912400, 6926.174929,
89 7732.912435, 8509.531270, 9335.504451, 10147.409120},
90 {747.053764, 1305.602041, 1916.689465, 2563.704820, 3242.557000,
91 3940.217950, 4661.410438, 5401.601883, 6172.029656, 6931.769221,
92 7737.958233, 8514.117977, 9339.576627, 10151.066350},
93 {755.354971, 1313.162315, 1923.399136, 2569.711788, 3247.904628,
94 3945.042610, 4665.705043, 5405.487354, 6175.462753, 6934.840253,
95 7740.605266, 8518.215978, 9343.872193, 10156.126788}};
96
98 {18.849560, 37.699110, 62.254810, 92.114370, 127.199300, 167.209300,
99 212.189900, 261.852900, 316.311600, 375.280200, 438.911800, 506.922500,
100 579.489600, 656.332100},
101 {557.050244, 1050.871071, 1626.248117, 2260.761693, 2948.760275,
102 3677.949231, 4461.704082, 5269.668301, 6188.286000, 7399.972000,
103 8708.072000, 10111.160000, 11608.000000, 13197.470000},
104 {628.920938, 1115.037602, 1684.555318, 2314.125522, 2997.926601,
105 3723.485221, 4504.103288, 5309.152432, 6144.425035, 6997.224333,
106 7899.393530, 8799.536577, 9741.728144, 10730.151339},
107 {653.448558, 1137.048335, 1704.542817, 2332.448417, 3014.804194,
108 3739.158997, 4518.709861, 5322.835874, 6157.188251, 7009.203565,
109 7910.587422, 8810.047856, 9751.511668, 10739.355196},
110 {665.739421, 1148.083349, 1714.541462, 2341.603048, 3023.189930,
111 3746.919933, 4525.868290, 5329.493149, 6163.296851, 7014.864920,
112 7915.749155, 8814.796544, 9755.765307, 10668.230508},
113 {673.137069, 1154.731489, 1720.543482, 2347.089614, 3028.175778,
114 3751.507906, 4508.994826, 5306.299694, 6166.725091, 7017.972766,
115 7918.457008, 8818.796544, 9759.765307, 10672.230508}};
116
118 {18.849560, 37.699110, 62.254810, 92.114370, 127.199300, 167.209300,
119 212.189900, 261.852900, 316.311600, 375.280200, 438.911800, 506.922500,
120 579.489600, 656.332100},
121 {606.168101, 1187.787270, 1793.615712, 2391.865039, 2950.786843,
122 3487.596192, 4060.011000, 5074.723000, 6188.286000, 7399.972000,
123 8708.072000, 10111.160000, 11608.000000, 13197.470000},
124 {684.081594, 1260.315774, 1857.923680, 2448.327633, 2999.987783,
125 3530.775456, 4073.368829, 4591.645387, 5121.018725, 5647.554500,
126 6330.380000, 7341.464000, 8418.710000, 9561.240000},
127 {710.760453, 1285.192482, 1879.968339, 2467.708932, 3016.876152,
128 3545.638033, 4086.578922, 4603.479913, 5131.656118, 5657.223101,
129 6197.802683, 7022.172000, 8034.773000, 9107.511000},
130 {724.129308, 1297.665239, 1890.995890, 2477.394447, 3025.267650,
131 3552.997300, 4093.052410, 4609.237151, 5136.747279, 5661.792457,
132 6397.687000, 7383.760000, 8431.678000, 9540.598000},
133 {732.175780, 1305.179484, 1897.615616, 2483.199183, 3030.256925,
134 3557.347822, 4096.823380, 4612.552660, 5139.604517, 5664.300842,
135 6771.812000, 7388.760000, 8436.678000, 9546.598000}};
136
138{
139public:
140 friend class MemoryManager<CFLtester>;
141
145 {
148 p->InitObject();
149 return p;
150 }
151
152 static std::string className;
153
154 virtual ~CFLtester();
155
156protected:
160
163
164 void DoOdeRhs(const Array<OneD, const Array<OneD, NekDouble>> &inarray,
166 const NekDouble time);
167
169 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
170 Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble time);
171
172 /// Get the normal velocity
174
175 virtual void v_InitObject(bool DeclareFields = true) override;
176
179
180 virtual void v_GenerateSummary(SummaryList &s) override;
181
182private:
184 const Array<OneD, NekDouble> CFL,
185 NekDouble timeCFL) override;
186
187 virtual NekDouble v_GetTimeStep(int ExpOrder, NekDouble CFL,
188 NekDouble TimeStability) override;
189
190 // Mapping of the real convective field on the standard element.
191 // This function gives back the convective filed in the standard
192 // element to calculate the stability region of the problem in a
193 // unique way.
195 const Array<OneD, Array<OneD, NekDouble>> inarray);
196};
197} // namespace Nektar
198
199#endif
Array< OneD, Array< OneD, NekDouble > > m_velocity
Definition: CFLtester.h:158
Array< OneD, NekDouble > GetStdVelocity(const Array< OneD, Array< OneD, NekDouble > > inarray)
SolverUtils::RiemannSolverSharedPtr m_riemannSolver
Definition: CFLtester.h:157
virtual NekDouble v_GetTimeStep(const Array< OneD, int > ExpOrder, const Array< OneD, NekDouble > CFL, NekDouble timeCFL) override
CFLtester(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
virtual void v_GenerateSummary(SummaryList &s) override
Print a summary of time stepping parameters.
virtual ~CFLtester()
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Definition: CFLtester.h:142
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
virtual void v_InitObject(bool DeclareFields=true) override
Initialisation object for EquationSystem.
Array< OneD, NekDouble > m_traceVn
Definition: CFLtester.h:159
Array< OneD, NekDouble > & GetNormalVelocity()
Get the normal velocity.
void GetFluxVector(const Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &flux)
static std::string className
Definition: CFLtester.h:152
virtual NekDouble v_GetTimeStep(int ExpOrder, NekDouble CFL, NekDouble TimeStability) override
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
A base class for PDEs which include an advection component.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< RiemannSolver > RiemannSolverSharedPtr
A shared pointer to an EquationSystem object.
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:46
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:174
static NekDouble EigenvaluesAnaMeshesRK2[6][14]
Definition: CFLtester.h:97
static NekDouble EigenvaluesRegMeshes[10][14]
Definition: CFLtester.h:45
static NekDouble EigenvaluesAnaMeshesRK4[6][14]
Definition: CFLtester.h:117
static NekDouble EigenvaluesAnaMeshesAB2[6][14]
Definition: CFLtester.h:77
double NekDouble