https://mooseframework.inl.gov
DefaultMultiAppFixedPointConvergence.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 
12 #include "DefaultConvergenceBase.h"
13 
14 class FEProblemBase;
15 class FixedPointSolve;
16 
21 {
22 public:
24 
26 
27  virtual void initialize() override;
28  virtual void preExecute() override;
29 
30  virtual MooseConvergenceStatus checkConvergence(unsigned int iter) override;
31 
32 protected:
34  void outputResidualNorm(const std::string & execute_on_str, Real old_norm, Real new_norm) const;
35 
37  void computeCustomConvergencePostprocessor(unsigned int iter);
38 
40  unsigned int _min_fixed_point_its;
42  unsigned int _max_fixed_point_its;
48  const bool _accept_max_it;
57 
63  std::vector<Real> _fixed_point_timestep_end_norm;
64 
74  std::ostringstream _pp_history;
75 
80 };
const bool _fixed_point_force_norms
Whether or not we force evaluation of residual norms even without multiapps.
virtual void preExecute() override
Method that gets called in each iteration before the solve.
const bool _has_fixed_point_norm
Whether or not to use residual norm to check the fixed point convergence.
Base class for default convergence criteria.
virtual void initialize() override
Method that gets called before each iteration loop.
Real _pp_scaling
Scaling of custom convergence check postprocessor (its initial value)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const Real _fixed_point_abs_tol
Absolute tolerance on residual norm.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::vector< Real > _fixed_point_timestep_end_norm
Full history of residual norm after evaluation of timestep_end.
const PostprocessorValue *const _fixed_point_custom_pp
Postprocessor value for user-defined fixed point convergence check.
virtual MooseConvergenceStatus checkConvergence(unsigned int iter) override
Returns convergence status.
std::ostringstream _pp_history
Convergence history of the custom convergence check postprocessor.
unsigned int _min_fixed_point_its
Minimum fixed point iterations.
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:202
Real _pp_new
Current value of the custom convergence check postprocessor.
void computeCustomConvergencePostprocessor(unsigned int iter)
Computes and prints the user-specified postprocessor assessing convergence.
Real _pp_old
Old value of the custom convergence check postprocessor.
MooseConvergenceStatus
Status returned by calls to checkConvergence.
Definition: Convergence.h:33
const bool _accept_max_it
Whether or not to treat reaching maximum number of fixed point iteration as converged.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real _custom_pp_rel_tol
Relative tolerance on postprocessor value.
const Real _custom_pp_abs_tol
Absolute tolerance on postprocessor value.
unsigned int _max_fixed_point_its
Maximum fixed point iterations.
const InputParameters & parameters() const
Get the parameters of the object.
std::vector< Real > _fixed_point_timestep_begin_norm
Full history of residual norm after evaluation of timestep_begin.
DefaultMultiAppFixedPointConvergence(const InputParameters &parameters)
void outputResidualNorm(const std::string &execute_on_str, Real old_norm, Real new_norm) const
Outputs residual norm to console.
const Real _fixed_point_rel_tol
Relative tolerance on residual norm.
Default fixed point convergence criteria.