error_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_ERROR_ESTIMATOR_H 00021 #define LIBMESH_ERROR_ESTIMATOR_H 00022 00023 // Local Includes 00024 #include "libmesh/libmesh_common.h" 00025 #include "libmesh/system_norm.h" 00026 00027 // C++ includes 00028 #include <cstddef> 00029 #include <map> 00030 #include <string> 00031 #include <vector> 00032 00033 namespace libMesh 00034 { 00035 00036 // Forward Declarations 00037 class ErrorVector; 00038 class EquationSystems; 00039 class System; 00040 template <typename T> class NumericVector; 00041 00052 class ErrorEstimator 00053 { 00054 public: 00055 00060 ErrorEstimator() : error_norm() {} 00061 00065 virtual ~ErrorEstimator() {} 00066 00067 00081 virtual void estimate_error (const System& system, 00082 ErrorVector& error_per_cell, 00083 const NumericVector<Number>* solution_vector = NULL, 00084 bool estimate_parent_error = false) = 0; 00085 00097 virtual void estimate_errors (const EquationSystems& equation_systems, 00098 ErrorVector& error_per_cell, 00099 const std::map<const System*, SystemNorm>& error_norms, 00100 const std::map<const System*, const NumericVector<Number>* >* solution_vectors = NULL, 00101 bool estimate_parent_error = false); 00102 00107 typedef std::map<std::pair<const System*, unsigned int>, ErrorVector*> ErrorMap; 00108 00121 virtual void estimate_errors (const EquationSystems& equation_systems, 00122 ErrorMap& errors_per_cell, 00123 const std::map<const System*, const NumericVector<Number>* >* solution_vectors = NULL, 00124 bool estimate_parent_error = false); 00125 00139 SystemNorm error_norm; 00140 00141 protected: 00142 00148 void reduce_error (std::vector<float>& error_per_cell) const; 00149 }; 00150 00151 00152 } // namespace libMesh 00153 00154 #endif // LIBMESH_ERROR_ESTIMATOR_H 00155
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: