Base class that provides capability for Newton return mapping iterations on a single variable. More...
#include <SingleVariableReturnMappingSolution.h>
Public Member Functions | |
SingleVariableReturnMappingSolution (const InputParameters ¶meters) | |
virtual | ~SingleVariableReturnMappingSolution () |
Static Public Member Functions | |
static InputParameters | validParams () |
Protected Member Functions | |
void | returnMappingSolve (const Real effective_trial_stress, Real &scalar, const ConsoleStream &console) |
Perform the return mapping iterations. More... | |
virtual Real | minimumPermissibleValue (const Real effective_trial_stress) const |
Compute the minimum permissible value of the scalar. More... | |
virtual Real | maximumPermissibleValue (const Real effective_trial_stress) const |
Compute the maximum permissible value of the scalar. More... | |
virtual Real | initialGuess (const Real) |
Compute an initial guess for the value of the scalar. More... | |
virtual Real | computeResidual (const Real effective_trial_stress, const Real scalar)=0 |
Compute the residual for a predicted value of the scalar. More... | |
virtual Real | computeDerivative (const Real effective_trial_stress, const Real scalar)=0 |
Compute the derivative of the residual as a function of the scalar variable. More... | |
virtual Real | computeReferenceResidual (const Real effective_trial_stress, const Real scalar)=0 |
Compute a reference quantity to be used for checking relative convergence. More... | |
virtual void | iterationFinalize (Real) |
Finalize internal state variables for a model for a given iteration. More... | |
virtual void | outputIterationStep (std::stringstream *iter_output, const unsigned int it, const Real effective_trial_stress, const Real scalar, const Real residual, const Real reference_residual) |
Output information for a single iteration step to build the convergence history of the model. More... | |
virtual void | outputIterationSummary (std::stringstream *iter_output, const unsigned int total_it) |
Output summary information for the convergence history of the model. 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 Real effective_trial_stress, Real &scalar, std::stringstream *iter_output=nullptr) |
Method called from within this class to perform the actual return mappping iterations. More... | |
bool | converged (const Real residual, const Real reference) |
Check to see whether the residual is within the convergence limits. More... | |
bool | convergedAcceptable (const unsigned int it, const Real residual, const Real reference) |
Check to see whether the residual is within acceptable convergence limits. More... | |
void | checkPermissibleRange (Real &scalar, Real &scalar_increment, const Real scalar_old, const Real min_permissible_scalar, const Real 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 Real scalar, const Real residual, const Real init_resid_sign, Real &scalar_upper_bound, Real &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 SingleVariableReturnMappingSolution::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... | |
Real | _initial_residual |
Residual values, kept as members to retain solver state for summary outputting. More... | |
Real | _residual |
Base class that provides capability for Newton return mapping iterations on a single variable.
Definition at line 24 of file SingleVariableReturnMappingSolution.h.
|
strongprivate |
Enumerator | |
---|---|
NEVER | |
ON_ERROR | |
ALWAYS |
Definition at line 130 of file SingleVariableReturnMappingSolution.h.
|
strongprivate |
Enumerator | |
---|---|
SUCCESS | |
NAN_INF | |
EXCEEDED_ITERATIONS |
Definition at line 137 of file SingleVariableReturnMappingSolution.h.
SingleVariableReturnMappingSolution::SingleVariableReturnMappingSolution | ( | const InputParameters & | parameters | ) |
Definition at line 59 of file SingleVariableReturnMappingSolution.C.
|
inlinevirtual |
Definition at line 30 of file SingleVariableReturnMappingSolution.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 356 of file SingleVariableReturnMappingSolution.C.
Referenced by internalSolve().
|
protectedpure virtual |
Compute the derivative of the residual as a function of the scalar variable.
The 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 |
Implemented in IsotropicPlasticity, CLSHPlasticModel, PowerLawCreepModel, IsotropicPlasticityStressUpdate, PowerLawCreepStressUpdate, and PowerLawCreepExceptionTest.
Referenced by RadialReturnCreepStressUpdateBase::computeStressDerivative(), and internalSolve().
|
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 RadialReturnStressUpdate, and ReturnMappingModel.
Referenced by internalSolve().
|
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 |
Implemented in IsotropicPlasticity, CLSHPlasticModel, PowerLawCreepModel, IsotropicPlasticityStressUpdate, PowerLawCreepStressUpdate, and PowerLawCreepExceptionTest.
Referenced by internalSolve().
|
private |
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 298 of file SingleVariableReturnMappingSolution.C.
Referenced by convergedAcceptable(), and internalSolve().
|
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 305 of file SingleVariableReturnMappingSolution.C.
Referenced by internalSolve().
|
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 64 of file SingleVariableReturnMappingSolution.h.
Referenced by internalSolve().
|
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 157 of file SingleVariableReturnMappingSolution.C.
Referenced by returnMappingSolve().
|
inlineprotectedvirtual |
Finalize internal state variables for a model for a given iteration.
scalar | Inelastic strain increment magnitude being solved for |
Reimplemented in IsotropicPlasticityStressUpdate, IsotropicPlasticity, and CLSHPlasticModel.
Definition at line 94 of file SingleVariableReturnMappingSolution.h.
Referenced by internalSolve().
|
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 RadialReturnStressUpdate.
Definition at line 89 of file SingleVariableReturnMappingSolution.C.
Referenced by internalSolve().
|
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 ReturnMappingModel, and RadialReturnStressUpdate.
Definition at line 82 of file SingleVariableReturnMappingSolution.C.
Referenced by internalSolve().
|
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 328 of file SingleVariableReturnMappingSolution.C.
Referenced by internalSolve().
|
protectedvirtual |
Output summary information for the convergence history of the model.
iter_output | Output stream |
total_it | Total iteration count |
Reimplemented in RadialReturnStressUpdate, and ReturnMappingModel.
Definition at line 347 of file SingleVariableReturnMappingSolution.C.
Referenced by ReturnMappingModel::outputIterationSummary(), RadialReturnStressUpdate::outputIterationSummary(), and returnMappingSolve().
|
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 96 of file SingleVariableReturnMappingSolution.C.
Referenced by ReturnMappingModel::computeStress(), and RadialReturnStressUpdate::updateState().
|
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 384 of file SingleVariableReturnMappingSolution.C.
Referenced by internalSolve().
|
static |
Definition at line 28 of file SingleVariableReturnMappingSolution.C.
Referenced by RadialReturnStressUpdate::validParams().
|
private |
Absolute convergence tolerance.
Definition at line 155 of file SingleVariableReturnMappingSolution.h.
Referenced by converged(), and outputIterationStep().
|
private |
Multiplier applied to relative and absolute tolerances for acceptable convergence.
Definition at line 158 of file SingleVariableReturnMappingSolution.h.
Referenced by convergedAcceptable().
|
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 127 of file SingleVariableReturnMappingSolution.h.
Referenced by internalSolve().
|
protected |
Whether to check to see whether iterative solution is within admissible range, and set within that range if outside.
Definition at line 120 of file SingleVariableReturnMappingSolution.h.
Referenced by internalSolve().
|
private |
Residual values, kept as members to retain solver state for summary outputting.
Definition at line 170 of file SingleVariableReturnMappingSolution.h.
Referenced by internalSolve(), and outputIterationSummary().
|
private |
Whether to output iteration information all the time (regardless of whether iterations converge)
Definition at line 149 of file SingleVariableReturnMappingSolution.h.
Referenced by returnMappingSolve().
|
private |
Referenced by returnMappingSolve().
|
private |
iteration number
Definition at line 167 of file SingleVariableReturnMappingSolution.h.
Referenced by internalSolve(), and returnMappingSolve().
|
protected |
Whether to use line searches to improve convergence.
Definition at line 123 of file SingleVariableReturnMappingSolution.h.
Referenced by internalSolve().
|
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 146 of file SingleVariableReturnMappingSolution.h.
Referenced by internalSolve().
|
private |
Number of residuals to be stored in history.
Definition at line 161 of file SingleVariableReturnMappingSolution.h.
Referenced by convergedAcceptable(), and internalSolve().
|
private |
Relative convergence tolerance.
Definition at line 152 of file SingleVariableReturnMappingSolution.h.
Referenced by converged(), and outputIterationStep().
|
private |
Definition at line 171 of file SingleVariableReturnMappingSolution.h.
Referenced by internalSolve(), and outputIterationSummary().
|
private |
History of residuals used to check whether progress is still being made on decreasing the residual.
Definition at line 164 of file SingleVariableReturnMappingSolution.h.
Referenced by convergedAcceptable(), and internalSolve().
|
private |
MOOSE input name of the object performing the solve.
Definition at line 175 of file SingleVariableReturnMappingSolution.h.
Referenced by outputIterationSummary().