libMesh
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
libMesh::ErrorVector Class Reference

The ErrorVector is a specialization of the StatisticsVector for error data computed on a finite element mesh. More...

#include <error_vector.h>

Inheritance diagram for libMesh::ErrorVector:
[legend]

Public Member Functions

 ErrorVector (dof_id_type i=0, MeshBase *mesh=nullptr)
 ErrorVector constructor; sets initial length to i. More...
 
 ErrorVector (dof_id_type i, ErrorVectorReal val)
 ErrorVector constructor; sets initial length to i and initial values to val. More...
 
virtual ErrorVectorReal minimum () const override
 
virtual Real mean () const override
 
virtual Real median () override
 
virtual Real median () const override
 A const version of the median function. More...
 
virtual Real variance () const override
 
virtual Real variance (const Real mean) const override
 
virtual std::vector< dof_id_typecut_below (Real cut) const override
 
virtual std::vector< dof_id_typecut_above (Real cut) const override
 
void plot_error (const std::string &filename, const MeshBase &mesh) const
 Plots a data file, of a type determined by looking at the file extension in filename, of the error values on the active elements of mesh. More...
 
virtual Real l2_norm () const
 
virtual ErrorVectorReal maximum () const
 
virtual Real stddev () const
 
virtual Real stddev (const Real known_mean) const
 
void normalize ()
 Divides all entries by the largest entry and stores the result. More...
 
virtual void histogram (std::vector< dof_id_type > &bin_members, unsigned int n_bins=10)
 
virtual void histogram (std::vector< dof_id_type > &bin_members, unsigned int n_bins=10) const
 A const version of the histogram function. More...
 
void plot_histogram (const processor_id_type my_procid, const std::string &filename, unsigned int n_bins)
 Generates a Matlab/Octave style file which can be used to make a plot of the histogram having the desired number of bins. More...
 

Protected Member Functions

bool is_active_elem (dof_id_type i) const
 Utility function to decide whether element i is active. More...
 

Protected Attributes

MeshBase_mesh
 Pointer to the mesh, which may be used to decide which elements are active. More...
 

Detailed Description

The ErrorVector is a specialization of the StatisticsVector for error data computed on a finite element mesh.

In general, when computing the error on a mesh only the active elements are considered, but the ErrorVector is sized according to the total number of elements in the mesh. The ErrorVector is thus padded with zeros for all the inactive elements, and this must be taken into account when calculating the statistics. Since the error is a positive quantity this class assumes it contains positive data (i.e. min_val >= 0.).

Author
Benjamin S. Kirk
Date
2003

Definition at line 50 of file error_vector.h.

Constructor & Destructor Documentation

◆ ErrorVector() [1/2]

libMesh::ErrorVector::ErrorVector ( dof_id_type  i = 0,
MeshBase mesh = nullptr 
)
inline

ErrorVector constructor; sets initial length to i.

If mesh is not null, MeshBase::elem() and Elem::is_active() will be used to distinguish active and inactive elements. If mesh is null, ErrorVector will assume that all 0.0 error values correspond to inactive elements and all non-zero error values correspond to active elements.

Definition at line 62 of file error_vector.h.

62  :
63  StatisticsVector<ErrorVectorReal> (i),
64  _mesh(mesh)
65  {}

◆ ErrorVector() [2/2]

libMesh::ErrorVector::ErrorVector ( dof_id_type  i,
ErrorVectorReal  val 
)
inline

ErrorVector constructor; sets initial length to i and initial values to val.

If mesh is not null, MeshBase::elem() and Elem::is_active() will be used to distinguish active and inactive elements. If mesh is null, ErrorVector will assume that all 0.0 error values correspond to inactive elements and all non-zero error values correspond to active elements.

Definition at line 75 of file error_vector.h.

75  :
76  StatisticsVector<ErrorVectorReal> (i,val) {}

Member Function Documentation

◆ cut_above()

