https://mooseframework.inl.gov
MultiPostprocessorConvergence.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
13 
18 {
19 public:
21 
23 
24  virtual void initialSetup() override;
25  virtual MooseConvergenceStatus checkConvergenceInner(unsigned int iter) override;
26 
27 protected:
29  unsigned int getMaxDescriptionLength() const;
30 
32  std::string comparisonLine(const std::string & description, const Real err, const Real tol) const;
33 
35  std::vector<const PostprocessorValue *> _pp_values;
37  std::vector<std::string> _descriptions;
39  const std::vector<Real> & _tolerances;
40 
42  unsigned int _max_desc_length;
43 };
std::vector< const PostprocessorValue * > _pp_values
Postprocessor values.
OStreamProxy err
const std::vector< Real > & _tolerances
Tolerance for each Postprocessor.
unsigned int _max_desc_length
Maximum description length.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
unsigned int getMaxDescriptionLength() const
Returns the maximum description length.
MultiPostprocessorConvergence(const InputParameters &parameters)
std::string comparisonLine(const std::string &description, const Real err, const Real tol) const
Generates a colored line for a tolerance comparison.
MooseConvergenceStatus
Status returned by calls to checkConvergence.
Definition: Convergence.h:33
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Converges if multiple post-processors are all less than tolerances.
virtual MooseConvergenceStatus checkConvergenceInner(unsigned int iter) override
Inner check of convergence.
std::vector< std::string > _descriptions
Description of each Postprocessor.
Checks convergence based on the iteration count.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...