two-step math_clip

This commit is contained in:
Cathy Bing 2023-11-28 01:09:20 -05:00
parent 779a6e7a05
commit b0ba1e78b7
2 changed files with 8 additions and 6 deletions

View File

@ -360,9 +360,10 @@ module function dislotungsten_dotState(Mp,ph,en) result(dotState)
d_hat = dst%Lambda_sl(:,en) ! upper limit
dot_rho_dip_formation = 0.0_pREAL
else where
d_hat = math_clip(mu*prm%b_sl/(8.0_pREAL*PI*(1.0_pREAL-nu)*tau_eff), &
left = prm%d_caron, & ! lower limit
right = dst%Lambda_sl(:,en)) ! upper limit
d_hat = mu*prm%b_sl/(8.0_pREAL*PI*(1.0_pREAL-nu)*tau_eff)
d_hat = math_clip(d_hat, right = dst%Lambda_sl(:,en)) ! upper limit
d_hat = math_clip(d_hat, left = prm%d_caron) ! lower limit
dot_rho_dip_formation = merge(dot_gamma * 2.0_pREAL*(d_hat-prm%d_caron)/prm%b_sl * stt%rho_mob(:,en), &
0.0_pREAL, &
prm%dipoleformation)

View File

@ -674,9 +674,10 @@ module function dislotwin_dotState(Mp,ph,en) result(dotState)
d_hat = dst%Lambda_sl(i,en)
dot_rho_dip_formation(i) = 0.0_pREAL
else significantSlipStress
d_hat = math_clip(3.0_pREAL*mu*prm%b_sl(i)/(16.0_pREAL*PI*abs(tau)), &
left = prm%d_caron(i), &
right = dst%Lambda_sl(i,en))
d_hat = 3.0_pREAL*mu*prm%b_sl(i)/(16.0_pREAL*PI*abs(tau))
d_hat = math_clip(d_hat, right = dst%Lambda_sl(i,en))
d_hat = math_clip(d_hat, left = prm%d_caron(i))
dot_rho_dip_formation(i) = 2.0_pREAL*(d_hat-prm%d_caron(i))/prm%b_sl(i) &
* stt%rho_mob(i,en)*abs_dot_gamma_sl(i)
end if significantSlipStress