GRINS-0.8.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-2017 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 #include "libmesh/auto_ptr.h"
39 
40 // libMesh forward declarations
41 class GetPot;
42 namespace libMesh
43 {
44  class MeshBase;
45  class ErrorVector;
46 }
47 
48 namespace GRINS
49 {
50  class SolverContext;
51 
53  {
54  public:
55 
56  MeshAdaptiveSolverBase( const GetPot& input );
57 
59 
60  protected:
61 
64 
71 
73 
74  libMesh::UniquePtr<libMesh::MeshRefinement> _mesh_refinement;
75 
76  void build_mesh_refinement( libMesh::MeshBase& mesh );
77 
78  void set_refinement_type( const GetPot& input,
79  const MeshAdaptivityOptions& mesh_adaptivity_options,
80  RefinementFlaggingType& refinement_type );
81 
82  bool check_for_convergence( SolverContext& context,
83  const libMesh::ErrorVector& error ) const;
84 
85  void flag_elements_for_refinement( const libMesh::ErrorVector& error );
86 
87  void estimate_error_for_amr( SolverContext& context, libMesh::ErrorVector& error );
88 
89  void perform_amr( SolverContext& context, const libMesh::ErrorVector& error );
90 
91  private:
92 
94 
95  };
96 
97 } // end namespace GRINS
98 
99 #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 Tue Dec 19 2017 12:47:28 for GRINS-0.8.0 by  doxygen 1.8.9.1