https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
13
14class FEProblemBase;
15class FixedPointSolve;
16
21{
22public:
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 n_iter) override;
32
33protected:
35 void outputResidualNorm(const std::string & execute_on_str, Real old_norm, Real new_norm) const;
36
42 void computeCustomConvergencePostprocessor(unsigned int iter);
43
53 const bool _accept_max_it;
62
69
81 std::ostringstream _pp_history;
82
87};
Real PostprocessorValue
various MOOSE typedefs
Definition MooseTypes.h:230
MooseConvergenceStatus
Status returned by calls to checkConvergence.
Definition Convergence.h:34
Base class for default convergence criteria.
Default fixed point convergence criteria.
std::vector< Real > _fixed_point_timestep_begin_norm
Full history of residual norm after evaluation of timestep_begin, indexed by iteration index.
std::ostringstream _pp_history
Convergence history of the custom convergence check postprocessor.
unsigned int _min_fixed_point_its
Minimum fixed point iterations.
void computeCustomConvergencePostprocessor(unsigned int iter)
Computes and prints the user-specified postprocessor assessing convergence.
Real _pp_previous
Value of the custom convergence check postprocessor from previous iteration.
void outputResidualNorm(const std::string &execute_on_str, Real old_norm, Real new_norm) const
Outputs residual norm to console.
const PostprocessorValue *const _fixed_point_custom_pp_old
Postprocessor value for user-defined fixed point convergence check from previous timestep.
const Real _fixed_point_abs_tol
Absolute tolerance on residual norm.
virtual void preExecute() override
Method that gets called in each iteration before the solve.
std::vector< Real > _fixed_point_timestep_end_norm
Full history of residual norm after evaluation of timestep_end, indexed by iteration index.
unsigned int _max_fixed_point_its
Maximum fixed point iterations.
const bool _accept_max_it
Whether or not to treat reaching maximum number of fixed point iteration as converged.
const Real _custom_pp_rel_tol
Relative tolerance on postprocessor value.
Real _pp_scaling
Scaling of custom convergence check postprocessor (its initial value)
const bool _fixed_point_force_norms
Whether or not we force evaluation of residual norms even without multiapps.
virtual void initialize() override
Method that gets called before each iteration loop.
const Real _custom_pp_abs_tol
Absolute tolerance on postprocessor value.
virtual void checkIterationType(IterationType it_type) const override
Perform checks related to the iteration type.
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.
const Real _fixed_point_rel_tol
Relative tolerance on residual norm.
virtual MooseConvergenceStatus checkConvergence(unsigned int n_iter) override
Returns convergence status.
const PostprocessorValue *const _fixed_point_custom_pp
Postprocessor value for user-defined fixed point convergence check.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Class for containing MooseEnum item information.