patch_recovery_error_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_PATCH_RECOVERY_ERROR_ESTIMATOR_H
21 #define LIBMESH_PATCH_RECOVERY_ERROR_ESTIMATOR_H
22 
23 // Local Includes
25 #include "libmesh/enum_order.h"
26 #include "libmesh/patch.h"
27 #include "libmesh/point.h"
28 #include "libmesh/elem_range.h"
29 
30 // C++ includes
31 #include <cstddef>
32 #include <vector>
33 
34 namespace libMesh
35 {
36 
37 // Forward Declarations
38 class Elem;
39 
40 
48 {
49 public:
50 
59  patch_growth_strategy(&Patch::add_local_face_neighbors),
60  patch_reuse(true)
61  { error_norm = H1_SEMINORM; }
62 
67 
68 
75  virtual void estimate_error (const System& system,
76  ErrorVector& error_per_cell,
77  const NumericVector<Number>* solution_vector = NULL,
78  bool estimate_parent_error = false);
79 
84  unsigned int target_patch_size;
85 
93 
94  void set_patch_reuse (bool );
95 
96  protected:
97 
102  static std::vector<Real> specpoly(const unsigned int dim,
103  const Order order,
104  const Point p,
105  const unsigned int matsize);
106 
107  bool patch_reuse ;
108 
109  private:
110 
116  {
117  public:
118  EstimateError (const System& sys,
119  const PatchRecoveryErrorEstimator &ee,
120  ErrorVector& epc) :
121  system(sys),
122  error_estimator(ee),
123  error_per_cell(epc)
124  {}
125 
126  void operator()(const ConstElemRange &range) const;
127 
133  private:
134 
135  const System &system;
138  };
139 
140  friend class EstimateError;
141 };
142 
143 
144 } // namespace libMesh
145 
146 
147 #endif // LIBMESH_PATCH_RECOVERY_ERROR_ESTIMATOR_H

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

Hosted By:
SourceForge.net Logo