$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_UNIFORM_REFINEMENT_ESTIMATOR_H 00021 #define LIBMESH_UNIFORM_REFINEMENT_ESTIMATOR_H 00022 00023 // Local Includes 00024 #include "libmesh/error_estimator.h" 00025 #include "libmesh/libmesh.h" 00026 00027 // C++ includes 00028 #include <cstddef> 00029 #include <vector> 00030 00031 #ifdef LIBMESH_ENABLE_AMR 00032 00033 namespace libMesh 00034 { 00035 00044 class UniformRefinementEstimator : public ErrorEstimator 00045 { 00046 public: 00047 00051 UniformRefinementEstimator() : 00052 ErrorEstimator(), 00053 number_h_refinements(1), 00054 number_p_refinements(0) 00055 { error_norm = H1; } 00056 00060 ~UniformRefinementEstimator() {} 00061 00062 00079 virtual void estimate_error (const System& system, 00080 ErrorVector& error_per_cell, 00081 const NumericVector<Number>* solution_vector = NULL, 00082 bool estimate_parent_error = false); 00083 00091 virtual void estimate_errors (const EquationSystems& equation_systems, 00092 ErrorVector& error_per_cell, 00093 const std::map<const System*, SystemNorm>& error_norms, 00094 const std::map<const System*, const NumericVector<Number>* >* solution_vectors = NULL, 00095 bool estimate_parent_error = false); 00096 00105 virtual void estimate_errors (const EquationSystems& equation_systems, 00106 ErrorMap& errors_per_cell, 00107 const std::map<const System*, const NumericVector<Number>* >* solution_vectors = NULL, 00108 bool estimate_parent_error = false); 00109 00113 unsigned char number_h_refinements; 00114 00118 unsigned char number_p_refinements; 00119 00120 protected: 00125 virtual void _estimate_error (const EquationSystems *equation_systems, 00126 const System* system, 00127 ErrorVector* error_per_cell, 00128 std::map<std::pair<const System*, unsigned int>, ErrorVector*>* errors_per_cell, 00129 const std::map<const System*, SystemNorm >* error_norms, 00130 const std::map<const System*, const NumericVector<Number>* >* solution_vectors = NULL, 00131 bool estimate_parent_error = false); 00132 }; 00133 00134 } // namespace libMesh 00135 00136 #endif // #ifdef LIBMESH_ENABLE_AMR 00137 00138 #endif // LIBMESH_UNIFORM_REFINEMENT_ESTIMATOR_H