error_vector.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_ERROR_VECTOR_H
21 #define LIBMESH_ERROR_VECTOR_H
22 
23 // Local Includes
24 #include "libmesh/statistics.h"
25 
26 // C++ includes
27 #include <cstddef>
28 
29 namespace libMesh
30 {
31 
32 // Now defined in libmesh_common.h:
33 // typedef float ErrorVectorReal;
34 
35 // Forward Declarations
36 class MeshBase;
37 class Mesh;
38 
52 class ErrorVector : public StatisticsVector<ErrorVectorReal>
53 {
54 
55 public:
56 
66 
77 
81  virtual ErrorVectorReal minimum() const;
82 
87  virtual Real mean() const;
88 
97  virtual Real median();
98 
104  virtual Real median() const;
105 
116  virtual Real variance() const
117  { return this->variance(this->mean()); }
118 
130  virtual Real variance(const Real mean) const;
131 
137  virtual std::vector<dof_id_type> cut_below(Real cut) const;
138 
144  virtual std::vector<dof_id_type> cut_above(Real cut) const;
145 
151  void plot_error(const std::string &filename,
152  const MeshBase& mesh) const;
153 
154 protected:
158  bool is_active_elem (dof_id_type i) const;
159 
165 };
166 
167 
168 } // namespace libMesh
169 
170 #endif // LIBMESH_ERROR_VECTOR_H

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

Hosted By:
SourceForge.net Logo