GRINS-0.7.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
solver
include
grins
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
32
#include "
grins/mesh_adaptivity_options.h
"
33
#include "
grins/error_estimator_options.h
"
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
51
class
MeshAdaptiveSolverBase
52
{
53
public
:
54
55
MeshAdaptiveSolverBase
(
const
GetPot& input );
56
57
virtual
~MeshAdaptiveSolverBase
(){}
58
59
protected
:
60
61
ErrorEstimatorOptions
_error_estimator_options
;
62
MeshAdaptivityOptions
_mesh_adaptivity_options
;
63
64
enum
RefinementFlaggingType
{
INVALID
= 0,
65
ERROR_TOLERANCE
,
66
N_ELEM_TARGET
,
67
ERROR_FRACTION
,
68
ELEM_FRACTION
,
69
MEAN_STD_DEV
};
70
71
RefinementFlaggingType
_refinement_type
;
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
92
MeshAdaptiveSolverBase
();
93
94
};
95
96
}
// end namespace GRINS
97
98
#endif // GRINS_MESH_ADAPTIVE_SOLVER_BASE_H
GRINS::MeshAdaptiveSolverBase::N_ELEM_TARGET
Definition:
mesh_adaptive_solver_base.h:66
GRINS::MeshAdaptiveSolverBase::set_refinement_type
void set_refinement_type(const GetPot &input, const MeshAdaptivityOptions &mesh_adaptivity_options, RefinementFlaggingType &refinement_type)
Definition:
mesh_adaptive_solver_base.C:64
error_estimator_options.h
GRINS::MeshAdaptiveSolverBase::MEAN_STD_DEV
Definition:
mesh_adaptive_solver_base.h:69
GRINS::MeshAdaptiveSolverBase::INVALID
Definition:
mesh_adaptive_solver_base.h:64
GRINS::MeshAdaptiveSolverBase::ERROR_FRACTION
Definition:
mesh_adaptive_solver_base.h:67
mesh_adaptivity_options.h
GRINS::MeshAdaptiveSolverBase::~MeshAdaptiveSolverBase
virtual ~MeshAdaptiveSolverBase()
Definition:
mesh_adaptive_solver_base.h:57
GRINS::MeshAdaptiveSolverBase::build_mesh_refinement
void build_mesh_refinement(libMesh::MeshBase &mesh)
Definition:
mesh_adaptive_solver_base.C:48
libMesh
Definition:
bc_builder.h:43
GRINS::MeshAdaptiveSolverBase::perform_amr
void perform_amr(SolverContext &context, const libMesh::ErrorVector &error)
Definition:
mesh_adaptive_solver_base.C:221
GRINS::MeshAdaptiveSolverBase::estimate_error_for_amr
void estimate_error_for_amr(SolverContext &context, libMesh::ErrorVector &error)
Definition:
mesh_adaptive_solver_base.C:205
GRINS::MeshAdaptiveSolverBase::ERROR_TOLERANCE
Definition:
mesh_adaptive_solver_base.h:65
GRINS::MeshAdaptiveSolverBase::check_for_convergence
bool check_for_convergence(SolverContext &context, const libMesh::ErrorVector &error) const
Definition:
mesh_adaptive_solver_base.C:120
GRINS
GRINS namespace.
Definition:
arrhenius_catalycity.h:31
GRINS::MeshAdaptiveSolverBase::flag_elements_for_refinement
void flag_elements_for_refinement(const libMesh::ErrorVector &error)
Definition:
mesh_adaptive_solver_base.C:153
GRINS::MeshAdaptivityOptions
Container for mesh adaptivity options.
Definition:
mesh_adaptivity_options.h:39
GRINS::ErrorEstimatorOptions
Container for ErrorEstimator options.
Definition:
error_estimator_options.h:37
GRINS::MeshAdaptiveSolverBase::ELEM_FRACTION
Definition:
mesh_adaptive_solver_base.h:68
GRINS::MeshAdaptiveSolverBase::_refinement_type
RefinementFlaggingType _refinement_type
Definition:
mesh_adaptive_solver_base.h:71
GRINS::MeshAdaptiveSolverBase::_error_estimator_options
ErrorEstimatorOptions _error_estimator_options
Definition:
mesh_adaptive_solver_base.h:61
GRINS::MeshAdaptiveSolverBase::MeshAdaptiveSolverBase
MeshAdaptiveSolverBase()
GRINS::SolverContext
Simple class to hold objects passed to Solver::solve.
Definition:
solver_context.h:50
GRINS::MeshAdaptiveSolverBase::_mesh_refinement
libMesh::UniquePtr< libMesh::MeshRefinement > _mesh_refinement
Definition:
mesh_adaptive_solver_base.h:73
GRINS::MeshAdaptiveSolverBase::RefinementFlaggingType
RefinementFlaggingType
Definition:
mesh_adaptive_solver_base.h:64
GRINS::MeshAdaptiveSolverBase
Definition:
mesh_adaptive_solver_base.h:51
GRINS::MeshAdaptiveSolverBase::_mesh_adaptivity_options
MeshAdaptivityOptions _mesh_adaptivity_options
Definition:
mesh_adaptive_solver_base.h:62
Generated on Thu Jun 2 2016 21:52:28 for GRINS-0.7.0 by
doxygen
1.8.10