$extrastylesheet
adjoint_residual_error_estimator.h
Go to the documentation of this file.
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_ADJOINT_RESIDUAL_ERROR_ESTIMATOR_H
00021 #define LIBMESH_ADJOINT_RESIDUAL_ERROR_ESTIMATOR_H
00022 
00023 // Local Includes
00024 #include "libmesh/auto_ptr.h"
00025 #include "libmesh/error_estimator.h"
00026 #include "libmesh/qoi_set.h"
00027 
00028 // C++ includes
00029 #include <cstddef>
00030 #include <string>
00031 #include <vector>
00032 
00033 // Forward Declarations
00034 
00035 
00036 
00037 
00038 namespace libMesh
00039 {
00040 
00041 
00055 class AdjointResidualErrorEstimator : public ErrorEstimator
00056 {
00057 public:
00058 
00062   AdjointResidualErrorEstimator();
00063 
00067   ~AdjointResidualErrorEstimator() {}
00068 
00073   UniquePtr<ErrorEstimator> &primal_error_estimator() { return _primal_error_estimator; }
00074 
00079   UniquePtr<ErrorEstimator> &dual_error_estimator() { return _dual_error_estimator; }
00080 
00085   QoISet &qoi_set() { return _qoi_set; }
00086 
00091   const QoISet &qoi_set() const { return _qoi_set; }
00092 
00100   std::string error_plot_suffix;
00101 
00110   void estimate_error (const System& system,
00111                        ErrorVector& error_per_cell,
00112                        const NumericVector<Number>* solution_vector = NULL,
00113                        bool estimate_parent_error = false);
00114 
00115 protected:
00116 
00120   UniquePtr<ErrorEstimator> _primal_error_estimator;
00121 
00125   UniquePtr<ErrorEstimator> _dual_error_estimator;
00126 
00130   QoISet _qoi_set;
00131 };
00132 
00133 
00134 } // namespace libMesh
00135 
00136 #endif // LIBMESH_ADJOINT_RESIDUAL_ERROR_ESTIMATOR_H