Base class that provides capability for Newton generalized (anisotropic) return mapping iterations on a single variable. More...
#include <GeneralizedReturnMappingSolution.h>
Public Member Functions | |
GeneralizedReturnMappingSolutionTempl (const InputParameters ¶meters) | |
virtual | ~GeneralizedReturnMappingSolutionTempl () |
Static Public Member Functions | |
static InputParameters | validParams () |
Protected Member Functions | |
void | returnMappingSolve (const GenericDenseVector< is_ad > &effective_trial_stress, const GenericDenseVector< is_ad > &stress_new, GenericReal< is_ad > &scalar, const ConsoleStream &console) |
Perform the return mapping iterations. More... | |
virtual GenericReal< is_ad > | minimumPermissibleValue (const GenericDenseVector< is_ad > &effective_trial_stress) const |
Compute the minimum permissible value of the scalar. More... | |
virtual GenericReal< is_ad > | maximumPermissibleValue (const GenericDenseVector< is_ad > &effective_trial_stress) const |
Compute the maximum permissible value of the scalar. More... | |
virtual GenericReal< is_ad > | initialGuess (const GenericDenseVector< is_ad > &) |
Compute an initial guess for the value of the scalar. More... | |
virtual GenericReal< is_ad > | computeResidual (const GenericDenseVector< is_ad > &effective_trial_stress, const GenericDenseVector< is_ad > &stress_new, const GenericReal< is_ad > &delta_gamma)=0 |
Compute the residual for a predicted value of the scalar. More... | |
virtual Real | computeReferenceResidual (const GenericDenseVector< is_ad > &effective_trial_stress, const GenericDenseVector< is_ad > &stress_new, const GenericReal< is_ad > &residual, const GenericReal< is_ad > &scalar_effective_inelastic_strain)=0 |
Compute a reference quantity to be used for checking relative convergence. More... | |
virtual GenericReal< is_ad > | computeDerivative (const GenericDenseVector< is_ad > &effective_trial_stress, const GenericDenseVector< is_ad > &stress_new, const GenericReal< is_ad > &scalar)=0 |
virtual void | iterationFinalize (const GenericReal< is_ad > &) |
Finalize internal state variables for a model for a given iteration. More... | |
virtual void | outputIterationSummary (std::stringstream *iter_output, const unsigned int total_it) |
Output summary information for the convergence history of the model. More... | |
virtual void | outputIterationStep (std::stringstream *iter_output, const GenericDenseVector< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar, const GenericReal< is_ad > reference_residual) |
Output information for a single iteration step to build the convergence history of the model. More... | |
bool | converged (const GenericReal< is_ad > &residual, const Real &reference) |
Check to see whether the residual is within the convergence limits. More... | |
Protected Attributes | |
bool | _check_range |
Whether to check to see whether iterative solution is within admissible range, and set within that range if outside. More... | |
bool | _line_search |
Whether to use line searches to improve convergence. More... | |
bool | _bracket_solution |
Whether to save upper and lower bounds of root for scalar, and set solution to the midpoint between those bounds if outside them. More... | |
Private Member Functions | |
SolveState | internalSolve (const GenericDenseVector< is_ad > &effective_trial_stress, const GenericDenseVector< is_ad > &stress_new, GenericReal< is_ad > &scalar, std::stringstream *iter_output=nullptr) |
Method called from within this class to perform the actual return mappping iterations. More... | |
bool | convergedAcceptable (const unsigned int it, const Real &reference) |
Check to see whether the residual is within acceptable convergence limits. More... | |
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. More... | |
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. More... | |
Private Attributes | |
enum GeneralizedReturnMappingSolutionTempl::InternalSolveOutput | _internal_solve_output_on |
const unsigned int | _max_its |
Maximum number of return mapping iterations. More... | |
const bool | _internal_solve_full_iteration_history |
Whether to output iteration information all the time (regardless of whether iterations converge) More... | |
Real | _relative_tolerance |
Relative convergence tolerance. More... | |
Real | _absolute_tolerance |
Absolute convergence tolerance. More... | |
Real | _acceptable_multiplier |
Multiplier applied to relative and absolute tolerances for acceptable convergence. More... | |
const std::size_t | _num_resids |
Number of residuals to be stored in history. More... | |
std::vector< Real > | _residual_history |
History of residuals used to check whether progress is still being made on decreasing the residual. More... | |
unsigned int | _iteration |
iteration number More... | |
const std::string | _svrms_name |
MOOSE input name of the object performing the solve. More... | |
GenericReal< is_ad > | _initial_residual |
Residual values, kept as members to retain solver state for summary outputting. More... | |
GenericReal< is_ad > | _residual |
Base class that provides capability for Newton generalized (anisotropic) return mapping iterations on a single variable.
Definition at line 22 of file GeneralizedReturnMappingSolution.h.
|
strongprivate |
Enumerator | |
---|---|
NEVER | |
ON_ERROR | |
ALWAYS |
Definition at line 143 of file GeneralizedReturnMappingSolution.h.
|
strongprivate |
Enumerator | |
---|---|
SUCCESS | |
NAN_INF | |
EXCEEDED_ITERATIONS |
Definition at line 150 of file GeneralizedReturnMappingSolution.h.
GeneralizedReturnMappingSolutionTempl< is_ad >::GeneralizedReturnMappingSolutionTempl | ( | const InputParameters & | parameters | ) |
Definition at line 54 of file GeneralizedReturnMappingSolution.C.
|
inlinevirtual |
Definition at line 28 of file GeneralizedReturnMappingSolution.h.
|
private |
Check to see whether solution is within admissible range, and set it within that range if it is not.
scalar | Current value of the inelastic strain increment |
scalar_increment | Incremental change in scalar from the previous iteration |
scalar_old | Previous value of scalar |
min_permissible_scalar | Minimum permissible value of scalar |
max_permissible_scalar | Maximum permissible value of scalar |
iter_output | Output stream |
Definition at line 319 of file GeneralizedReturnMappingSolution.C.
|
protectedpure virtual |
|
protectedpure virtual |
Compute a reference quantity to be used for checking relative convergence.
This should be in strain increment units for all models for consistency.
effective_trial_stress | Effective trial stress |
scalar | Inelastic strain increment magnitude being solved for |
Implemented in GeneralizedRadialReturnStressUpdateTempl< is_ad >.
|
protectedpure virtual |
Compute the residual for a predicted value of the scalar.
This residual should be in strain increment units for all models for consistency.
effective_trial_stress | Effective trial stress |
scalar | Inelastic strain increment magnitude being solved for |
|
protected |
Check to see whether the residual is within the convergence limits.
residual | Current value of the residual |
reference | Current value of the reference quantity |
Definition at line 286 of file GeneralizedReturnMappingSolution.C.
|
private |
Check to see whether the residual is within acceptable convergence limits.
This will only return true if it has been determined that progress is no longer being made and that the residual is within the acceptable limits.
residual | Current iteration count |
residual | Current value of the residual |
reference | Current value of the reference quantity |
Definition at line 296 of file GeneralizedReturnMappingSolution.C.
|
inlineprotectedvirtual |
Compute an initial guess for the value of the scalar.
For some cases, an intellegent starting point can provide enhanced robustness in the Newton iterations. This is also an opportunity for classes that derive from this to perform initialization tasks.
effective_trial_stress | Effective trial stress |
Definition at line 65 of file GeneralizedReturnMappingSolution.h.
|
private |
Method called from within this class to perform the actual return mappping iterations.
effective_trial_stress | Effective trial stress |
scalar | Inelastic strain increment magnitude being solved for |
iter_output | Output stream – if null, no output is produced |
Definition at line 159 of file GeneralizedReturnMappingSolution.C.
|
inlineprotectedvirtual |
Finalize internal state variables for a model for a given iteration.
scalar | Inelastic strain increment magnitude being solved for |
Definition at line 101 of file GeneralizedReturnMappingSolution.h.
|
protectedvirtual |
Compute the maximum permissible value of the scalar.
For some models, the magnitude of this may be known.
effective_trial_stress | Effective trial stress |
Reimplemented in GeneralizedRadialReturnStressUpdateTempl< is_ad >.
Definition at line 86 of file GeneralizedReturnMappingSolution.C.
|
protectedvirtual |
Compute the minimum permissible value of the scalar.
For some models, the magnitude of this may be known.
effective_trial_stress | Effective trial stress |
Reimplemented in GeneralizedRadialReturnStressUpdateTempl< is_ad >.
Definition at line 78 of file GeneralizedReturnMappingSolution.C.
|
protectedvirtual |
Output information for a single iteration step to build the convergence history of the model.
iter_output | Output stream |
it | Current iteration count |
effective_trial_stress | Effective trial stress |
scalar | Inelastic strain increment magnitude being solved for |
residual | Current value of the residual |
reference | Current value of the reference quantity |
Definition at line 378 of file GeneralizedReturnMappingSolution.C.
|
protectedvirtual |
Output summary information for the convergence history of the model.
iter_output | Output stream |
total_it | Total iteration count |
Reimplemented in GeneralizedRadialReturnStressUpdateTempl< is_ad >.
Definition at line 401 of file GeneralizedReturnMappingSolution.C.
Referenced by GeneralizedRadialReturnStressUpdateTempl< is_ad >::outputIterationSummary().
|
protected |
Perform the return mapping iterations.
effective_trial_stress | Effective trial stress |
scalar | Inelastic strain increment magnitude being solved for |
console | Console output |
Definition at line 94 of file GeneralizedReturnMappingSolution.C.
|
private |
Update the upper and lower bounds of the root for the effective inelastic strain.
scalar | Current value of the inelastic strain increment |
residual | Current value of the residual |
init_resid_sign | Sign of the initial value of the residual |
scalar_upper_bound | Upper bound value of scalar |
scalar_lower_bound | Lower bound value of scalar |
iter_output | Output stream |
Definition at line 350 of file GeneralizedReturnMappingSolution.C.
|
static |
Definition at line 26 of file GeneralizedReturnMappingSolution.C.
Referenced by GeneralizedRadialReturnStressUpdateTempl< is_ad >::validParams().
|
private |
Absolute convergence tolerance.
Definition at line 168 of file GeneralizedReturnMappingSolution.h.
|
private |
Multiplier applied to relative and absolute tolerances for acceptable convergence.
Definition at line 171 of file GeneralizedReturnMappingSolution.h.
|
protected |
Whether to save upper and lower bounds of root for scalar, and set solution to the midpoint between those bounds if outside them.
Definition at line 118 of file GeneralizedReturnMappingSolution.h.
|
protected |
Whether to check to see whether iterative solution is within admissible range, and set within that range if outside.
Definition at line 111 of file GeneralizedReturnMappingSolution.h.
|
private |
Residual values, kept as members to retain solver state for summary outputting.
Definition at line 183 of file GeneralizedReturnMappingSolution.h.
|
private |
Whether to output iteration information all the time (regardless of whether iterations converge)
Definition at line 162 of file GeneralizedReturnMappingSolution.h.
|
private |
|
private |
iteration number
Definition at line 180 of file GeneralizedReturnMappingSolution.h.
|
protected |
Whether to use line searches to improve convergence.
Definition at line 114 of file GeneralizedReturnMappingSolution.h.
|
private |
Maximum number of return mapping iterations.
This exists only to avoid an infinite loop, and is is intended to be a large number that is not settable by the user.
Definition at line 159 of file GeneralizedReturnMappingSolution.h.
|
private |
Number of residuals to be stored in history.
Definition at line 174 of file GeneralizedReturnMappingSolution.h.
|
private |
Relative convergence tolerance.
Definition at line 165 of file GeneralizedReturnMappingSolution.h.
|
private |
Definition at line 184 of file GeneralizedReturnMappingSolution.h.
|
private |
History of residuals used to check whether progress is still being made on decreasing the residual.
Definition at line 177 of file GeneralizedReturnMappingSolution.h.
|
private |
MOOSE input name of the object performing the solve.
Definition at line 188 of file GeneralizedReturnMappingSolution.h.