2009-08-31 20:39:15 +05:30
|
|
|
!* $Id$
|
2008-01-11 00:23:57 +05:30
|
|
|
!##############################################################
|
|
|
|
MODULE debug
|
|
|
|
!##############################################################
|
2008-02-19 18:28:46 +05:30
|
|
|
use prec
|
2008-01-11 00:23:57 +05:30
|
|
|
|
2008-02-19 18:28:46 +05:30
|
|
|
implicit none
|
2009-06-15 18:41:21 +05:30
|
|
|
integer(pInt), dimension(:), allocatable :: debug_StressLoopDistribution
|
2009-08-11 22:01:57 +05:30
|
|
|
integer(pInt), dimension(:), allocatable :: debug_CrystalliteStateLoopDistribution
|
2009-06-15 18:41:21 +05:30
|
|
|
integer(pInt), dimension(:), allocatable :: debug_StiffnessStateLoopDistribution
|
|
|
|
integer(pInt), dimension(:), allocatable :: debug_CrystalliteLoopDistribution
|
2009-08-11 22:01:57 +05:30
|
|
|
integer(pInt), dimension(:), allocatable :: debug_MaterialpointStateLoopDistribution
|
|
|
|
integer(pInt), dimension(:), allocatable :: debug_MaterialpointLoopDistribution
|
2009-03-31 14:21:14 +05:30
|
|
|
integer(pLongInt) :: debug_cumLpTicks = 0_pInt
|
|
|
|
integer(pLongInt) :: debug_cumDotStateTicks = 0_pInt
|
2009-07-01 15:59:35 +05:30
|
|
|
integer(pLongInt) :: debug_cumDotTemperatureTicks = 0_pInt
|
2009-03-16 23:08:33 +05:30
|
|
|
integer(pInt) :: debug_cumLpCalls = 0_pInt
|
2009-03-20 20:04:24 +05:30
|
|
|
integer(pInt) :: debug_cumDotStateCalls = 0_pInt
|
2009-07-01 15:59:35 +05:30
|
|
|
integer(pInt) :: debug_cumDotTemperatureCalls = 0_pInt
|
2008-02-19 18:28:46 +05:30
|
|
|
logical :: debugger = .false.
|
2009-03-04 17:18:54 +05:30
|
|
|
logical :: distribution_init = .false.
|
2008-02-19 18:28:46 +05:30
|
|
|
|
|
|
|
CONTAINS
|
|
|
|
|
2009-10-22 14:44:17 +05:30
|
|
|
|
|
|
|
!********************************************************************
|
|
|
|
! initialize the debugging capabilities
|
|
|
|
!********************************************************************
|
2009-06-15 18:41:21 +05:30
|
|
|
subroutine debug_init()
|
|
|
|
|
|
|
|
use prec, only: pInt
|
|
|
|
use numerics, only: nStress, &
|
|
|
|
nState, &
|
2009-07-31 17:32:20 +05:30
|
|
|
nCryst, &
|
2009-08-11 22:01:57 +05:30
|
|
|
nMPstate, &
|
|
|
|
nHomog
|
2009-06-15 18:41:21 +05:30
|
|
|
implicit none
|
2009-06-18 19:58:02 +05:30
|
|
|
|
|
|
|
write(6,*)
|
|
|
|
write(6,*) '<<<+- debug init -+>>>'
|
2009-08-31 20:39:15 +05:30
|
|
|
write(6,*) '$Id$'
|
2009-06-18 19:58:02 +05:30
|
|
|
write(6,*)
|
2009-06-15 18:41:21 +05:30
|
|
|
|
2009-08-11 22:01:57 +05:30
|
|
|
allocate(debug_StressLoopDistribution(nStress)) ; debug_StressLoopDistribution = 0_pInt
|
|
|
|
allocate(debug_CrystalliteStateLoopDistribution(nState)); debug_CrystalliteStateLoopDistribution = 0_pInt
|
|
|
|
allocate(debug_StiffnessStateLoopDistribution(nState)) ; debug_StiffnessStateLoopDistribution = 0_pInt
|
|
|
|
allocate(debug_CrystalliteLoopDistribution(nCryst+1)) ; debug_CrystalliteLoopDistribution = 0_pInt
|
|
|
|
allocate(debug_MaterialpointStateLoopDistribution(nMPstate)) ; debug_MaterialpointStateLoopDistribution = 0_pInt
|
|
|
|
allocate(debug_MaterialpointLoopDistribution(nHomog+1)) ; debug_MaterialpointLoopDistribution = 0_pInt
|
2009-06-15 18:41:21 +05:30
|
|
|
endsubroutine
|
|
|
|
|
2009-05-07 21:57:36 +05:30
|
|
|
!********************************************************************
|
|
|
|
! reset debug distributions
|
|
|
|
!********************************************************************
|
2009-06-15 18:41:21 +05:30
|
|
|
subroutine debug_reset()
|
2009-05-07 21:57:36 +05:30
|
|
|
|
2009-06-15 18:41:21 +05:30
|
|
|
use prec
|
|
|
|
implicit none
|
2009-05-07 21:57:36 +05:30
|
|
|
|
2009-08-11 22:01:57 +05:30
|
|
|
debug_StressLoopDistribution = 0_pInt ! initialize debugging data
|
|
|
|
debug_CrystalliteStateLoopDistribution = 0_pInt
|
|
|
|
debug_StiffnessStateLoopDistribution = 0_pInt
|
|
|
|
debug_CrystalliteLoopDistribution = 0_pInt
|
|
|
|
debug_MaterialpointStateLoopDistribution = 0_pInt
|
|
|
|
debug_MaterialpointLoopDistribution = 0_pInt
|
2009-10-22 14:44:17 +05:30
|
|
|
debug_cumLpTicks = 0_pInt
|
|
|
|
debug_cumDotStateTicks = 0_pInt
|
2009-07-01 15:59:35 +05:30
|
|
|
debug_cumDotTemperatureTicks = 0_pInt
|
2009-10-22 14:44:17 +05:30
|
|
|
debug_cumLpCalls = 0_pInt
|
|
|
|
debug_cumDotStateCalls = 0_pInt
|
2009-07-01 15:59:35 +05:30
|
|
|
debug_cumDotTemperatureCalls = 0_pInt
|
2009-05-07 21:57:36 +05:30
|
|
|
|
2009-06-15 18:41:21 +05:30
|
|
|
endsubroutine
|
2008-02-19 18:28:46 +05:30
|
|
|
|
|
|
|
!********************************************************************
|
|
|
|
! write debug statements to standard out
|
|
|
|
!********************************************************************
|
2009-06-15 18:41:21 +05:30
|
|
|
subroutine debug_info()
|
2008-02-19 18:28:46 +05:30
|
|
|
|
|
|
|
use prec
|
2009-06-15 18:41:21 +05:30
|
|
|
use numerics, only: nStress, &
|
2009-08-11 22:01:57 +05:30
|
|
|
nState, &
|
|
|
|
nCryst, &
|
|
|
|
nMPstate, &
|
|
|
|
nHomog
|
2008-01-11 00:23:57 +05:30
|
|
|
implicit none
|
2008-02-19 18:28:46 +05:30
|
|
|
|
2009-10-22 14:44:17 +05:30
|
|
|
integer(pInt) i,integral
|
|
|
|
integer(pLongInt) tickrate
|
2009-06-15 18:41:21 +05:30
|
|
|
|
2009-10-22 14:44:17 +05:30
|
|
|
call system_clock(count_rate=tickrate)
|
2008-02-19 18:28:46 +05:30
|
|
|
|
2009-03-16 23:08:33 +05:30
|
|
|
write(6,*)
|
2008-02-19 18:28:46 +05:30
|
|
|
write(6,*) 'DEBUG Info'
|
2009-03-16 23:08:33 +05:30
|
|
|
write(6,*)
|
2009-10-22 14:44:17 +05:30
|
|
|
write(6,'(a33,x,i12)') 'total calls to LpAndItsTangent :',debug_cumLpCalls
|
2009-03-16 23:08:33 +05:30
|
|
|
if (debug_cumLpCalls > 0_pInt) then
|
2009-10-22 14:44:17 +05:30
|
|
|
write(6,'(a33,x,f12.3)') 'total CPU time/s :',dble(debug_cumLpTicks)/tickrate
|
|
|
|
write(6,'(a33,x,f12.6)') 'avg CPU time/microsecs per call :',&
|
|
|
|
dble(debug_cumLpTicks)*1.0e6_pReal/tickrate/debug_cumLpCalls
|
2009-03-16 23:08:33 +05:30
|
|
|
endif
|
|
|
|
write(6,*)
|
2009-10-22 14:44:17 +05:30
|
|
|
write(6,'(a33,x,i12)') 'total calls to dotState :',debug_cumDotStateCalls
|
2009-03-20 20:04:24 +05:30
|
|
|
if (debug_cumdotStateCalls > 0_pInt) then
|
2009-10-22 14:44:17 +05:30
|
|
|
write(6,'(a33,x,f12.3)') 'total CPU time/s :',dble(debug_cumDotStateTicks)/tickrate
|
|
|
|
write(6,'(a33,x,f12.6)') 'avg CPU time/microsecs per call :',&
|
|
|
|
dble(debug_cumDotStateTicks)*1.0e6_pReal/tickrate/debug_cumDotStateCalls
|
2009-03-20 20:04:24 +05:30
|
|
|
endif
|
2009-07-01 15:59:35 +05:30
|
|
|
write(6,*)
|
2009-10-22 14:44:17 +05:30
|
|
|
write(6,'(a33,x,i12)') 'total calls to dotTemperature :',debug_cumDotTemperatureCalls
|
2009-07-01 15:59:35 +05:30
|
|
|
if (debug_cumdotTemperatureCalls > 0_pInt) then
|
2009-10-22 14:44:17 +05:30
|
|
|
write(6,'(a33,x,f12.3)') 'total CPU time/s :', dble(debug_cumDotTemperatureTicks)/tickrate
|
|
|
|
write(6,'(a33,x,f12.6)') 'avg CPU time/microsecs per call :',&
|
|
|
|
dble(debug_cumDotTemperatureTicks)*1.0e6_pReal/tickrate/debug_cumDotTemperatureCalls
|
2009-07-01 15:59:35 +05:30
|
|
|
endif
|
2009-05-07 21:57:36 +05:30
|
|
|
|
2009-03-16 23:08:33 +05:30
|
|
|
integral = 0_pInt
|
2009-05-07 21:57:36 +05:30
|
|
|
write(6,*)
|
|
|
|
write(6,*) 'distribution_StressLoop :'
|
|
|
|
do i=1,nStress
|
|
|
|
if (debug_StressLoopDistribution(i) /= 0) then
|
|
|
|
integral = integral + i*debug_StressLoopDistribution(i)
|
2009-08-11 22:01:57 +05:30
|
|
|
write(6,'(i25,x,i10)') i,debug_StressLoopDistribution(i)
|
2009-03-16 23:08:33 +05:30
|
|
|
endif
|
2008-02-19 18:28:46 +05:30
|
|
|
enddo
|
2009-08-11 22:01:57 +05:30
|
|
|
write(6,'(a15,i10,x,i10)') ' total',integral,sum(debug_StressLoopDistribution)
|
2008-02-19 18:28:46 +05:30
|
|
|
|
2009-03-16 23:08:33 +05:30
|
|
|
integral = 0_pInt
|
2009-05-07 21:57:36 +05:30
|
|
|
write(6,*)
|
2009-08-11 22:01:57 +05:30
|
|
|
write(6,*) 'distribution_CrystalliteStateLoop :'
|
2009-05-28 22:08:40 +05:30
|
|
|
do i=1,nState
|
2009-08-11 22:01:57 +05:30
|
|
|
if (debug_CrystalliteStateLoopDistribution(i) /= 0) then
|
|
|
|
integral = integral + i*debug_CrystalliteStateLoopDistribution(i)
|
|
|
|
write(6,'(i25,x,i10)') i,debug_CrystalliteStateLoopDistribution(i)
|
2009-05-07 21:57:36 +05:30
|
|
|
endif
|
|
|
|
enddo
|
2009-08-11 22:01:57 +05:30
|
|
|
write(6,'(a15,i10,x,i10)') ' total',integral,sum(debug_CrystalliteStateLoopDistribution)
|
2009-05-07 21:57:36 +05:30
|
|
|
|
|
|
|
integral = 0_pInt
|
|
|
|
write(6,*)
|
|
|
|
write(6,*) 'distribution_StiffnessStateLoop :'
|
2009-05-28 22:08:40 +05:30
|
|
|
do i=1,nState
|
2009-05-07 21:57:36 +05:30
|
|
|
if (debug_StiffnessStateLoopDistribution(i) /= 0) then
|
|
|
|
integral = integral + i*debug_StiffnessStateLoopDistribution(i)
|
2009-08-11 22:01:57 +05:30
|
|
|
write(6,'(i25,x,i10)') i,debug_StiffnessStateLoopDistribution(i)
|
2009-05-28 22:08:40 +05:30
|
|
|
endif
|
|
|
|
enddo
|
2009-08-11 22:01:57 +05:30
|
|
|
write(6,'(a15,i10,x,i10)') ' total',integral,sum(debug_StiffnessStateLoopDistribution)
|
2009-05-28 22:08:40 +05:30
|
|
|
|
|
|
|
integral = 0_pInt
|
|
|
|
write(6,*)
|
|
|
|
write(6,*) 'distribution_CrystalliteLoop :'
|
2009-08-11 22:01:57 +05:30
|
|
|
do i=1,nCryst+1
|
2009-05-28 22:08:40 +05:30
|
|
|
if (debug_CrystalliteLoopDistribution(i) /= 0) then
|
|
|
|
integral = integral + i*debug_CrystalliteLoopDistribution(i)
|
2009-08-11 22:01:57 +05:30
|
|
|
if (i <= nCryst) then
|
|
|
|
write(6,'(i25,x,i10)') i,debug_CrystalliteLoopDistribution(i)
|
|
|
|
else
|
|
|
|
write(6,'(i25,a1,i10)') i-1,'+',debug_CrystalliteLoopDistribution(i)
|
|
|
|
endif
|
2009-03-16 23:08:33 +05:30
|
|
|
endif
|
2008-02-19 18:28:46 +05:30
|
|
|
enddo
|
2009-08-11 22:01:57 +05:30
|
|
|
write(6,'(a15,i10,x,i10)') ' total',integral,sum(debug_CrystalliteLoopDistribution)
|
2008-02-19 18:28:46 +05:30
|
|
|
write(6,*)
|
|
|
|
|
2009-07-31 17:32:20 +05:30
|
|
|
!* Material point loop counter <<<updated 31.07.2009>>>
|
2009-08-11 22:01:57 +05:30
|
|
|
integral = 0_pInt
|
|
|
|
write(6,*)
|
|
|
|
write(6,*) 'distribution_MaterialpointStateLoop :'
|
|
|
|
do i=1,nMPstate
|
|
|
|
if (debug_MaterialpointStateLoopDistribution(i) /= 0) then
|
|
|
|
integral = integral + i*debug_MaterialpointStateLoopDistribution(i)
|
|
|
|
write(6,'(i25,x,i10)') i,debug_MaterialpointStateLoopDistribution(i)
|
|
|
|
endif
|
|
|
|
enddo
|
|
|
|
write(6,'(a15,i10,x,i10)') ' total',integral,sum(debug_MaterialpointStateLoopDistribution)
|
|
|
|
write(6,*)
|
|
|
|
|
2009-07-31 17:32:20 +05:30
|
|
|
integral = 0_pInt
|
|
|
|
write(6,*)
|
|
|
|
write(6,*) 'distribution_MaterialpointLoop :'
|
2009-08-11 22:01:57 +05:30
|
|
|
do i=1,nHomog+1
|
2009-07-31 17:32:20 +05:30
|
|
|
if (debug_MaterialpointLoopDistribution(i) /= 0) then
|
|
|
|
integral = integral + i*debug_MaterialpointLoopDistribution(i)
|
2009-08-11 22:01:57 +05:30
|
|
|
if (i <= nHomog) then
|
|
|
|
write(6,'(i25,x,i10)') i,debug_MaterialpointLoopDistribution(i)
|
|
|
|
else
|
|
|
|
write(6,'(i25,a1,i10)') i-1,'+',debug_MaterialpointLoopDistribution(i)
|
|
|
|
endif
|
2009-07-31 17:32:20 +05:30
|
|
|
endif
|
|
|
|
enddo
|
2009-08-11 22:01:57 +05:30
|
|
|
write(6,'(a15,i10,x,i10)') ' total',integral,sum(debug_MaterialpointLoopDistribution)
|
2009-07-31 17:32:20 +05:30
|
|
|
write(6,*)
|
constitutive_nonlocal:
- read in activation energy for dislocation glide from material.config
- changed naming of dDipMin/Max to dLower/dUpper
- added new outputs: rho_dot, rho_dot_dip, rho_dot_gen, rho_dot_sgl2dip, rho_dot_dip2sgl, rho_dot_ann_ath, rho_dot_ann_the, rho_dot_flux, d_upper_edge, d_upper_screw, d_upper_dot_edge, d_upper_dot_screw
- poisson's ratio is now calculated from elastic constants
- microstrucutre has state as first argument, since this is our output variable
- periodic boundary conditions are taken into account for fluxes and internal stresses. for the moment, flag has to be set in constitutive_nonlocal.
- corrected calculation for dipole formation by glide
- added terms for dipole formation/annihilation by stress decrease/increase
constitutive:
- passing of arguments is adapted for constitutive_nonlocal model
crystallite:
- in stiffness calculation: call to collect_dotState used wrong arguments
- crystallite_postResults uses own Tstar_v and temperature, no need for passing them from materialpoint_postResults
homogenization:
- crystallite_postResults uses own Tstar_v and temperature, no need for passing them from materialpoint_postResults
IO:
- changed error message 229
material.config:
- changed example for nonlocal constitution according to constitutive_nonlocal
all:
- added some flush statements
2009-10-20 20:06:03 +05:30
|
|
|
call flush(6)
|
2009-07-31 17:32:20 +05:30
|
|
|
|
2009-08-11 22:01:57 +05:30
|
|
|
|
2009-06-15 18:41:21 +05:30
|
|
|
endsubroutine
|
2008-01-11 00:23:57 +05:30
|
|
|
|
|
|
|
END MODULE debug
|