GRINS-0.6.0
mesh_adaptive_solver_base.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2015 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_MESH_ADAPTIVE_SOLVER_BASE_H
26 #define GRINS_MESH_ADAPTIVE_SOLVER_BASE_H
27 
28 // C++
29 #include <string>
30 
31 // Boost
32 #include <boost/scoped_ptr.hpp>
33 
34 // GRINS
35 #include "grins/grins_solver.h"
36 
37 //libMesh
38 #include "libmesh/libmesh.h"
39 #include "libmesh/mesh_refinement.h"
40 
41 // libMesh forward declarations
42 class GetPot;
43 namespace libMesh
44 {
45  class MeshBase;
46  class ErrorVector;
47 }
48 
49 namespace GRINS
50 {
52  {
53  public:
54 
55  MeshAdaptiveSolverBase( const GetPot& input );
56 
57  virtual ~MeshAdaptiveSolverBase();
58 
59  protected:
60 
67 
68  unsigned int _max_refinement_steps;
71  unsigned int _nelem_target;
72  libMesh::Real _refine_fraction;
73  libMesh::Real _coarsen_fraction;
74  libMesh::Real _coarsen_threshold;
76  std::string _error_plot_prefix;
77 
82 
84 
85  boost::scoped_ptr<libMesh::MeshRefinement> _mesh_refinement;
86 
87  void build_mesh_refinement( libMesh::MeshBase& mesh );
88 
89  void set_refinement_type( const GetPot& input,
90  RefinementFlaggingType& refinement_type );
91 
92  bool check_for_convergence( SolverContext& context,
93  const libMesh::ErrorVector& error ) const;
94 
95  void flag_elements_for_refinement( const libMesh::ErrorVector& error );
96 
97  private:
98 
100 
101  };
102 
103 } // end namespace GRINS
104 
105 #endif // GRINS_MESH_ADAPTIVE_SOLVER_BASE_H
boost::scoped_ptr< libMesh::MeshRefinement > _mesh_refinement
void build_mesh_refinement(libMesh::MeshBase &mesh)
bool check_for_convergence(SolverContext &context, const libMesh::ErrorVector &error) const
GRINS namespace.
void flag_elements_for_refinement(const libMesh::ErrorVector &error)
Simple class to hold objects passed to Solver::solve.
void set_refinement_type(const GetPot &input, RefinementFlaggingType &refinement_type)

Generated on Mon Jun 22 2015 21:32:20 for GRINS-0.6.0 by  doxygen 1.8.9.1