std::vector< dof_id_type > libMesh::ErrorVector::cut_above ( Real  cut) const
overridevirtual
Returns
A vector of dof_id_types which correspond to the indices of every member of the data set above the cutoff value cut ignoring inactive elements.

Reimplemented from libMesh::StatisticsVector< ErrorVectorReal >.

Definition at line 174 of file error_vector.C.

175 {
176  LOG_SCOPE ("cut_above()", "ErrorVector");
177 
178  const dof_id_type n = cast_int<dof_id_type>(this->size());
179 
180  std::vector<dof_id_type> cut_indices;
181  cut_indices.reserve(n/2); // Arbitrary
182 
183  for (dof_id_type i=0; i<n; i++)
184  if (this->is_active_elem(i))
185  {
186  if ((*this)[i] > cut)
187  {
188  cut_indices.push_back(i);
189  }
190  }
191 
192  return cut_indices;
193 }

References is_active_elem().

◆ cut_below()

std::vector< dof_id_type > libMesh::ErrorVector::cut_below ( Real  cut) const
overridevirtual
Returns
A vector of dof_id_types which correspond to the indices of every member of the data set below the cutoff value cut ignoring inactive elements.

Reimplemented from libMesh::StatisticsVector< ErrorVectorReal >.

Definition at line 150 of file error_vector.C.

151 {
152  LOG_SCOPE ("cut_below()", "ErrorVector");
153 
154  const dof_id_type n = cast_int<dof_id_type>(this->size());
155 
156  std::vector<dof_id_type> cut_indices;
157  cut_indices.reserve(n/2); // Arbitrary
158 
159  for (dof_id_type i=0; i<n; i++)
160  if (this->is_active_elem(i))
161  {
162  if ((*this)[i] < cut)
163  {
164  cut_indices.push_back(i);
165  }
166  }
167 
168  return cut_indices;
169 }

References is_active_elem().

◆ histogram() [1/2]

void libMesh::StatisticsVector< ErrorVectorReal >::histogram ( std::vector< dof_id_type > &  bin_members,
unsigned int  n_bins = 10 
)
virtualinherited
Returns
A histogram with n_bins bins for the data set.

For simplicity, the bins are assumed to be of uniform size. Upon return, the bin_members vector will contain unsigned integers which give the number of members in each bin. WARNING: This non-const function sorts the vector, changing its order. Source: GNU Scientific Library.

Definition at line 179 of file statistics.C.

181 {
182  // Must have at least 1 bin
183  libmesh_assert (n_bins>0);
184 
185  const dof_id_type n = cast_int<dof_id_type>(this->size());
186 
187  std::sort(this->begin(), this->end());
188 
189  // The StatisticsVector can hold both integer and float types.
190  // We will define all the bins, etc. using Reals.
191  Real min = static_cast<Real>(this->minimum());
192  Real max = static_cast<Real>(this->maximum());
193  Real bin_size = (max - min) / static_cast<Real>(n_bins);
194 
195  LOG_SCOPE ("histogram()", "StatisticsVector");
196 
197  std::vector<Real> bin_bounds(n_bins+1);
198  for (auto i : index_range(bin_bounds))
199  bin_bounds[i] = min + Real(i) * bin_size;
200 
201  // Give the last bin boundary a little wiggle room: we don't want
202  // it to be just barely less than the max, otherwise our bin test below
203  // may fail.
204  bin_bounds.back() += 1.e-6 * bin_size;
205 
206  // This vector will store the number of members each bin has.
207  bin_members.resize(n_bins);
208 
209  dof_id_type data_index = 0;
210  for (auto j : index_range(bin_members)) // bin vector indexing
211  {
212  // libMesh::out << "(debug) Filling bin " << j << std::endl;
213 
214  for (dof_id_type i=data_index; i<n; i++) // data vector indexing
215  {
216  //libMesh::out << "(debug) Processing index=" << i << std::endl;
217  Real current_val = static_cast<Real>( (*this)[i] );
218 
219  // There may be entries in the vector smaller than the value
220  // reported by this->minimum(). (e.g. inactive elements in an
221  // ErrorVector.) We just skip entries like that.
222  if (current_val < min)
223  {
224  // libMesh::out << "(debug) Skipping entry v[" << i << "]="
225  // << (*this)[i]
226  // << " which is less than the min value: min="
227  // << min << std::endl;
228  continue;
229  }
230 
231  if (current_val > bin_bounds[j+1]) // if outside the current bin (bin[j] is bounded
232  // by bin_bounds[j] and bin_bounds[j+1])
233  {
234  // libMesh::out.precision(16);
235  // libMesh::out.setf(std::ios_base::fixed);
236  // libMesh::out << "(debug) (*this)[i]= " << (*this)[i]
237  // << " is greater than bin_bounds[j+1]="
238  // << bin_bounds[j+1] << std::endl;
239  data_index = i; // start searching here for next bin
240  break; // go to next bin
241  }
242 
243  // Otherwise, increment current bin's count
244  bin_members[j]++;
245  // libMesh::out << "(debug) Binned index=" << i << std::endl;
246  }
247  }
248 
249 #ifdef DEBUG
250  // Check the number of binned entries
251  const dof_id_type n_binned = std::accumulate(bin_members.begin(),
252  bin_members.end(),
253  static_cast<dof_id_type>(0),
254  std::plus<dof_id_type>());
255 
256  if (n != n_binned)
257  {
258  libMesh::out << "Warning: The number of binned entries, n_binned="
259  << n_binned
260  << ", did not match the total number of entries, n="
261  << n << "." << std::endl;
262  }
263 #endif
264 }

