101 mooseError(
"computeResidualAndDerivative has to be implemented if " 102 "automatic_differentiation_return_mapping = true.");
158 const Real reference_residual);
237 std::stringstream * iter_output =
nullptr);
265 std::stringstream * iter_output);
278 const Real init_resid_sign,
281 std::stringstream * iter_output);
bool _line_search
Whether to use line searches to improve convergence.
Real _acceptable_multiplier
Multiplier applied to relative and absolute tolerances for acceptable convergence.
virtual GenericReal< is_ad > computeDerivative(const GenericReal< is_ad > &, const GenericReal< is_ad > &)=0
Compute the derivative of the residual as a function of the scalar variable.
virtual void outputIterationStep(std::stringstream *iter_output, const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar, const Real reference_residual)
Output information for a single iteration step to build the convergence history of the model...
std::vector< Real > _residual_history
History of residuals used to check whether progress is still being made on decreasing the residual...
virtual GenericReal< is_ad > maximumPermissibleValue(const GenericReal< is_ad > &effective_trial_stress) const
Compute the maximum permissible value of the scalar.
void mooseError(Args &&... args)
virtual ~SingleVariableReturnMappingSolutionTempl()
bool convergedAcceptable(const unsigned int it, const Real reference)
Check to see whether the residual is within acceptable convergence limits.
Real _relative_tolerance
Relative convergence tolerance.
virtual void preStep(const GenericReal< is_ad > &, const GenericReal< is_ad > &, const GenericReal< is_ad > &)
This method is called before taking a step in the return mapping algorithm.
SolveState internalSolve(const GenericReal< is_ad > effective_trial_stress, GenericReal< is_ad > &scalar, std::stringstream *iter_output=nullptr)
Method called from within this class to perform the actual return mappping iterations.
const unsigned int _max_its
Maximum number of return mapping iterations.
void checkPermissibleRange(GenericReal< is_ad > &scalar, GenericReal< is_ad > &scalar_increment, const GenericReal< is_ad > &scalar_old, const GenericReal< is_ad > min_permissible_scalar, const GenericReal< is_ad > max_permissible_scalar, std::stringstream *iter_output)
Check to see whether solution is within admissible range, and set it within that range if it is not...
const bool _ad_derivative
static InputParameters validParams()
void updateBounds(const GenericReal< is_ad > &scalar, const GenericReal< is_ad > &residual, const Real init_resid_sign, GenericReal< is_ad > &scalar_upper_bound, GenericReal< is_ad > &scalar_lower_bound, std::stringstream *iter_output)
Update the upper and lower bounds of the root for the effective inelastic strain. ...
virtual GenericReal< is_ad > minimumPermissibleValue(const GenericReal< is_ad > &effective_trial_stress) const
Compute the minimum permissible value of the scalar.
virtual Real computeReferenceResidual(const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar)=0
Compute a reference quantity to be used for checking relative convergence.
void returnMappingSolve(const GenericReal< is_ad > &effective_trial_stress, GenericReal< is_ad > &scalar, const ConsoleStream &console)
Perform the return mapping iterations.
const bool _internal_solve_full_iteration_history
Whether to output iteration information all the time (regardless of whether iterations converge) ...
virtual void outputIterationSummary(std::stringstream *iter_output, const unsigned int total_it)
Output summary information for the convergence history of the model.
Base class that provides capability for Newton return mapping iterations on a single variable...
SingleVariableReturnMappingSolutionTempl< true > ADSingleVariableReturnMappingSolution
SingleVariableReturnMappingSolutionTempl(const InputParameters ¶meters)
typename Moose::GenericType< ChainedReal, is_ad > GenericChainedReal
void computeResidualAndDerivativeHelper(const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar)
Helper function to compute and set the _residual and _derivative.
Real _absolute_tolerance
Absolute convergence tolerance.
virtual GenericChainedReal< is_ad > computeResidualAndDerivative(const GenericReal< is_ad > &, const GenericChainedReal< is_ad > &)
Compute the residual and the derivative for a predicted value of the scalar.
bool _bracket_solution
Whether to save upper and lower bounds of root for scalar, and set solution to the midpoint between t...
GenericReal< is_ad > _initial_residual
Residual values, kept as members to retain solver state for summary outputting.
unsigned int _iteration
iteration number
virtual GenericReal< is_ad > computeResidual(const GenericReal< is_ad > &, const GenericReal< is_ad > &)=0
Compute the residual for a predicted value of the scalar.
GenericReal< is_ad > _derivative
Derivative of the residual.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
enum SingleVariableReturnMappingSolutionTempl::InternalSolveOutput _internal_solve_output_on
GenericReal< is_ad > _residual
bool converged(const GenericReal< is_ad > &residual, const Real reference)
Check to see whether the residual is within the convergence limits.
const std::string _svrms_name
MOOSE input name of the object performing the solve.
virtual void iterationFinalize(const GenericReal< is_ad > &)
Finalize internal state variables for a model for a given iteration.
typename Moose::GenericType< Real, is_ad > GenericReal
SingleVariableReturnMappingSolutionTempl< false > SingleVariableReturnMappingSolution
bool _check_range
Whether to check to see whether iterative solution is within admissible range, and set within that ra...
virtual GenericReal< is_ad > initialGuess(const GenericReal< is_ad > &)
Compute an initial guess for the value of the scalar.
const std::size_t _num_resids
Number of residuals to be stored in history.