From 579ced6a52aab319c3b4630459648438be12500b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 11 Jun 2020 08:44:24 +0200 Subject: [PATCH] removed global public variables --- src/DAMASK_marc.f90 | 3 --- src/crystallite.f90 | 3 --- src/debug.f90 | 55 +-------------------------------------------- 3 files changed, 1 insertion(+), 60 deletions(-) diff --git a/src/DAMASK_marc.f90 b/src/DAMASK_marc.f90 index fbff127e9..a653bcc00 100644 --- a/src/DAMASK_marc.f90 +++ b/src/DAMASK_marc.f90 @@ -307,9 +307,6 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, & computationMode = CPFEM_CALCRESULTS ! always calc if (lastLovl /= lovl) then - if (.not. terminallyIll) & - call debug_info() ! first reports (meaningful) debugging - call debug_reset() ! and resets debugging outdatedFFN1 = .false. cycleCounter = cycleCounter + 1 !mesh_cellnode = mesh_build_cellnodes() ! update cell node coordinates diff --git a/src/crystallite.f90 b/src/crystallite.f90 index c9fef3a51..14b624b0a 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -276,9 +276,6 @@ subroutine crystallite_init write(6,'(a42,1x,i10)') 'max # of constituents/integration point: ', cMax flush(6) endif - - call debug_info - call debug_reset #endif end subroutine crystallite_init diff --git a/src/debug.f90 b/src/debug.f90 index a0947c410..7564c3037 100644 --- a/src/debug.f90 +++ b/src/debug.f90 @@ -49,26 +49,11 @@ module debug debug_i = 1, & debug_g = 1 - integer, dimension(2), public :: & - debug_stressMaxLocation = 0, & - debug_stressMinLocation = 0, & - debug_jacobianMaxLocation = 0, & - debug_jacobianMinLocation = 0 - - - real(pReal), public :: & - debug_stressMax = -huge(1.0_pReal), & - debug_stressMin = huge(1.0_pReal), & - debug_jacobianMax = -huge(1.0_pReal), & - debug_jacobianMin = huge(1.0_pReal) - #ifdef PETSc character(len=1024), parameter, public :: & PETSCDEBUG = ' -snes_view -snes_monitor ' #endif - public :: debug_init, & - debug_reset, & - debug_info + public :: debug_init contains @@ -230,42 +215,4 @@ subroutine debug_init end subroutine debug_init - -!-------------------------------------------------------------------------------------------------- -!> @brief resets all debug values -!-------------------------------------------------------------------------------------------------- -subroutine debug_reset - - debug_stressMaxLocation = 0 - debug_stressMinLocation = 0 - debug_jacobianMaxLocation = 0 - debug_jacobianMinLocation = 0 - debug_stressMax = -huge(1.0_pReal) - debug_stressMin = huge(1.0_pReal) - debug_jacobianMax = -huge(1.0_pReal) - debug_jacobianMin = huge(1.0_pReal) - -end subroutine debug_reset - - -!-------------------------------------------------------------------------------------------------- -!> @brief writes debug statements to standard out -!-------------------------------------------------------------------------------------------------- -subroutine debug_info - - !$OMP CRITICAL (write2out) - debugOutputCPFEM: if (iand(debug_level(debug_CPFEM),debug_LEVELBASIC) /= 0 & - .and. any(debug_stressMinLocation /= 0) & - .and. any(debug_stressMaxLocation /= 0) ) then - write(6,'(2/,a,/)') ' Extreme values of returned stress and Jacobian' - write(6,'(a39)') ' value el ip' - write(6,'(a14,1x,e12.3,1x,i8,1x,i4)') ' stress min :', debug_stressMin, debug_stressMinLocation - write(6,'(a14,1x,e12.3,1x,i8,1x,i4)') ' max :', debug_stressMax, debug_stressMaxLocation - write(6,'(a14,1x,e12.3,1x,i8,1x,i4)') ' Jacobian min :', debug_jacobianMin, debug_jacobianMinLocation - write(6,'(a14,1x,e12.3,1x,i8,1x,i4,/)') ' max :', debug_jacobianMax, debug_jacobianMaxLocation - endif debugOutputCPFEM - !$OMP END CRITICAL (write2out) - -end subroutine debug_info - end module debug