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 checkIterationType(IterationType it_type) const override;
28  virtual void initialize() override;
29  virtual void preExecute() override;
30 
31  virtual MooseConvergenceStatus checkConvergence(unsigned int iter) override;
32 
33 protected:
35  void outputResidualNorm(const std::string & execute_on_str, Real old_norm, Real new_norm) const;
36 
38  void computeCustomConvergencePostprocessor(unsigned int iter);
39 
41  unsigned int _min_fixed_point_its;
43  unsigned int _max_fixed_point_its;
49  const bool _accept_max_it;
58 
64  std::vector<Real> _fixed_point_timestep_end_norm;
65 
77  std::ostringstream _pp_history;
78 
83 };
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.
Real _pp_current
Value of the custom convergence check postprocessor from current iteration.
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:127
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...
Real _pp_previous
Value of the custom convergence check postprocessor from previous iteration.
const Real _fixed_point_abs_tol
Absolute tolerance on residual norm.
const PostprocessorValue *const _fixed_point_custom_pp_old
Postprocessor value for user-defined fixed point convergence check from previous timestep.
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
void computeCustomConvergencePostprocessor(unsigned int iter)
Computes and prints the user-specified postprocessor assessing convergence.
virtual void checkIterationType(IterationType it_type) const override
Perform checks related to the iteration type.
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.
Class for containing MooseEnum item information.
Definition: MooseEnumItem.h:18
const Real _custom_pp_abs_tol
Absolute tolerance on postprocessor value.
unsigned int _max_fixed_point_its
Maximum fixed point iterations.
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.