no need to repeat the same code

This commit is contained in:
Martin Diehl 2019-01-31 09:14:02 +01:00
parent cbeb3dcff0
commit aabd98bee9
1 changed files with 18 additions and 55 deletions

View File

@ -1725,23 +1725,6 @@ subroutine integrateStateFPI()
endif
end function damper
!--------------------------------------------------------------------------------------------------
!> @brief determines whether a point is converged
!--------------------------------------------------------------------------------------------------
logical pure function converged(residuum,state,aTol)
use prec, only: &
dEq0
use numerics, only: &
rTol => rTol_crystalliteState
implicit none
real(pReal), intent(in), dimension(:) ::&
residuum, state, aTol
converged = all(abs(residuum) <= max(aTol, rTol*abs(state)))
end function converged
end subroutine integrateStateFPI
@ -1870,25 +1853,6 @@ subroutine integrateStateAdaptiveEuler()
if (any(plasticState(:)%nonlocal)) call nonlocalConvergenceCheck
contains
!--------------------------------------------------------------------------------------------------
!> @brief determines whether a point is converged
!--------------------------------------------------------------------------------------------------
logical pure function converged(residuum,state,aTol)
use prec, only: &
dEq0
use numerics, only: &
rTol => rTol_crystalliteState
implicit none
real(pReal), intent(in), dimension(:) ::&
residuum, state, aTol
converged = all(abs(residuum) <= max(aTol, rTol*abs(state)))
end function converged
end subroutine integrateStateAdaptiveEuler
@ -2141,25 +2105,6 @@ subroutine integrateStateRKCK45()
call setConvergenceFlag
if (any(plasticState(:)%nonlocal)) call nonlocalConvergenceCheck
contains
!--------------------------------------------------------------------------------------------------
!> @brief determines whether a point is converged
!--------------------------------------------------------------------------------------------------
logical pure function converged(residuum,state,aTol)
use prec, only: &
dEq0
use numerics, only: &
rTol => rTol_crystalliteState
implicit none
real(pReal), intent(in), dimension(:) ::&
residuum, state, aTol
converged = all(abs(residuum) <= max(aTol, rTol*abs(state)))
end function converged
end subroutine integrateStateRKCK45
@ -2201,6 +2146,24 @@ subroutine setConvergenceFlag()
end subroutine setConvergenceFlag
!--------------------------------------------------------------------------------------------------
!> @brief determines whether a point is converged
!--------------------------------------------------------------------------------------------------
logical pure function converged(residuum,state,aTol)
use prec, only: &
dEq0
use numerics, only: &
rTol => rTol_crystalliteState
implicit none
real(pReal), intent(in), dimension(:) ::&
residuum, state, aTol
converged = all(abs(residuum) <= max(aTol, rTol*abs(state)))
end function converged
!--------------------------------------------------------------------------------------------------
!> @brief Standard forwarding of state as state = state0 + dotState * (delta t)
!--------------------------------------------------------------------------------------------------