◆ histogram() [2/2]

void libMesh::StatisticsVector< ErrorVectorReal >::histogram ( std::vector< dof_id_type > &  bin_members,
unsigned int  n_bins = 10 
) const
virtualinherited

A const version of the histogram function.

Definition at line 314 of file statistics.C.

316 {
317  StatisticsVector<T> sv = (*this);
318 
319  return sv.histogram(bin_members, n_bins);
320 }

◆ is_active_elem()

bool libMesh::ErrorVector::is_active_elem ( dof_id_type  i) const
protected

Utility function to decide whether element i is active.

Definition at line 197 of file error_vector.C.

198 {
199  libmesh_assert_less (i, this->size());
200 
201  if (_mesh)
202  {
203  return _mesh->elem_ptr(i)->active();
204  }
205  else
206  return ((*this)[i] != 0.);
207 }

References _mesh, libMesh::Elem::active(), and libMesh::MeshBase::elem_ptr().

Referenced by cut_above(), cut_below(), mean(), median(), minimum(), and variance().

◆ l2_norm()

Real libMesh::StatisticsVector< ErrorVectorReal >::l2_norm ( ) const
virtualinherited
Returns
The l2 norm of the data set.

Definition at line 37 of file statistics.C.

38 {
39  Real normsq = 0.;
40  const dof_id_type n = cast_int<dof_id_type>(this->size());
41  for (dof_id_type i = 0; i != n; ++i)
42  normsq += ((*this)[i] * (*this)[i]);
43 
44  return std::sqrt(normsq);
45 }

◆ maximum()

ErrorVectorReal libMesh::StatisticsVector< ErrorVectorReal >::maximum ( ) const
virtualinherited
Returns
The maximum value in the data set.

Definition at line 62 of file statistics.C.

63 {
64  LOG_SCOPE ("maximum()", "StatisticsVector");
65 
66  const T max = *(std::max_element(this->begin(), this->end()));
67 
68  return max;
69 }

◆ mean()

Real libMesh::ErrorVector::mean ( ) const
overridevirtual
Returns
The mean value of the data set. Ignores zero values.

Reimplemented from libMesh::StatisticsVector< ErrorVectorReal >.

Definition at line 69 of file error_vector.C.

