uniform_refinement_estimator.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 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() : number_h_refinements(1), 00052 number_p_refinements(0) 00053 { error_norm = H1; } 00054 00058 ~UniformRefinementEstimator() {} 00059 00060 00077 virtual void estimate_error (const System& system, 00078 ErrorVector& error_per_cell, 00079 const NumericVector<Number>* solution_vector = NULL, 00080 bool estimate_parent_error = false); 00081 00089 virtual void estimate_errors (const EquationSystems& equation_systems, 00090 ErrorVector& error_per_cell, 00091 const std::map<const System*, SystemNorm>& error_norms, 00092 const std::map<const System*, const NumericVector<Number>* >* solution_vectors = NULL, 00093 bool estimate_parent_error = false); 00094 00103 virtual void estimate_errors (const EquationSystems& equation_systems, 00104 ErrorMap& errors_per_cell, 00105 const std::map<const System*, const NumericVector<Number>* >* solution_vectors = NULL, 00106 bool estimate_parent_error = false); 00107 00111 unsigned char number_h_refinements; 00112 00116 unsigned char number_p_refinements; 00117 00118 protected: 00123 virtual void _estimate_error (const EquationSystems *equation_systems, 00124 const System* system, 00125 ErrorVector* error_per_cell, 00126 std::map<std::pair<const System*, unsigned int>, ErrorVector*>* errors_per_cell, 00127 const std::map<const System*, SystemNorm >* error_norms, 00128 const std::map<const System*, const NumericVector<Number>* >* solution_vectors = NULL, 00129 bool estimate_parent_error = false); 00130 }; 00131 00132 } // namespace libMesh 00133 00134 #endif // #ifdef LIBMESH_ENABLE_AMR 00135 00136 #endif // LIBMESH_UNIFORM_REFINEMENT_ESTIMATOR_H 00137
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:49 UTC
Hosted By: