uniform_refinement_estimator.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_UNIFORM_REFINEMENT_ESTIMATOR_H
21 #define LIBMESH_UNIFORM_REFINEMENT_ESTIMATOR_H
22 
23 // Local Includes
25 #include "libmesh/libmesh.h"
26 
27 // C++ includes
28 #include <cstddef>
29 #include <vector>
30 
31 #ifdef LIBMESH_ENABLE_AMR
32 
33 namespace libMesh
34 {
35 
46 {
47 public:
48 
53 
62  virtual ~UniformRefinementEstimator() = default;
63 
80  virtual void estimate_error (const System & system,
81  ErrorVector & error_per_cell,
82  const NumericVector<Number> * solution_vector = nullptr,
83  bool estimate_parent_error = false) override;
84 
92  virtual void estimate_errors (const EquationSystems & equation_systems,
93  ErrorVector & error_per_cell,
94  const std::map<const System *, SystemNorm> & error_norms,
95  const std::map<const System *, const NumericVector<Number> *> * solution_vectors = nullptr,
96  bool estimate_parent_error = false) override;
97 
106  virtual void estimate_errors (const EquationSystems & equation_systems,
107  ErrorMap & errors_per_cell,
108  const std::map<const System *, const NumericVector<Number> *> * solution_vectors = nullptr,
109  bool estimate_parent_error = false) override;
110 
111  virtual ErrorEstimatorType type() const override;
112 
116  unsigned char number_h_refinements;
117 
121  unsigned char number_p_refinements;
122 
123 protected:
128  virtual void _estimate_error (const EquationSystems * equation_systems,
129  const System * system,
130  ErrorVector * error_per_cell,
131  std::map<std::pair<const System *, unsigned int>, ErrorVector *> * errors_per_cell,
132  const std::map<const System *, SystemNorm > * error_norms,
133  const std::map<const System *, const NumericVector<Number> *> * solution_vectors = nullptr,
134  bool estimate_parent_error = false);
135 };
136 
137 } // namespace libMesh
138 
139 #endif // #ifdef LIBMESH_ENABLE_AMR
140 
141 #endif // LIBMESH_UNIFORM_REFINEMENT_ESTIMATOR_H
Manages multiples systems of equations.
UniformRefinementEstimator & operator=(const UniformRefinementEstimator &)=default
virtual void _estimate_error(const EquationSystems *equation_systems, const System *system, ErrorVector *error_per_cell, std::map< std::pair< const System *, unsigned int >, ErrorVector *> *errors_per_cell, const std::map< const System *, SystemNorm > *error_norms, const std::map< const System *, const NumericVector< Number > *> *solution_vectors=nullptr, bool estimate_parent_error=false)
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:92
virtual ~UniformRefinementEstimator()=default
std::map< std::pair< const System *, unsigned int >, ErrorVector * > ErrorMap
virtual void estimate_error(const System &system, ErrorVector &error_per_cell, const NumericVector< Number > *solution_vector=nullptr, bool estimate_parent_error=false) override
virtual void estimate_errors(const EquationSystems &equation_systems, ErrorVector &error_per_cell, const std::map< const System *, SystemNorm > &error_norms, const std::map< const System *, const NumericVector< Number > *> *solution_vectors=nullptr, bool estimate_parent_error=false) override
virtual ErrorEstimatorType type() const override