GRINS-0.8.0
mesh_adaptivity_options.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 //
3 // GRINS - General Reacting Incompressible Navier-Stokes
4 //
5 // Copyright (C) 2014-2015 Paul T. Bauman, Roy H. Stogner
6 // Copyright (C) 2010-2013 The PECOS Development Team
7 //
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the Version 2.1 GNU Lesser General
10 // Public License as published by the Free Software Foundation.
11 //
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // Lesser General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public
18 // License along with this library; if not, write to the Free Software
19 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
20 // Boston, MA 02110-1301 USA
21 //
22 //-----------------------------------------------------------------------el-
23 
24 #ifndef GRINS_MESH_ADAPTIVITY_OPTIONS_H
25 #define GRINS_MESH_ADAPTIVITY_OPTIONS_H
26 
27 // C++
28 #include <string>
29 
30 // libMesh
31 #include "libmesh/libmesh.h"
32 
33 // libmMesh forward declarations
34 class GetPot;
35 
36 namespace GRINS
37 {
40  {
41  public:
42  MeshAdaptivityOptions( const GetPot& input );
44 
45  bool is_mesh_adaptive() const
46  { return _is_mesh_adaptive; }
47 
48  const std::string& refinement_strategy() const
49  { return _refinement_strategy; }
50 
51  unsigned int max_refinement_steps() const
52  { return _max_refinement_steps; }
53 
54  bool coarsen_by_parents() const
55  { return _coarsen_by_parents; }
56 
57  libMesh::Real absolute_global_tolerance() const
58  { return _absolute_global_tolerance; }
59 
60  unsigned int nelem_target() const
61  { return _nelem_target; }
62 
63  libMesh::Real refine_fraction() const
64  { return _refine_fraction; }
65 
66  libMesh::Real coarsen_fraction () const
67  { return _coarsen_fraction; }
68 
69  libMesh::Real coarsen_threshold() const
70  { return _coarsen_threshold; }
71 
72  bool plot_cell_errors() const
73  { return _plot_cell_errors; }
74 
75  const std::string& error_plot_prefix() const
76  { return _error_plot_prefix; }
77 
78  unsigned int node_level_mismatch_limit() const
79  { return _node_level_mismatch_limit; }
80 
81  unsigned int edge_level_mismatch_limit() const
82  { return _edge_level_mismatch_limit; }
83 
84  unsigned int face_level_mismatch_limit() const
85  { return _face_level_mismatch_limit; }
86 
89 
90  unsigned int max_h_level() const
91  { return _max_h_level; }
92 
93  private:
94 
95  void check_dup_input_style( const GetPot& input ) const;
96 
97  bool is_old_style( const GetPot& input ) const;
98 
99  void parse_old_style(const GetPot& input);
100 
101  void parse_new_style(const GetPot& input);
102 
103  void parse_options(const GetPot& input, const std::string& section);
104 
106  std::string _refinement_strategy;
107  unsigned int _max_refinement_steps;
110  unsigned int _nelem_target;
111  libMesh::Real _refine_fraction;
112  libMesh::Real _coarsen_fraction;
113  libMesh::Real _coarsen_threshold;
115  std::string _error_plot_prefix;
116 
121 
122  unsigned int _max_h_level;
123 
124  };
125 
126 } // end namespace GRINS
127 
128 #endif // GRINS_MESH_ADAPTIVITY_OPTIONS_H
libMesh::Real coarsen_fraction() const
const std::string & refinement_strategy() const
void parse_new_style(const GetPot &input)
unsigned int edge_level_mismatch_limit() const
void parse_options(const GetPot &input, const std::string &section)
libMesh::Real absolute_global_tolerance() const
unsigned int face_level_mismatch_limit() const
GRINS namespace.
libMesh::Real coarsen_threshold() const
libMesh::Real refine_fraction() const
void parse_old_style(const GetPot &input)
bool is_old_style(const GetPot &input) const
Container for mesh adaptivity options.
bool enforce_mismatch_limit_prior_to_refinement() const
unsigned int node_level_mismatch_limit() const
void check_dup_input_style(const GetPot &input) const
const std::string & error_plot_prefix() const
unsigned int max_refinement_steps() const
MeshAdaptivityOptions(const GetPot &input)

Generated on Tue Dec 19 2017 12:47:28 for GRINS-0.8.0 by  doxygen 1.8.9.1