jump_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_JUMP_ERROR_ESTIMATOR_H 00021 #define LIBMESH_JUMP_ERROR_ESTIMATOR_H 00022 00023 // Local Includes 00024 #include "libmesh/auto_ptr.h" 00025 #include "libmesh/dense_vector.h" 00026 #include "libmesh/error_estimator.h" 00027 #include "libmesh/fe_base.h" 00028 00029 // C++ includes 00030 #include <cstddef> 00031 #include <string> 00032 #include <vector> 00033 00034 namespace libMesh 00035 { 00036 00037 // Forward Declarations 00038 class Point; 00039 class Elem; 00040 00041 00042 00043 00044 00051 class JumpErrorEstimator : public ErrorEstimator 00052 { 00053 public: 00054 00058 JumpErrorEstimator() 00059 : scale_by_n_flux_faces(false), 00060 integrate_boundary_sides(false), 00061 fe_fine(NULL), fe_coarse(NULL) {} 00062 00066 virtual ~JumpErrorEstimator() {} 00067 00068 00075 virtual void estimate_error (const System& system, 00076 ErrorVector& error_per_cell, 00077 const NumericVector<Number>* solution_vector = NULL, 00078 bool estimate_parent_error = false); 00079 00088 bool scale_by_n_flux_faces; 00089 00090 protected: 00095 void reinit_sides(); 00096 00100 float coarse_n_flux_faces_increment(); 00101 00106 virtual void initialize(const System& system, 00107 ErrorVector& error_per_cell, 00108 bool estimate_parent_error); 00109 00114 virtual void internal_side_integration() = 0; 00115 00121 virtual bool boundary_side_integration() { return false; } 00122 00127 bool integrate_boundary_sides; 00128 00132 const Elem *fine_elem, *coarse_elem; 00133 00137 Real fine_error, coarse_error; 00138 00142 unsigned int fine_side; 00143 00147 unsigned int var; 00148 00152 DenseVector<Number> Ufine, Ucoarse; 00153 00157 AutoPtr<FEBase> fe_fine, fe_coarse; 00158 }; 00159 00160 00161 } // namespace libMesh 00162 00163 #endif // LIBMESH_JUMP_ERROR_ESTIMATOR_H 00164
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:47 UTC
Hosted By: