GRINS-0.7.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-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_MESH_ADAPTIVE_SOLVER_BASE_H
26 #define GRINS_MESH_ADAPTIVE_SOLVER_BASE_H
27 
28 // C++
29 #include <string>
30 
31 // GRINS
34 
35 //libMesh
36 #include "libmesh/libmesh.h"
37 #include "libmesh/mesh_refinement.h"
38 
39 // libMesh forward declarations
40 class GetPot;
41 namespace libMesh
42 {
43  class MeshBase;
44  class ErrorVector;
45 }
46 
47 namespace GRINS
48 {
49  class SolverContext;
50 
52  {
53  public:
54 
55  MeshAdaptiveSolverBase( const GetPot& input );
56 
58 
59  protected:
60 
63 
70 
72 
73  libMesh::UniquePtr<libMesh::MeshRefinement> _mesh_refinement;
74 
75  void build_mesh_refinement( libMesh::MeshBase& mesh );
76 
77  void set_refinement_type( const GetPot& input,
78  const MeshAdaptivityOptions& mesh_adaptivity_options,
79  RefinementFlaggingType& refinement_type );
80 
81  bool check_for_convergence( SolverContext& context,
82  const libMesh::ErrorVector& error ) const;
83 
84  void flag_elements_for_refinement( const libMesh::ErrorVector& error );
85 
86  void estimate_error_for_amr( SolverContext& context, libMesh::ErrorVector& error );
87 
88  void perform_amr( SolverContext& context, const libMesh::ErrorVector& error );
89 
90  private:
91 
93 
94  };
95 
96 } // end namespace GRINS
97 
98 #endif // GRINS_MESH_ADAPTIVE_SOLVER_BASE_H
void set_refinement_type(const GetPot &input, const MeshAdaptivityOptions &mesh_adaptivity_options, RefinementFlaggingType &refinement_type)
void build_mesh_refinement(libMesh::MeshBase &mesh)
void perform_amr(SolverContext &context, const libMesh::ErrorVector &error)
void estimate_error_for_amr(SolverContext &context, libMesh::ErrorVector &error)
bool check_for_convergence(SolverContext &context, const libMesh::ErrorVector &error) const
GRINS namespace.
void flag_elements_for_refinement(const libMesh::ErrorVector &error)
Container for mesh adaptivity options.
Container for ErrorEstimator options.
ErrorEstimatorOptions _error_estimator_options
Simple class to hold objects passed to Solver::solve.
libMesh::UniquePtr< libMesh::MeshRefinement > _mesh_refinement
MeshAdaptivityOptions _mesh_adaptivity_options

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