70 {
71  LOG_SCOPE ("mean()", "ErrorVector");
72 
73  const dof_id_type n = cast_int<dof_id_type>(this->size());
74 
75  Real the_mean = 0;
76  dof_id_type nnz = 0;
77 
78  for (dof_id_type i=0; i<n; i++)
79  if (this->is_active_elem(i))
80  {
81  the_mean += ( static_cast<Real>((*this)[i]) - the_mean ) / (nnz + 1);
82 
83  nnz++;
84  }
85 
86  return the_mean;
87 }

References is_active_elem(), and libMesh::Real.

Referenced by libMesh::MeshRefinement::flag_elements_by_mean_stddev(), main(), and variance().

◆ median() [1/2]

Real libMesh::ErrorVector::median ( ) const
overridevirtual

A const version of the median function.

Requires twice the memory of original data set but does not change the original.

Reimplemented from libMesh::StatisticsVector< ErrorVectorReal >.

Definition at line 116 of file error_vector.C.

117 {
118  ErrorVector ev = (*this);
119 
120  return ev.median();
121 }

References median().

◆ median() [2/2]

Real libMesh::ErrorVector::median ( )
overridevirtual
Returns
The median (e.g. the middle) value of the data set, ignoring inactive elements.

This function modifies the original data by sorting, so it can't be called on const objects. Source: GNU Scientific Library

Reimplemented from libMesh::StatisticsVector< ErrorVectorReal >.

Definition at line 92 of file error_vector.C.

93 {
94  const dof_id_type n = cast_int<dof_id_type>(this->size());
95 
96  if (n == 0)
97  return 0.;
98 
99 
100  // Build a StatisticsVector<ErrorVectorReal> containing
101  // only our active entries and take its mean
102  StatisticsVector<ErrorVectorReal> sv;
103 
104  sv.reserve (n);
105 
106  for (dof_id_type i=0; i<n; i++)
107  if (this->is_active_elem(i))
108  sv.push_back((*this)[i]);
109 
110  return sv.median();
111 }

References is_active_elem(), and libMesh::StatisticsVector< T >::median().

Referenced by median().

◆ minimum()

ErrorVectorReal libMesh::ErrorVector::minimum ( ) const
overridevirtual
Returns
The minimum nonzero value in the data set.

Reimplemented from libMesh::StatisticsVector< ErrorVectorReal >.

Definition at line 46 of file error_vector.C.

47 {
48  LOG_SCOPE ("minimum()", "ErrorVector");
49 
50  const dof_id_type n = cast_int<dof_id_type>(this->size());
51  ErrorVectorReal min = std::numeric_limits<ErrorVectorReal>::max();
52 
53  for (dof_id_type i=0; i<n; i++)
54  {
55  // Only positive (or zero) values in the error vector
56  libmesh_assert_greater_equal ((*this)[i], 0.);
57  if (this->is_active_elem(i))
58  min = std::min (min, (*this)[i]);
59  }
60 
61  // ErrorVectors are for positive values
62  libmesh_assert_greater_equal (min, 0.);
63 
64  return min;
65 }

References libMesh::ErrorVectorReal, and is_active_elem().

◆ normalize()

void libMesh::StatisticsVector< ErrorVectorReal >::normalize ( )
inherited

Divides all entries by the largest entry and stores the result.

Definition at line 165 of file statistics.C.

166 {
167  const dof_id_type n = cast_int<dof_id_type>(this->size());
168  const Real max = this->maximum();
169 
170  for (dof_id_type i=0; i<n; i++)
171  (*this)[i] = static_cast<T>((*this)[i] / max);
172 }

◆ plot_error()

void libMesh::ErrorVector::plot_error ( const std::string &  filename,
const MeshBase mesh 
) const

Plots a data file, of a type determined by looking at the file extension in filename, of the error values on the active elements of mesh.

Definition at line 210 of file error_vector.C.

