15 #include "libmesh/utility.h" 18 #include <petscblaslapack.h> 24 params.
addClassDescription(
"Return-map and Jacobian algorithms for plastic models where the " 25 "yield function and flow directions depend on multiple functions of " 30 "max_NR_iterations>0",
31 "Maximum number of Newton-Raphson iterations allowed during the return-map algorithm");
32 params.
addParam<
bool>(
"perform_finite_strain_rotations",
34 "Tensors are correctly rotated " 35 "in finite-strain simulations. " 36 "For optimal performance you can " 37 "set this to 'false' if you are " 38 "only ever using small strains");
41 "Intersections of the yield surfaces will be smoothed by this amount (this " 42 "is measured in units of stress). Often this is related to other physical " 43 "parameters (eg, 0.1*cohesion) but it is important to set this small enough " 44 "so that the individual yield surfaces do not mix together in the smoothing " 45 "process to produce a result where no stress is admissible (for example, " 46 "mixing together tensile and compressive failure envelopes).");
48 "The return-map process will be deemed to have converged if all " 49 "yield functions are within yield_function_tol of zero. If this " 50 "is set very low then precision-loss might be encountered: if the " 51 "code detects precision loss then it also deems the return-map " 52 "process has converged.");
53 MooseEnum tangent_operator(
"elastic nonlinear",
"nonlinear");
56 "In order to help the Newton-Raphson procedure, the applied strain " 57 "increment may be applied in sub-increments of size greater than this " 58 "value. Usually it is better for Moose's nonlinear convergence to " 59 "increase max_NR_iterations rather than decrease this parameter.");
60 params.
addParam<
bool>(
"warn_about_precision_loss",
62 "Output a message to the console every " 63 "time precision-loss is encountered " 64 "during the Newton-Raphson process");
65 params.
addParam<std::vector<Real>>(
"admissible_stress",
66 "A single admissible value of the value of the stress " 67 "parameters for internal parameters = 0. This is used " 68 "to initialize the return-mapping algorithm during the first " 69 "nonlinear iteration. If not given then it is assumed that " 70 "stress parameters = 0 is admissible.");
71 MooseEnum smoother_fcn_enum(
"cos poly1 poly2 poly3",
"cos");
74 "Type of smoother function to use. 'cos' means (-a/pi)cos(pi x/2/a), " 75 "'polyN' means a polynomial of degree 2N+2");
81 const InputParameters & parameters,
unsigned num_sp,
unsigned num_yf,
unsigned num_intnl)
84 _definitely_ok_sp(isParamValid(
"admissible_stress")
85 ? getParam<
std::vector<
Real>>(
"admissible_stress")
86 :
std::vector<
Real>(_num_sp, 0.0)),
87 _Eij(num_sp,
std::vector<
Real>(num_sp)),
89 _Cij(num_sp,
std::vector<
Real>(num_sp)),
91 _num_intnl(num_intnl),
92 _max_nr_its(getParam<unsigned>(
"max_NR_iterations")),
93 _perform_finite_strain_rotations(getParam<bool>(
"perform_finite_strain_rotations")),
94 _smoothing_tol(getParam<
Real>(
"smoothing_tol")),
95 _smoothing_tol2(Utility::
pow<2>(getParam<
Real>(
"smoothing_tol"))),
96 _f_tol(getParam<
Real>(
"yield_function_tol")),
97 _f_tol2(Utility::
pow<2>(getParam<
Real>(
"yield_function_tol"))),
98 _min_step_size(getParam<
Real>(
"min_step_size")),
99 _step_one(declareRestartableData<bool>(
"step_one", true)),
100 _warn_about_precision_loss(getParam<bool>(
"warn_about_precision_loss")),
102 _plastic_strain(declareProperty<
RankTwoTensor>(_base_name +
"plastic_strain")),
103 _plastic_strain_old(getMaterialPropertyOld<
RankTwoTensor>(_base_name +
"plastic_strain")),
104 _intnl(declareProperty<
std::vector<
Real>>(_base_name +
"plastic_internal_parameter")),
106 getMaterialPropertyOld<
std::vector<
Real>>(_base_name +
"plastic_internal_parameter")),
107 _yf(declareProperty<
std::vector<
Real>>(_base_name +
"plastic_yield_function")),
108 _iter(declareProperty<
Real>(_base_name +
109 "plastic_NR_iterations")),
111 _max_iter_used(declareProperty<
Real>(
112 _base_name +
"max_plastic_NR_iterations")),
114 _max_iter_used_old(getMaterialPropertyOld<
Real>(_base_name +
"max_plastic_NR_iterations")),
116 declareProperty<
Real>(_base_name +
"plastic_linesearch_needed")),
123 _dvar_dtrial(num_sp + 1,
std::vector<
Real>(num_sp, 0.0)),
125 _ok_intnl(num_intnl),
126 _del_stress_params(num_sp),
128 _current_intnl(num_intnl),
130 _dsp_scratch(num_sp),
131 _dsp_trial_scratch(num_sp),
132 _d2sp_scratch(num_sp),
133 _yfs_scratch(num_yf),
134 _sp_params_old_scratch(num_sp),
135 _delta_nr_params_scratch(num_sp + 1),
136 _dintnl_scratch(num_intnl,
std::vector<
Real>(num_sp)),
137 _jac_scratch((num_sp + 1) * (num_sp + 1)),
138 _ipiv_scratch(num_sp + 1),
139 _all_q_scratch(num_yf,
yieldAndFlow(num_sp, num_intnl)),
141 _smoother_function_type(
145 mooseError(
"MultiParameterPlasticityStressUpdate: admissible_stress parameter must consist of ",
177 bool compute_full_tangent_operator,
206 inelastic_strain_increment.
zero();
247 for (
unsigned i = 0; i <
_num_sp; ++i)
250 Real step_taken = 0.0;
252 Real step_size = 1.0;
253 Real gaE_total = 0.0;
258 bool smoothed_q_calculated =
false;
262 if (1.0 - step_taken < step_size)
264 step_size = 1.0 - step_taken;
267 for (
unsigned i = 0; i <
_num_sp; ++i)
279 unsigned step_iter = 0;
288 smoothed_q_calculated =
false;
297 smoothed_q_calculated =
true;
302 while (res2 >
_f_tol2 && step_iter <
_max_nr_its && nr_failure == 0 && ls_failure == 0)
314 Moose::err <<
"MultiParameterPlasticityStressUpdate: precision-loss in element " 316 for (
unsigned i = 0; i <
_num_sp; ++i)
318 Moose::err <<
" gaE = " << gaE <<
"\n";
337 if (res2 <=
_f_tol2 && step_iter <
_max_nr_its && nr_failure == 0 && ls_failure == 0 &&
343 step_taken += step_size;
354 compute_full_tangent_operator,
356 if (static_cast<Real>(step_iter) >
_iter[
_qp])
370 errorHandler(
"MultiParameterPlasticityStressUpdate: Minimum step-size violated");
376 if (!smoothed_q_calculated)
387 inelastic_strain_increment);
389 strain_increment = strain_increment - inelastic_strain_increment;
401 compute_full_tangent_operator,
408 const std::vector<Real> & intnl)
const 411 "_all_q_scratch incorrectly sized in smoothAllQuantities");
440 std::size_t res_f = 0;
462 for (
unsigned i = 0; i <
_num_sp; ++i)
477 for (
unsigned i = 0; i <
_num_sp; ++i)
570 std::vector<Real> & stress_params,
572 const std::vector<Real> & trial_stress_params,
574 const std::vector<Real> & intnl_ok,
575 std::vector<Real> & intnl,
576 std::vector<Real> & rhs,
577 Real & linesearch_needed)
const 579 const Real res2_old = res2;
581 "_sp_params_old_scratch incorrectly sized in lineSearch");
583 const Real gaE_old = gaE;
585 "_delta_nr_params_scratch incorrectly sized in lineSearch");
589 const Real lam_min = 1E-10;
590 const Real slope = -2.0 * res2_old;
600 for (
unsigned i = 0; i <
_num_sp; ++i)
610 calculateRHS(trial_stress_params, stress_params, gaE, smoothed_q, rhs);
614 if (res2 < res2_old + 1E-4 * lam * slope)
616 else if (lam < lam_min)
621 tmp_lam = -0.5 * slope / (res2 - res2_old - slope);
626 const Real rhs1 = res2 - res2_old - lam * slope;
627 const Real rhs2 = f2 - res2_old - lam2 * slope;
628 const Real a = (rhs1 / Utility::pow<2>(lam) - rhs2 / Utility::pow<2>(lam2)) / (lam - lam2);
630 (-lam2 * rhs1 / Utility::pow<2>(lam) + lam * rhs2 / Utility::pow<2>(lam2)) / (lam - lam2);
632 tmp_lam = -slope / (2.0 *
b);
635 const Real disc = Utility::pow<2>(
b) - 3.0 *
a * slope;
639 tmp_lam = (-
b + std::sqrt(disc)) / (3.0 *
a);
641 tmp_lam = -slope / (
b + std::sqrt(disc));
643 if (tmp_lam > 0.5 * lam)
648 lam = std::max(tmp_lam, 0.1 * lam);
652 linesearch_needed = 1.0;
658 const std::vector<Real> & trial_stress_params,
659 const std::vector<Real> & stress_params,
660 const std::vector<Real> & intnl,
662 std::vector<Real> & rhs)
const 668 "_jac_scratch incorrectly sized in nrStep");
672 const PetscBLASInt nrhs = 1;
675 const PetscBLASInt gesv_num_rhs =
_num_sp + 1;
676 LAPACKgesv_(&gesv_num_rhs,
706 const std::vector<Real> & ,
708 const std::vector<Real> & ,
709 const std::vector<Real> & ,
716 const std::vector<Real> & intnl)
const 727 for (std::size_t i = 1; i < yfs.size(); ++i)
741 const std::vector<Real> & intnl_old,
742 std::vector<Real> & stress_params,
744 std::vector<Real> & intnl)
const 747 std::copy(trial_stress_params.begin(), trial_stress_params.end(), stress_params.begin());
748 std::copy(intnl_old.begin(), intnl_old.end(), intnl.begin());
754 const std::vector<Real> & ,
756 const std::vector<Real> & ,
760 bool compute_full_tangent_operator,
761 const std::vector<std::vector<Real>> & dvar_dtrial,
765 if (!compute_full_tangent_operator)
782 cto -= s.outerProduct(t);
788 for (
unsigned i = 0; i <
_num_sp; ++i)
801 mooseWarning(
"MultiParameterPlasticityStressUpdate: Cannot invert 1+T in consistent tangent " 802 "operator computation at quadpoint ",
823 for (
unsigned i = 0; i <
_num_sp; ++i)
825 inelastic_strain_increment *= gaE /
_En;
832 for (
const auto & r : rhs)
839 const std::vector<Real> & stress_params,
842 std::vector<Real> & rhs)
const 845 for (
unsigned i = 0; i <
_num_sp; ++i)
847 rhs[i] = stress_params[i] - trial_stress_params[i];
849 rhs[i] += ga *
_Eij[i][
j] * smoothed_q.
dg[
j];
856 const std::vector<std::vector<Real>> & dintnl,
857 const std::vector<Real> & ,
859 std::vector<double> & jac)
const 861 for (
auto & jac_entry : jac)
867 for (
unsigned var = 0; var <
_num_sp; ++var)
869 for (
unsigned rhs = 0; rhs <
_num_sp; ++rhs)
875 jac[ind] -= ga *
_Eij[rhs][
j] * smoothed_q.
d2g[
j][var];
877 jac[ind] -= ga *
_Eij[rhs][
j] * smoothed_q.
d2g_di[
j][
k] * dintnl[
k][var];
882 jac[ind] -= smoothed_q.
df[var];
884 jac[ind] -= smoothed_q.
df_di[
k] * dintnl[
k][var];
889 for (
unsigned rhs = 0; rhs <
_num_sp; ++rhs)
892 jac[ind] -= (1.0 /
_En) *
_Eij[rhs][
j] * smoothed_q.
dg[
j];
901 const std::vector<Real> & trial_stress_params,
902 const std::vector<Real> & stress_params,
904 const std::vector<Real> & intnl,
907 bool compute_full_tangent_operator,
908 std::vector<std::vector<Real>> & dvar_dtrial)
const 913 if (!compute_full_tangent_operator)
920 dvar_dtrial[
v][
v] += step_size;
952 rhs_cto[ind] -= smoothed_q.
df_di[
k] * dintnl[
k][
a];
958 dnRHSdVar(smoothed_q, dintnl, stress_params, gaE, jac);
960 std::vector<PetscBLASInt> ipiv(
_num_sp + 1);
962 const PetscBLASInt gesv_num_rhs =
_num_sp + 1;
963 const PetscBLASInt gesv_num_pq =
_num_sp;
964 LAPACKgesv_(&gesv_num_rhs,
973 errorHandler(
"MultiParameterPlasticityStressUpdate: PETSC LAPACK gsev routine returned with " 978 std::vector<std::vector<Real>> dvarn_dtrialn(
_num_sp + 1, std::vector<Real>(
_num_sp, 0.0));
979 for (
unsigned spt = 0; spt <
_num_sp; ++spt)
983 dvarn_dtrialn[
v][spt] = rhs_cto[ind];
987 dvarn_dtrialn[
_num_sp][spt] = rhs_cto[ind];
991 const std::vector<std::vector<Real>> dvar_dtrial_old = dvar_dtrial;
995 for (
unsigned spt = 0; spt <
_num_sp; ++spt)
997 dvar_dtrial[
v][spt] = step_size * dvarn_dtrialn[
v][spt];
999 dvar_dtrial[
v][spt] += dvarn_dtrialn[
v][
a] * dvar_dtrial_old[
a][spt];
1004 for (
unsigned spt = 0; spt <
_num_sp; ++spt)
1006 dvar_dtrial[
v][spt] += step_size * dvarn_dtrialn[
v][spt];
1008 dvar_dtrial[
v][spt] += dvarn_dtrialn[
v][
a] * dvar_dtrial_old[
a][spt];
1014 const std::vector<Real> & stress_params,
1017 if (std::abs(solution[
_num_sp]) > 1E-13 * std::abs(gaE))
1019 for (
unsigned i = 0; i <
_num_sp; ++i)
1020 if (std::abs(solution[i]) > 1E-13 * std::abs(stress_params[i]))
const Real _smoothing_tol2
Square of the smoothing tolerance.
std::vector< yieldAndFlow > _all_q_scratch
all the yield function information, for use in smoothAllQuantities, to avoid repeatedly allocating/de...
std::vector< Real > df_di
yieldAndFlow _smoothed_q
Current values of the yield function, derivatives, etc during updateState.
FEProblemBase & _fe_problem
MaterialProperty< std::vector< Real > > & _yf
yield functions
std::vector< Real > _trial_sp
"Trial" value of stress_params that initializes the return-map process This is derived from stress = ...
std::vector< std::vector< Real > > d2g
SmootherFunctionType
The type of smoother function.
virtual void initQpStatefulProperties() override
void dnRHSdVar(const yieldAndFlow &smoothed_q, const std::vector< std::vector< Real >> &dintnl, const std::vector< Real > &stress_params, Real gaE, std::vector< double > &jac) const
Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving ...
MultiParameterPlasticityStressUpdate(const InputParameters ¶meters, unsigned num_sp, unsigned num_yf, unsigned num_intnl)
virtual void setEffectiveElasticity(const RankFourTensor &Eijkl)=0
Sets _Eij and _En and _Cij.
const bool _warn_about_precision_loss
Output a warning message if precision loss is encountered during the return-map process.
std::vector< PetscBLASInt > _ipiv_scratch
container to hold LAPACK ipiv integers, to avoid repeatedly allocating/deallocating this vector ...
virtual void errorHandler(const std::string &message) const
Performs any necessary cleaning-up, then throw MooseException(message)
virtual void initializeVarsV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &stress_params, Real &gaE, std::vector< Real > &intnl) const
Sets (stress_params, intnl) at "good guesses" of the solution to the Return-Map algorithm.
int lineSearch(Real &res2, std::vector< Real > &stress_params, Real &gaE, const std::vector< Real > &trial_stress_params, yieldAndFlow &smoothed_q, const std::vector< Real > &intnl_ok, std::vector< Real > &intnl, std::vector< Real > &rhs, Real &linesearch_needed) const
Performs a line-search to find stress_params and gaE Upon entry:
std::vector< Real > _sp_params_old_scratch
container to hold old values of old stress_params in lineSearch to avoid repeatedly allocating/deallo...
const unsigned _num_intnl
Number of internal parameters.
Real _En
normalising factor
Struct designed to hold info about a single yield function and its derivatives, as well as the flow d...
std::vector< std::vector< Real > > _Cij
_Cij[i, j] * _Eij[j, k] = 1 iff j == k
virtual void consistentTangentOperatorV(const RankTwoTensor &stress_trial, const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, const std::vector< std::vector< Real >> &dvar_dtrial, RankFourTensor &cto)
Calculates the consistent tangent operator.
static InputParameters validParams()
virtual void setIntnlValuesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > ¤t_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const =0
Sets the internal parameters based on the trial values of stress_params, their current values...
std::vector< Real > _ok_intnl
The state (ok_sp, ok_intnl) is known to be admissible.
const Real _f_tol2
Square of the yield-function tolerance.
const Real _min_step_size
In order to help the Newton-Raphson procedure, the applied strain increment may be applied in sub-inc...
Real smoother(Real f_diff) const
Derivative of ismoother.
int nrStep(const yieldAndFlow &smoothed_q, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, const std::vector< Real > &intnl, Real gaE, std::vector< Real > &rhs) const
Performs a Newton-Raphson step to attempt to zero rhs Upon return, rhs will contain the solution...
void calculateRHS(const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, std::vector< Real > &rhs) const
Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[...
virtual void updateState(RankTwoTensor &strain_increment, RankTwoTensor &inelastic_strain_increment, const RankTwoTensor &rotation_increment, RankTwoTensor &stress_new, const RankTwoTensor &stress_old, const RankFourTensor &elasticity_tensor, const RankTwoTensor &elastic_strain_old, bool compute_full_tangent_operator, RankFourTensor &tangent_operator) override
MaterialProperty< std::vector< Real > > & _intnl
internal parameters
yieldAndFlow smoothAllQuantities(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Calculates all yield functions and derivatives, and then performs the smoothing scheme.
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
const Real _f_tol
The yield-function tolerance.
const unsigned _num_yf
Number of yield functions.
std::vector< Real > _yfs_scratch
values of yield functions in yieldF, to avoid repeatedly allocating/deallocating this vector ...
virtual void computeAllQV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const =0
Completely fills all_q with correct values.
const std::vector< Real > _definitely_ok_sp
An admissible value of stress_params at the initial time.
const MaterialProperty< std::vector< Real > > & _intnl_old
old values of internal parameters
RankTwoTensor _stress_trial
"Trial" value of stress that is set at the beginning of the return-map process.
Real deriv(unsigned n, unsigned alpha, unsigned beta, Real x)
virtual void propagateQpStatefulProperties() override
If updateState is not called during a timestep, this will be.
Real f(Real x)
Test function for Brents method.
virtual void computeStressParams(const RankTwoTensor &stress, std::vector< Real > &stress_params) const =0
Computes stress_params, given stress.
const MaterialProperty< Real > & _max_iter_used_old
Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of ...
std::vector< double > _jac_scratch
jacobian in the NR process, to avoid repeatedly allocating/deallocating this vector ...
Real calculateRes2(const std::vector< Real > &rhs) const
Calculates the residual-squared for the Newton-Raphson + line-search.
virtual void setIntnlDerivativesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > ¤t_stress_params, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const =0
Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters.
RankFourTensorTempl< T > transposeMajor() const
virtual void yieldFunctionValuesV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< Real > &yf) const =0
Computes the values of the yield functions, given stress_params and intnl parameters.
StressUpdateBase is a material that is not called by MOOSE because of the compute=false flag set in t...
std::string stringify(const T &t)
Real dsmoother(Real f_diff) const
Derivative of smoother.
enum MultiParameterPlasticityStressUpdate::SmootherFunctionType _smoother_function_type
MaterialProperty< Real > & _iter
Number of Newton-Raphson iterations used in the return-map.
virtual void d2stressparam_dstress(const RankTwoTensor &stress, std::vector< RankFourTensor > &d2sp) const =0
d2(stress_param[i])/d(stress)/d(stress) at given stress.
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.
std::vector< Real > _current_intnl
The current values of the internal params during the Newton-Raphson.
virtual void finalizeReturnProcess(const RankTwoTensor &rotation_increment)
Derived classes may use this to perform calculations after the return-map process has completed succe...
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual void dstressparam_dstress(const RankTwoTensor &stress, std::vector< RankTwoTensor > &dsp) const =0
d(stress_param[i])/d(stress) at given stress.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string message
MaterialProperty< Real > & _linesearch_needed
Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise) ...
std::vector< std::vector< Real > > _dvar_dtrial
d({stress_param[i], gaE})/d(trial_stress_param[j])
virtual void setInelasticStrainIncrementAfterReturn(const RankTwoTensor &stress_trial, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &elasticity_tensor, const RankTwoTensor &returned_stress, RankTwoTensor &inelastic_strain_increment)
Sets inelastic strain increment from the returned configuration This is called after the return-map p...
std::vector< Real > _delta_nr_params_scratch
container to hold initial values of rhs in lineSearch to avoid repeatedly allocating/deallocating thi...
void mooseWarning(Args &&... args) const
std::vector< Real > _current_sp
The current values of the stress params during the Newton-Raphson.
bool _step_one
handles case of initial_stress that is inadmissible being supplied
void mooseError(Args &&... args) const
void dVardTrial(bool elastic_only, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, Real step_size, bool compute_full_tangent_operator, std::vector< std::vector< Real >> &dvar_dtrial) const
Calculates derivatives of the stress_params and gaE with repect to the trial values of the stress_par...
static InputParameters validParams()
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
virtual void setStressAfterReturnV(const RankTwoTensor &stress_trial, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const =0
Sets stress from the admissible parameters.
std::vector< std::vector< Real > > d2g_di
virtual void preReturnMapV(const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl)
Derived classes may employ this function to record stuff or do other computations prior to the return...
MaterialProperty< Real > & _max_iter_used
Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire si...
std::vector< std::vector< Real > > _dintnl_scratch
derivative of internal parameters with respect to stress parameters, to avoid repeatedly allocating/d...
bool precisionLoss(const std::vector< Real > &solution, const std::vector< Real > &stress_params, Real gaE) const
Check whether precision loss has occurred.
std::vector< RankTwoTensor > _dsp_trial_scratch
d(stress_param[:])/d(stress_trial) used in dstressparam_dstress to avoid repeatedly allocating/deallo...
const bool & currentlyComputingJacobian() const
std::vector< Real > _del_stress_params
_del_stress_params = trial_stress_params - ok_sp This is fixed at the beginning of the return-map pro...
const unsigned _max_nr_its
Maximum number of Newton-Raphson iterations allowed in the return-map process.
virtual void initializeReturnProcess()
Derived classes may use this to perform calculations before any return-map process is performed...
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
Old value of plastic strain.
RankFourTensorTempl< T > invSymm() const
static const std::string k
Real yieldF(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Computes the smoothed yield function.
std::vector< RankFourTensor > _d2sp_scratch
d2(stress_param[:])/d(stress)/d(stress) used in d2stressparam_dstress to avoid repeatedly allocating/...
std::vector< Real > _rhs
0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, i] * dg/dS[i] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1...
const Elem & get(const ElemType type_in)
const Elem *const & _current_elem
std::vector< Real > _ok_sp
The state (ok_sp, ok_intnl) is known to be admissible, so ok_sp are stress_params that are "OK"...
std::vector< RankTwoTensor > _dsp_scratch
d(stress_param[:])/d(stress) used in dstressparam_dstress to avoid repeatedly allocating/deallocating...
const unsigned _num_sp
Number of stress parameters.
Real ismoother(Real f_diff) const
Smooths yield functions.