libMesh
adjoint_residual_error_estimator.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2017 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_ADJOINT_RESIDUAL_ERROR_ESTIMATOR_H
21 #define LIBMESH_ADJOINT_RESIDUAL_ERROR_ESTIMATOR_H
22 
23 // Local Includes
24 #include "libmesh/auto_ptr.h"
25 #include "libmesh/error_estimator.h"
26 #include "libmesh/qoi_set.h"
27 
28 // C++ includes
29 #include <cstddef>
30 #include <string>
31 #include <vector>
32 
33 // Forward Declarations
34 
35 
36 
37 
38 namespace libMesh
39 {
40 
41 
57 {
58 public:
59 
64 
69 
75 
81 
86  QoISet & qoi_set() { return _qoi_set; }
87 
92  const QoISet & qoi_set() const { return _qoi_set; }
93 
101  std::string error_plot_suffix;
102 
113  virtual void estimate_error (const System & system,
114  ErrorVector & error_per_cell,
115  const NumericVector<Number> * solution_vector = libmesh_nullptr,
116  bool estimate_parent_error = false) libmesh_override;
117 
118  virtual ErrorEstimatorType type() const libmesh_override
119  { return ADJOINT_RESIDUAL;}
120 
121 protected:
122 
127 
132 
137 };
138 
139 
140 } // namespace libMesh
141 
142 #endif // LIBMESH_ADJOINT_RESIDUAL_ERROR_ESTIMATOR_H
This class implements a goal oriented error indicator, by weighting residual-based estimates from the...
Data structure for specifying which Quantities of Interest should be calculated in an adjoint or a pa...
Definition: qoi_set.h:45
The ErrorVector is a specialization of the StatisticsVector for error data computed on a finite eleme...
Definition: error_vector.h:50
QoISet & qoi_set()
Access to the QoISet (default: weight all QoIs equally) to use when computing errors.
const class libmesh_nullptr_t libmesh_nullptr
QoISet _qoi_set
A QoISet to handle cases with multiple QoIs available.
UniquePtr< ErrorEstimator > & primal_error_estimator()
Access to the "subestimator" (default: PatchRecovery) to use on the primal/forward solution...
The libMesh namespace provides an interface to certain functionality in the library.
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
std::string error_plot_suffix
To aid in investigating error estimator behavior, set this string to a suffix with which to plot (pre...
This is the base class for classes which contain information related to any physical process that mig...
Definition: system.h:76
This class holds functions that will estimate the error in a finite element solution on a given mesh...
virtual ErrorEstimatorType type() const libmesh_override
UniquePtr< ErrorEstimator > _primal_error_estimator
An error estimator for the forward problem.
virtual void estimate_error(const System &system, ErrorVector &error_per_cell, const NumericVector< Number > *solution_vector=libmesh_nullptr, bool estimate_parent_error=false) libmesh_override
Compute the adjoint-weighted error on each element and place it in the error_per_cell vector...
UniquePtr< ErrorEstimator > & dual_error_estimator()
Access to the "subestimator" (default: PatchRecovery) to use on the dual/adjoint solution.
const QoISet & qoi_set() const
Access to the QoISet (default: weight all QoIs equally) to use when computing errors.
UniquePtr< ErrorEstimator > _dual_error_estimator
An error estimator for the adjoint problem.