Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CFLtester.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File UnsteadyAdvection.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 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: CFL tester solve routines
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_CFLTESTER_H
37 #define NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_CFLTESTER_H
38 
40 
41 using namespace Nektar::SolverUtils;
42 
43 namespace Nektar
44 {
46  {{18.849560, 37.699110, 62.254810, 92.114370, 127.199300, 167.209300, 212.189900, 261.852900, 316.311600, 375.280200, 438.911800, 506.922500, 579.489600, 656.332100},
47  {32.277580, 67.919290, 113.860500, 169.431300, 234.151800, 307.678500, 389.746800, 480.143200, 578.689500, 685.233500, 799.642600, 921.799700, 1051.600000, 1188.949000},
48  {56.418920, 115.463200, 191.215900, 282.444600, 388.469600, 508.597500, 642.523200, 789.745400, 950.116100, 1123.225000, 1309.009000, 1507.109000, 1717.513000, 1939.900000},
49  {77.988010, 158.974000, 262.115100, 385.943600, 529.415800, 691.770100, 872.414200, 1070.867000, 1286.725000, 1519.644000, 1769.323000, 2035.496000, 2317.925000, 2616.397000},
50  {102.518800, 207.512500, 340.960200, 500.891100, 686.042600, 895.336300, 1128.107000, 1383.623000, 1661.474000, 1961.100000, 2282.224000, 2624.386000, 2987.395000, 3370.856000},
51  {125.653700, 253.549800, 415.661800, 609.711500, 834.071300, 1087.549000, 1369.216000, 1678.315000, 2014.214000, 2376.369000, 2764.308000, 3177.613000, 3615.910000, 4078.863000},
52  {150.392200, 302.534600, 495.170300, 725.542200, 991.784100, 1292.405000, 1626.378000, 1992.722000, 2390.769000, 2819.785000, 3279.297000, 3768.717000, 4287.691000, 4835.729000},
53  {174.106400, 349.636100, 571.545300, 836.751500, 1143.031000, 1488.755000, 1872.650000, 2293.681000, 2750.981000, 3243.808000, 3771.512000, 4333.522000, 4929.325000, 5558.461000},
54  {198.947800, 398.852300, 651.400800, 953.050400, 1301.327000, 1694.312000, 2130.624000, 2609.014000, 3128.566000, 3688.361000, 4287.733000, 4925.959000, 5602.527000, 6316.841000},
55  {222.978700, 446.558300, 728.737000, 1065.639000, 1454.438000, 1893.064000, 2379.896000, 2913.620000, 3493.132000, 4117.485000, 4785.857000, 5497.519000, 6251.820000, 7079.855200}};
56 
58  {{18.849560, 37.699110, 62.254810, 92.114370, 127.199300, 167.209300, 212.189900, 261.852900, 316.311600, 375.280200, 438.911800, 506.922500, 579.489600, 656.332100},
59  {625.358147, 1196.328877, 1817.986152, 2475.195638, 3162.726621, 3867.689152, 4595.324620, 5340.967597, 6188.286000, 7399.972000, 8708.072000, 10111.160000, 11608.000000, 13197.470000},
60  {705.738221, 1268.022370, 1883.167893, 2533.621042, 3215.460527, 3915.574276, 4638.993612, 5380.985954, 6153.131100, 6914.337599, 7721.969961, 8529.801758, 9326.138300, 10138.712574},
61  {733.261678, 1293.053007, 1905.511959, 2553.681869, 3233.562783, 3932.056639, 4654.037626, 5394.854534, 6165.912400, 6926.174929, 7732.912435, 8509.531270, 9335.504451, 10147.409120},
62  {747.053764, 1305.602041, 1916.689465, 2563.704820, 3242.557000, 3940.217950, 4661.410438, 5401.601883, 6172.029656, 6931.769221, 7737.958233, 8514.117977, 9339.576627, 10151.066350},
63  {755.354971, 1313.162315, 1923.399136, 2569.711788, 3247.904628, 3945.042610, 4665.705043, 5405.487354, 6175.462753, 6934.840253, 7740.605266, 8518.215978, 9343.872193, 10156.126788}};
64 
66  {{18.849560, 37.699110, 62.254810, 92.114370, 127.199300, 167.209300, 212.189900, 261.852900, 316.311600, 375.280200, 438.911800, 506.922500, 579.489600, 656.332100},
67  {557.050244, 1050.871071, 1626.248117, 2260.761693, 2948.760275, 3677.949231, 4461.704082, 5269.668301, 6188.286000, 7399.972000, 8708.072000, 10111.160000, 11608.000000, 13197.470000},
68  {628.920938, 1115.037602, 1684.555318, 2314.125522, 2997.926601, 3723.485221, 4504.103288, 5309.152432, 6144.425035, 6997.224333, 7899.393530, 8799.536577, 9741.728144, 10730.151339},
69  {653.448558, 1137.048335, 1704.542817, 2332.448417, 3014.804194, 3739.158997, 4518.709861, 5322.835874, 6157.188251, 7009.203565, 7910.587422, 8810.047856, 9751.511668, 10739.355196},
70  {665.739421, 1148.083349, 1714.541462, 2341.603048, 3023.189930, 3746.919933, 4525.868290, 5329.493149, 6163.296851, 7014.864920, 7915.749155, 8814.796544, 9755.765307, 10668.230508},
71  {673.137069, 1154.731489, 1720.543482, 2347.089614, 3028.175778, 3751.507906, 4508.994826, 5306.299694, 6166.725091, 7017.972766, 7918.457008, 8818.796544, 9759.765307, 10672.230508}};
72 
74  {{18.849560, 37.699110, 62.254810, 92.114370, 127.199300, 167.209300, 212.189900, 261.852900, 316.311600, 375.280200, 438.911800, 506.922500, 579.489600, 656.332100},
75  {606.168101, 1187.787270, 1793.615712, 2391.865039, 2950.786843, 3487.596192, 4060.011000, 5074.723000, 6188.286000, 7399.972000, 8708.072000, 10111.160000, 11608.000000, 13197.470000},
76  {684.081594, 1260.315774, 1857.923680, 2448.327633, 2999.987783, 3530.775456, 4073.368829, 4591.645387, 5121.018725, 5647.554500, 6330.380000, 7341.464000, 8418.710000, 9561.240000},
77  {710.760453, 1285.192482, 1879.968339, 2467.708932, 3016.876152, 3545.638033, 4086.578922, 4603.479913, 5131.656118, 5657.223101, 6197.802683, 7022.172000, 8034.773000, 9107.511000},
78  {724.129308, 1297.665239, 1890.995890, 2477.394447, 3025.267650, 3552.997300, 4093.052410, 4609.237151, 5136.747279, 5661.792457, 6397.687000, 7383.760000, 8431.678000, 9540.598000},
79  {732.175780, 1305.179484, 1897.615616, 2483.199183, 3030.256925, 3557.347822, 4096.823380, 4612.552660, 5139.604517, 5664.300842, 6771.812000, 7388.760000, 8436.678000, 9546.598000}};
80 
81  class CFLtester : public UnsteadySystem
82  {
83  public:
84  friend class MemoryManager<CFLtester>;
85 
88  p->InitObject();
89  return p;}
90 
91  static std::string className;
92 
93  virtual ~CFLtester();
94 
95  protected:
96 
98 
100 
101  void DoOdeRhs(const Array<OneD, const Array<OneD, NekDouble> > &inarray,
102  Array<OneD, Array<OneD, NekDouble> > &outarray,
103  const NekDouble time);
104 
105  void DoOdeProjection(const Array<OneD, const Array<OneD, NekDouble> > &inarray,
106  Array<OneD, Array<OneD, NekDouble> > &outarray,
107  const NekDouble time);
108 
109  virtual void v_InitObject();
110 
111  virtual void v_GetFluxVector(const int i, Array<OneD, Array<OneD, NekDouble> > &physfield, Array<OneD, Array<OneD, NekDouble> > &flux);
112 
113  virtual void v_NumericalFlux(Array<OneD, Array<OneD, NekDouble> > &physfield, Array<OneD, Array<OneD, NekDouble> > &numflux);
114 
115  virtual void v_GenerateSummary(SummaryList& s);
116  private:
117 
118  virtual NekDouble v_GetTimeStep(const Array<OneD,int> ExpOrder, const Array<OneD,NekDouble> CFL, NekDouble timeCFL);
119 
120  virtual NekDouble v_GetTimeStep(int ExpOrder, NekDouble CFL, NekDouble TimeStability);
121 
122  // Mapping of the real convective field on the standard element.
123  // This function gives back the convective filed in the standard
124  // element to calculate the stability region of the problem in a
125  // unique way.
126  Array<OneD, NekDouble> GetStdVelocity(
127  const Array<OneD, Array<OneD,NekDouble> > inarray);
128  };
129 }
130 
131 #endif
static NekDouble EigenvaluesAnaMeshesRK2[6][14]
Definition: CFLtester.h:65
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static NekDouble EigenvaluesRegMeshes[10][14]
Definition: CFLtester.h:45
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: CellModel.h:51
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
static NekDouble EigenvaluesAnaMeshesRK4[6][14]
Definition: CFLtester.h:73
boost::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
static std::string className
Definition: CFLtester.h:91
Base class for unsteady solvers.
double NekDouble
Array< OneD, Array< OneD, NekDouble > > m_velocity
Definition: CFLtester.h:97
static NekDouble EigenvaluesAnaMeshesAB2[6][14]
Definition: CFLtester.h:57
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Definition: CFLtester.h:86