adjoint_refinement_estimator.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 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_REFINEMENT_ESTIMATOR_H
21 #define LIBMESH_ADJOINT_REFINEMENT_ESTIMATOR_H
22 
23 // Local Includes
25 #include "libmesh/libmesh.h"
26 #include "libmesh/qoi_set.h"
27 
28 // C++ includes
29 #include <cstddef>
30 #include <vector>
31 
32 #ifdef LIBMESH_ENABLE_AMR
33 
34 namespace libMesh
35 {
36 
47 {
48 public:
49 
57  _qoi_set(QoISet())
58  {
59  // We're not actually going to use error_norm; our norms are
60  // absolute values of QoI error.
62  }
63 
68 
73  QoISet &qoi_set() { return _qoi_set; }
74 
79  const QoISet &qoi_set() const { return _qoi_set; }
80 
97  virtual void estimate_error (const System& system,
98  ErrorVector& error_per_cell,
99  const NumericVector<Number>* solution_vector = NULL,
100  bool estimate_parent_error = false);
101 
106  Number &get_global_QoI_error_estimate(unsigned int qoi_index)
107  {
108  return computed_global_QoI_errors[qoi_index];
109  }
110 
114  unsigned char number_h_refinements;
115 
119  unsigned char number_p_refinements;
120 
121 protected:
122 
123  /* A vector to hold the computed global QoI error estimate */
124  std::vector<Number> computed_global_QoI_errors;
125 
126  /* /\** */
127  /* * The code for estimate_error and both estimate_errors versions is very */
128  /* * similar, so we use the same function for all three */
129  /* *\/ */
130  /* virtual void _estimate_error (const EquationSystems *equation_systems, */
131  /* const System* system, */
132  /* ErrorVector* error_per_cell, */
133  /* std::map<std::pair<const System*, unsigned int>, ErrorVector*>* errors_per_cell, */
134  /* const std::map<const System*, const NumericVector<Number>* >* solution_vectors = NULL, */
135  /* bool estimate_parent_error = false); */
136 
141 };
142 
143 } // namespace libMesh
144 
145  #endif // #ifdef LIBMESH_ENABLE_AMR
146 
147 #endif // LIBMESH_ADJOINT_REFINEMENT_ESTIMATOR_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:04 UTC

Hosted By:
SourceForge.net Logo