https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
19public:
21
23
24 virtual void initialSetup() override;
25 virtual MooseConvergenceStatus checkConvergenceInner(unsigned int n_iter) override;
26
27protected:
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};
MooseConvergenceStatus
Status returned by calls to checkConvergence.
Definition Convergence.h:34
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Checks convergence based on the iteration count.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Converges if multiple post-processors are all less than tolerances.
unsigned int getMaxDescriptionLength() const
Returns the maximum description length.
std::string comparisonLine(const std::string &description, const Real err, const Real tol) const
Generates a colored line for a tolerance comparison.
unsigned int _max_desc_length
Maximum description length.
const std::vector< Real > & _tolerances
Tolerance for each Postprocessor.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
virtual MooseConvergenceStatus checkConvergenceInner(unsigned int n_iter) override
Inner check of convergence.
std::vector< const PostprocessorValue * > _pp_values
Postprocessor values.
std::vector< std::string > _descriptions
Description of each Postprocessor.