diff --git a/code/mpie_cpfem_abaqus_exp.f b/code/mpie_cpfem_abaqus_exp.f index adcf8fe32..d5310db6f 100644 --- a/code/mpie_cpfem_abaqus_exp.f +++ b/code/mpie_cpfem_abaqus_exp.f @@ -114,7 +114,8 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, & symmetricSolver use math, only: invnrmMandel use debug, only: debug_info, & - debug_reset + debug_reset, & + verboseDebugger use mesh, only: mesh_FEasCP use CPFEM, only: CPFEM_general,CPFEM_init_done use homogenization, only: materialpoint_sizeResults, materialpoint_results @@ -149,16 +150,20 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, & if ( .not. CPFEM_init_done ) then outdatedByNewInc = .false. - !$OMP CRITICAL (write2out) - write(6,'(i6,x,i2,x,a)') nElement(n),nMatPoint(n),'first call special case..!'; call flush(6) - !$OMP END CRITICAL (write2out) + if ( verboseDebugger ) then + !$OMP CRITICAL (write2out) + write(6,'(i6,x,i2,x,a)') nElement(n),nMatPoint(n),'first call special case..!'; call flush(6) + !$OMP END CRITICAL (write2out) + endif else if (theTime < totalTime) then ! reached convergence outdatedByNewInc = .true. - !$OMP CRITICAL (write2out) - write (6,'(i6,x,i2,x,a)') nElement(n),nMatPoint(n),'lastIncConverged + outdated'; call flush(6) - !$OMP END CRITICAL (write2out) + if ( verboseDebugger ) then + !$OMP CRITICAL (write2out) + write (6,'(i6,x,i2,x,a)') nElement(n),nMatPoint(n),'lastIncConverged + outdated'; call flush(6) + !$OMP END CRITICAL (write2out) + endif endif @@ -176,14 +181,16 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, & theTime = totalTime ! record current starting time - !$OMP CRITICAL (write2out) - write(6,'(a16,x,i2,x,a,i5,x,i5,a)') 'computationMode',computationMode,'(',nElement(n),nMatPoint(n),')'; call flush(6) - !$OMP END CRITICAL (write2out) + if ( verboseDebugger ) then + !$OMP CRITICAL (write2out) + write(6,'(a16,x,i2,x,a,i5,x,i5,a)') 'computationMode',computationMode,'(',nElement(n),nMatPoint(n),')'; call flush(6) + !$OMP END CRITICAL (write2out) + endif - defgrd0 = 0.0_pReal - defgrd1 = 0.0_pReal - temp = tempOld(n) - timeInc = dt + defgrd0 = 0.0_pReal + defgrd1 = 0.0_pReal + temp = tempOld(n) + timeInc = dt ! ABAQUS explicit: deformation gradient as vector 11, 22, 33, 12, 23, 31, 21, 32, 13 ! ABAQUS explicit: deformation gradient as vector 11, 22, 33, 12, 21 @@ -241,4 +248,4 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, & integer(pInt) mpie_error call xit - end subroutine \ No newline at end of file + end subroutine diff --git a/code/mpie_cpfem_abaqus_std.f b/code/mpie_cpfem_abaqus_std.f index 787a4c992..786dbe389 100644 --- a/code/mpie_cpfem_abaqus_std.f +++ b/code/mpie_cpfem_abaqus_std.f @@ -76,7 +76,8 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,& symmetricSolver use math, only: invnrmMandel use debug, only: debug_info, & - debug_reset + debug_reset, & + verboseDebugger use mesh, only: mesh_FEasCP use CPFEM, only: CPFEM_general,CPFEM_init_done use homogenization, only: materialpoint_sizeResults, materialpoint_results @@ -100,21 +101,23 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,& real(pReal), dimension(6,6) :: ddsdde_h integer(pInt) computationMode, i, cp_en - if (noel == 1 .and. npt == 1) then -!$OMP CRITICAL (write2out) - write(6,*) 'el',noel,'ip',npt - write(6,*) 'got kinc as',kinc - write(6,*) 'got dStran',dstran - call flush(6) -!$OMP END CRITICAL (write2out) + if (verboseDebugger .and. noel == 1 .and. npt == 1) then + !$OMP CRITICAL (write2out) + write(6,*) 'el',noel,'ip',npt + write(6,*) 'got kinc as',kinc + write(6,*) 'got dStran',dstran + call flush(6) + !$OMP END CRITICAL (write2out) endif if ( .not. CPFEM_init_done ) then computationMode = 2 ! calc + init -!$OMP CRITICAL (write2out) - write(6,'(i6,x,i2,x,a)') noel,npt,'first call special case..!'; call flush(6) -!$OMP END CRITICAL (write2out) + if ( verboseDebugger ) then + !$OMP CRITICAL (write2out) + write(6,'(i6,x,i2,x,a)') noel,npt,'first call special case..!'; call flush(6) + !$OMP END CRITICAL (write2out) + endif else cp_en = mesh_FEasCP('elem',noel) @@ -124,9 +127,11 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,& terminallyIll = .false. cycleCounter = 0 - !$OMP CRITICAL (write2out) - write (6,'(i6,x,i2,x,a)') noel,npt,'lastIncConverged + outdated'; call flush(6) - !$OMP END CRITICAL (write2out) + if ( verboseDebugger ) then + !$OMP CRITICAL (write2out) + write (6,'(i6,x,i2,x,a)') noel,npt,'lastIncConverged + outdated'; call flush(6) + !$OMP END CRITICAL (write2out) + endif else if ( dtime < theDelta ) then ! or check for cutBack calcMode = .true. ! pretend last step was calculation @@ -134,9 +139,11 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,& terminallyIll = .false. cycleCounter = 0 - !$OMP CRITICAL (write2out) - write(6,'(i6,x,i2,x,a)') noel,npt,'cutback detected..!'; call flush(6) - !$OMP END CRITICAL (write2out) + if ( verboseDebugger ) then + !$OMP CRITICAL (write2out) + write(6,'(i6,x,i2,x,a)') noel,npt,'cutback detected..!'; call flush(6) + !$OMP END CRITICAL (write2out) + endif endif @@ -174,9 +181,11 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,& theInc = kinc ! record current increment number if (CPFEM_init_done) lastMode = calcMode(npt,cp_en) ! record calculationMode -!$OMP CRITICAL (write2out) - write(6,'(a16,x,i2,x,a,i5,a,i5,x,i5,a)') 'computationMode',computationMode,'(',cp_en,':',noel,npt,')'; call flush(6) -!$OMP END CRITICAL (write2out) + if ( verboseDebugger ) then + !$OMP CRITICAL (write2out) + write(6,'(a16,x,i2,x,a,i5,a,i5,x,i5,a)') 'computationMode',computationMode,'(',cp_en,':',noel,npt,')'; call flush(6) + !$OMP END CRITICAL (write2out) + endif call CPFEM_general(computationMode,dfgrd0,dfgrd1,temp,dtime,noel,npt,stress_h,ddsdde_h) @@ -219,4 +228,4 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,& integer(pInt) mpie_error call xit - end subroutine \ No newline at end of file + end subroutine