GRINS-0.7.0
adaptive_time_stepping_options.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2016 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef GRINS_ADAPTIVE_TIME_STEPPING_OPTIONS_H
26 #define GRINS_ADAPTIVE_TIME_STEPPING_OPTIONS_H
27 
28 // C++
29 #include <string>
30 
31 // libMesh
32 #include "libmesh/system_norm.h"
33 
34 // libmMesh forward declarations
35 class GetPot;
36 
37 namespace GRINS
38 {
41  {
42  public:
43  AdaptiveTimeSteppingOptions( const GetPot& input );
45 
46  bool is_time_adaptive() const
47  { return _is_time_adaptive; }
48 
49  double target_tolerance() const
50  { return _target_tolerance; }
51 
52  double upper_tolerance() const
53  { return _upper_tolerance; }
54 
55  double max_growth() const
56  { return _max_growth; }
57 
58  const libMesh::SystemNorm& component_norm()
59  { return _component_norm; }
60 
61  private:
62 
63  void check_dup_input_style( const GetPot& input ) const;
64 
65  bool is_old_style( const GetPot& input ) const;
66 
67  void parse_old_style(const GetPot& input);
68 
69  void parse_new_style(const GetPot& input);
70 
71  void parse_options(const GetPot& input, const std::string& section);
72 
74 
75  // target tolerance parameter for adaptive time stepping
81  double _max_growth;
82 
83  // The norm to use for each solution variable for adaptive time stepping
84  libMesh::SystemNorm _component_norm;
85  };
86 
87 } // end namespace GRINS
88 
89 #endif // GRINS_ADAPTIVE_TIME_STEPPING_OPTIONS_H
Container for adaptive time-stepping options.
void parse_options(const GetPot &input, const std::string &section)
GRINS namespace.
double _target_tolerance
0.0 means there is no adaptive time stepping enabled.
void check_dup_input_style(const GetPot &input) const
bool is_old_style(const GetPot &input) const

Generated on Thu Jun 2 2016 21:52:28 for GRINS-0.7.0 by  doxygen 1.8.10