19#include "libmesh/enum_norm_type.h"
57 std::ostringstream & oss)
override;
74 const Real initial_residual_before_preset_bcs);
Default nonlinear convergence criteria for FEProblem.
const InputParameters & parameters() const
Get the parameters of the object.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Nonlinear system to be solved.
ReferenceVectorTagIDKey()
ReferenceVectorTagIDKey(const ReferenceVectorTagIDKey &)
Uses a reference residual to define relative convergence criteria.
virtual void nonlinearConvergenceSetup() override
Performs setup necessary for each call to checkConvergence.
bool checkConvergenceIndividVars(const Real fnorm, const Real abs_tol, const Real rel_tol, const Real initial_residual_before_preset_bcs)
Check the convergence by comparing the norm of each variable's residual separately against its refere...
ZeroReferenceType
Container for convergence treatment when the reference residual is zero.
virtual bool checkResidualConvergence(const unsigned int n_iter, const Real fnorm, const Real ref_norm, const Real rel_tol, const Real abs_tol, std::ostringstream &oss) override
Check the absolute and relative convergence of the nonlinear solution.
std::vector< AuxVariableName > _ref_resid_var_names
enum ReferenceResidualConvergence::ZeroReferenceType _zero_ref_type
std::vector< bool > _is_var_grouped
Vector of bools to signify if variable is in a group.
const unsigned int _accept_iters
const NumericVector< Number > * _reference_vector
The vector storing the reference residual values.
std::vector< unsigned int > _soln_vars
const bool _unscale_the_residual
Bool to unscale the residual before convergence checks and screen output.
const MooseEnum _norm_type_enum
Enum holding the normalization type.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
void updateReferenceResidual()
Computes the reference residuals for each group.
const unsigned int _nl_sys_num
Nonlinear system to which this convergence object applies.
virtual NonlinearSystemBase & nonlinearSystem() override
Nonlinear system whose convergence state should be checked.
TagID referenceVectorTagID(ReferenceVectorTagIDKey) const
Returns the tag ID associated with the reference vector tag ID key.
libMesh::FEMNormType _norm_type
Container for normalization type.
std::vector< NonlinearVariableName > _group_names
std::vector< bool > _converge_on_group
std::vector< unsigned int > _group_index
Group number index for each variable.
static InputParameters validParams()
std::vector< Real > _scaling_factors
Local storage for the scaling factors applied to each of the variables to apply to _ref_resid_vars.
std::vector< unsigned int > _ref_resid_vars
std::vector< bool > _converge_on_var
Flag for each solution variable or group being in 'converge_on'.
std::vector< Real > _group_ref_resid
const NumericVector< Number > * _residual_vector
The optional vector storing the reference residual values.
TagID _reference_vector_tag_id
The reference vector tag id.
bool _local_norm
Flag to optionally perform normalization of residual by reference residual before or after L2 norm is...
std::vector< Real > _group_resid
std::vector< NonlinearVariableName > _soln_var_names
Interface class shared between ReferenceResidualProblem and ReferenceResidualConvergence.