more efficient rate calculation in updateState when subdt is zero
This commit is contained in:
parent
7928ce3ac3
commit
09c7affbbc
|
@ -226,13 +226,9 @@ function thermal_adiabatic_updateState(subdt, ip, el)
|
|||
.true.]
|
||||
|
||||
temperature (homog)%p(thermalMapping(homog)%p(ip,el)) = T
|
||||
if (subdt > tiny(0.0_pReal)) then
|
||||
temperatureRate(homog)%p(thermalMapping(homog)%p(ip,el)) = &
|
||||
(thermalState(homog)%state(1,offset) - thermalState(homog)%subState0(1,offset))/subdt
|
||||
else
|
||||
temperatureRate(homog)%p(thermalMapping(homog)%p(ip,el)) = 0.0_pReal
|
||||
endif
|
||||
|
||||
temperatureRate(homog)%p(thermalMapping(homog)%p(ip,el)) = &
|
||||
(thermalState(homog)%state(1,offset) - thermalState(homog)%subState0(1,offset))/(subdt+tiny(0.0_pReal))
|
||||
|
||||
end function thermal_adiabatic_updateState
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -227,13 +227,8 @@ function vacancyflux_isochempot_updateState(subdt, ip, el)
|
|||
.true.]
|
||||
|
||||
vacancyConc (homog)%p(vacancyfluxMapping(homog)%p(ip,el)) = Cv
|
||||
|
||||
if (subdt > tiny(0.0_pReal)) then
|
||||
vacancyConcRate(homog)%p(vacancyfluxMapping(homog)%p(ip,el)) = &
|
||||
(vacancyfluxState(homog)%state(1,offset) - vacancyfluxState(homog)%subState0(1,offset))/subdt
|
||||
else
|
||||
vacancyConcRate(homog)%p(vacancyfluxMapping(homog)%p(ip,el)) = 0.0_pReal
|
||||
endif
|
||||
vacancyConcRate(homog)%p(vacancyfluxMapping(homog)%p(ip,el)) = &
|
||||
(vacancyfluxState(homog)%state(1,offset) - vacancyfluxState(homog)%subState0(1,offset))/(subdt+tiny(0.0_pReal))
|
||||
|
||||
end function vacancyflux_isochempot_updateState
|
||||
|
||||
|
|
Loading…
Reference in New Issue