212 {
213  std::unique_ptr<MeshBase> meshptr = oldmesh.clone();
214  MeshBase & mesh = *meshptr;
215 
216  // The all_first_order routine will prepare_for_use(), which would
217  // break our ordering if elements get changed.
218  mesh.allow_renumbering(false);
219  mesh.all_first_order();
220 
221 #ifdef LIBMESH_ENABLE_AMR
222  // We don't want p elevation when plotting a single constant value
223  // per element
224  for (auto & elem : mesh.element_ptr_range())
225  {
226  elem->set_p_refinement_flag(Elem::DO_NOTHING);
227  elem->set_p_level(0);
228  }
229 #endif // LIBMESH_ENABLE_AMR
230 
231  EquationSystems temp_es (mesh);
232  ExplicitSystem & error_system
233  = temp_es.add_system<ExplicitSystem> ("Error");
234  error_system.add_variable("error", CONSTANT, MONOMIAL);
235  temp_es.init();
236 
237  const DofMap & error_dof_map = error_system.get_dof_map();
238  std::vector<dof_id_type> dof_indices;
239 
240  for (const auto & elem : mesh.active_local_element_ptr_range())
241  {
242  error_dof_map.dof_indices(elem, dof_indices);
243 
244  const dof_id_type elem_id = elem->id();
245 
246  //0 for the monomial basis
247  const dof_id_type solution_index = dof_indices[0];
248 
249  // libMesh::out << "elem_number=" << elem_number << std::endl;
250  libmesh_assert_less (elem_id, (*this).size());
251 
252  // We may have zero error values in special circumstances
253  // libmesh_assert_greater ((*this)[elem_id], 0.);
254  error_system.solution->set(solution_index, (*this)[elem_id]);
255  }
256 
257  error_system.solution->close();
258 
259  // We may have to renumber if the original numbering was not
260  // contiguous. Since this is just a temporary mesh, that's probably
261  // fine.
262  if (mesh.max_elem_id() != mesh.n_elem() ||
263  mesh.max_node_id() != mesh.n_nodes())
264  {
265  mesh.allow_renumbering(true);
266  mesh.renumber_nodes_and_elements();
267  }
268 
269  if (filename.rfind(".gmv") < filename.size())
270  {
271  GMVIO(mesh).write_discontinuous_gmv(filename,
272  temp_es, false);
273  }
274  else if (filename.rfind(".plt") < filename.size())
275  {
276  TecplotIO (mesh).write_equation_systems
277  (filename, temp_es);
278  }
279 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API)
280  else if ((filename.rfind(".nem") < filename.size()) ||
281  (filename.rfind(".n") < filename.size()))
282  {
283  Nemesis_IO io(mesh);
284  io.write(filename);
285  io.write_element_data(temp_es);
286  }
287 #endif
288 #ifdef LIBMESH_HAVE_EXODUS_API
289  else if ((filename.rfind(".exo") < filename.size()) ||
290  (filename.rfind(".e") < filename.size()))
291  {
292  ExodusII_IO io(mesh);
293  io.write(filename);
294  io.write_element_data(temp_es);
295  }
296 #endif
297  else if (filename.rfind(".xda") < filename.size())
298  {
299  XdrIO(mesh).write("mesh-"+filename);
300  temp_es.write("soln-"+filename,WRITE,
303  }
304  else if (filename.rfind(".xdr") < filename.size())
305  {
306  XdrIO(mesh,true).write("mesh-"+filename);
307  temp_es.write("soln-"+filename,ENCODE,
310  }
311  else
312  {
313  libmesh_here();
314  libMesh::err << "Warning: ErrorVector::plot_error currently only"
315  << " supports .gmv, .plt, .xdr/.xda, and .exo/.e (if enabled) output;" << std::endl;
316  libMesh::err << "Could not recognize filename: " << filename
317  << std::endl;
318  }
319 }

References libMesh::EquationSystems::add_system(), libMesh::System::add_variable(), libMesh::MeshBase::clone(), libMesh::CONSTANT, libMesh::Elem::DO_NOTHING, libMesh::DofMap::dof_indices(), libMesh::ENCODE, libMesh::err, libMesh::System::get_dof_map(), libMesh::EquationSystems::init(), mesh, libMesh::MONOMIAL, libMesh::System::solution, libMesh::WRITE, libMesh::Nemesis_IO::write(), libMesh::ExodusII_IO::write(), libMesh::XdrIO::write(), libMesh::EquationSystems::write(), libMesh::EquationSystems::WRITE_ADDITIONAL_DATA, libMesh::EquationSystems::WRITE_DATA, libMesh::GMVIO::write_discontinuous_gmv(), libMesh::Nemesis_IO::write_element_data(), libMesh::ExodusII_IO::write_element_data(), and libMesh::MeshOutput< MT >::write_equation_systems().

Referenced by libMesh::AdjointResidualErrorEstimator::estimate_error(), and main().

◆ plot_histogram()

void libMesh::StatisticsVector< ErrorVectorReal >::plot_histogram ( const processor_id_type  my_procid,
const std::string &  filename,
unsigned int  n_bins 
)
inherited

Generates a Matlab/Octave style file which can be used to make a plot of the histogram having the desired number of bins.

Uses the histogram(...) function in this class WARNING: The histogram(...) function is non-const, and changes the order of the vector.

Definition at line 271 of file statistics.C.

274 {
275  // First generate the histogram with the desired number of bins
276  std::vector<dof_id_type> bin_members;
277  this->histogram(bin_members, n_bins);
278 
279  // The max, min and bin size are used to generate x-axis values.
280  T min = this->minimum();
281  T max = this->maximum();
282  T bin_size = (max - min) / static_cast<T>(n_bins);
283 
284  // On processor 0: Write histogram to file
285  if (my_procid==0)
286  {
287  std::ofstream out_stream (filename.c_str());
288 
289  out_stream << "clear all\n";
290  out_stream << "clf\n";
291  //out_stream << "x=linspace(" << min << "," << max << "," << n_bins+1 << ");\n";
292 
293  // abscissa values are located at the center of each bin.
294  out_stream << "x=[";
295  for (auto i : index_range(bin_members))
296  {
297  out_stream << min + (Real(i)+0.5)*bin_size << " ";
298  }
299  out_stream << "];\n";
300 
301  out_stream << "y=[";
302  for (auto bmi : bin_members)
303  {
304  out_stream << bmi << " ";
305  }
306  out_stream << "];\n";
307  out_stream << "bar(x,y);\n";
308  }
309 }

◆ stddev() [1/2]

virtual Real libMesh::StatisticsVector< ErrorVectorReal >::stddev ( ) const
inlinevirtualinherited
Returns
The standard deviation of the data set, which is simply the square-root of the variance.

Definition at line 154 of file statistics.h.

155  { return std::sqrt(this->variance()); }

◆ stddev() [2/2]

virtual Real libMesh::StatisticsVector< ErrorVectorReal >::stddev ( const Real  known_mean) const
inlinevirtualinherited
Returns
Computes the standard deviation of the data set, which is simply the square-root of the variance.

This method can be used for efficiency when the mean has already been computed.

Definition at line 164 of file statistics.h.

165  { return std::sqrt(this->variance(known_mean)); }

◆ variance() [1/2]

virtual Real libMesh::ErrorVector::variance ( ) const
inlineoverridevirtual
Returns
The variance of the data set ignoring inactive elements.

Uses a recurrence relation to prevent data overflow for large sums.

Note
The variance is equal to the standard deviation squared. The variance is normalized by N in this case. Source: GNU Scientific Library.

Reimplemented from libMesh::StatisticsVector< ErrorVectorReal >.

Definition at line 115 of file error_vector.h.

116  { return this->variance(this->mean()); }

References mean().

Referenced by libMesh::MeshRefinement::flag_elements_by_mean_stddev(), and main().

◆ variance() [2/2]

Real libMesh::ErrorVector::variance ( const Real  mean) const
overridevirtual
Returns
The variance of the data set ignoring inactive elements and given the mean.

This is useful for efficiency when you have already calculated the mean. Uses a recurrence relation to prevent data overflow for large sums.

Note
The variance is equal to the standard deviation squared. Source: GNU Scientific Library.

Reimplemented from libMesh::StatisticsVector< ErrorVectorReal >.

Definition at line 126 of file error_vector.C.

127 {
128  const dof_id_type n = cast_int<dof_id_type>(this->size());
129 
130  LOG_SCOPE ("variance()", "ErrorVector");
131 
132  Real the_variance = 0;
133  dof_id_type nnz = 0;
134 
135  for (dof_id_type i=0; i<n; i++)
136  if (this->is_active_elem(i))
137  {
138  const Real delta = ( static_cast<Real>((*this)[i]) - mean_in );
139  the_variance += (delta * delta - the_variance) / (nnz + 1);
140 
141  nnz++;
142  }
143 
144  return the_variance;
145 }

References is_active_elem(), and libMesh::Real.

Member Data Documentation

◆ _mesh

MeshBase* libMesh::ErrorVector::_mesh
protected

Pointer to the mesh, which may be used to decide which elements are active.

Definition at line 163 of file error_vector.h.

Referenced by is_active_elem().


The documentation for this class was generated from the following files:
libMesh::dof_id_type
uint8_t dof_id_type
Definition: id_types.h:67
libMesh::EquationSystems::WRITE_DATA
Definition: equation_systems.h:93
libMesh::ErrorVectorReal
DIE A HORRIBLE DEATH HERE typedef float ErrorVectorReal
Definition: libmesh_common.h:206
libMesh::index_range
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:106
libMesh::StatisticsVector< ErrorVectorReal >::variance
virtual Real variance() const
Definition: statistics.h:134
end
IterBase * end
Also have a polymorphic pointer to the end object, this prevents iterating past the end.
Definition: variant_filter_iterator.h:343
std::sqrt
MetaPhysicL::DualNumber< T, D > sqrt(const MetaPhysicL::DualNumber< T, D > &in)
libMesh::StatisticsVector< ErrorVectorReal >::histogram
virtual void histogram(std::vector< dof_id_type > &bin_members, unsigned int n_bins=10)
Definition: statistics.C:179
libMesh::WRITE
Definition: enum_xdr_mode.h:40
libMesh::ErrorVector::_mesh
MeshBase * _mesh
Pointer to the mesh, which may be used to decide which elements are active.
Definition: error_vector.h:163
mesh
MeshBase & mesh
Definition: mesh_communication.C:1257
libMesh::MeshBase::elem_ptr
virtual const Elem * elem_ptr(const dof_id_type i) const =0
libMesh::Elem::active
bool active() const
Definition: elem.h:2345
libMesh::libmesh_assert
libmesh_assert(ctx)
libMesh::ErrorVector::is_active_elem
bool is_active_elem(dof_id_type i) const
Utility function to decide whether element i is active.
Definition: error_vector.C:197
libMesh::CONSTANT
Definition: enum_order.h:41
libMesh::Elem::DO_NOTHING
Definition: elem.h:1170
libMesh::MONOMIAL
Definition: enum_fe_family.h:39
libMesh::ENCODE
Definition: enum_xdr_mode.h:38
libMesh::ErrorVector::mean
virtual Real mean() const override
Definition: error_vector.C:69
libMesh::StatisticsVector< ErrorVectorReal >::minimum
virtual ErrorVectorReal minimum() const
Definition: statistics.C:49
libMesh::EquationSystems::WRITE_ADDITIONAL_DATA
Definition: equation_systems.h:94
libMesh::err
OStreamProxy err
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::out
OStreamProxy out
libMesh::ErrorVector::variance
virtual Real variance() const override
Definition: error_vector.h:115
libMesh::ErrorVector::ErrorVector
ErrorVector(dof_id_type i=0, MeshBase *mesh=nullptr)
ErrorVector constructor; sets initial length to i.
Definition: error_vector.h:62
libMesh::StatisticsVector< ErrorVectorReal >::maximum
virtual ErrorVectorReal maximum() const
Definition: statistics.C:62