From f905a97cdfaf7d60ba4bd6c9aa30a8d2adfd2914 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 12 Apr 2012 08:03:08 +0000 Subject: [PATCH] fixed bug (causing sigsev) concerning new functions mesh_spectral_get*** --- code/DAMASK_spectral.f90 | 8 ++++---- code/DAMASK_spectral_AL.f90 | 10 +++++----- code/spectral_quit.f90 | 1 - 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/code/DAMASK_spectral.f90 b/code/DAMASK_spectral.f90 index 1ded8ed4a..45f7070fd 100644 --- a/code/DAMASK_spectral.f90 +++ b/code/DAMASK_spectral.f90 @@ -362,9 +362,9 @@ program DAMASK_spectral !-------------------------------------------------------------------------------------------------- ! get resolution, dimension, homogenization and variables derived from resolution - res = mesh_spectral_getResolution(myUnit) - geomdim = mesh_spectral_getDimension(myUnit) - homog = mesh_spectral_getHomogenization(myUnit) + res = mesh_spectral_getResolution() + geomdim = mesh_spectral_getDimension() + homog = mesh_spectral_getHomogenization() res1_red = res(1)/2_pInt + 1_pInt ! size of complex array in first dimension (c2r, r2c) Npoints = res(1)*res(2)*res(3) wgt = 1.0_pReal/real(Npoints, pReal) @@ -1062,4 +1062,4 @@ C_ref = C * wgt call fftw_destroy_plan(plan_scalarField_back) endif call quit(1_pInt) -end program DAMASK_spectral \ No newline at end of file +end program DAMASK_spectral diff --git a/code/DAMASK_spectral_AL.f90 b/code/DAMASK_spectral_AL.f90 index 4adbe9ab9..313ea8b1b 100644 --- a/code/DAMASK_spectral_AL.f90 +++ b/code/DAMASK_spectral_AL.f90 @@ -322,9 +322,9 @@ program DAMASK_spectral_AL !-------------------------------------------------------------------------------------------------- ! get resolution, dimension, homogenization and variables derived from resolution - res = mesh_spectral_getResolution(myUnit) - geomdim = mesh_spectral_getDimension(myUnit) - homog = mesh_spectral_getHomogenization(myUnit) + res = mesh_spectral_getResolution() + geomdim = mesh_spectral_getDimension() + homog = mesh_spectral_getHomogenization() res1_red = res(1)/2_pInt + 1_pInt ! size of complex array in first dimension (c2r, r2c) Npoints = res(1)*res(2)*res(3) wgt = 1.0_pReal/real(Npoints, pReal) @@ -861,7 +861,7 @@ program DAMASK_spectral_AL write(6,'(a,es14.7)') 'max abs err F', err_f_point write(6,'(a,es14.7)') 'max abs err P', err_p_point err_crit = max(err_p/1e-3, err_f/1e-4,err_div/err_div_tol,err_stress/err_stress_tol) - write(6,'(a)') 'critical error', err_crit + write(6,'(a,es14.7)') 'critical error', err_crit if (.not. callCPFEM) then if(err_crit < 1.0_pReal .or. guesses >= guessmax) callCPFEM = .true. @@ -909,4 +909,4 @@ program DAMASK_spectral_AL close(538) call fftw_destroy_plan(plan_lambda); call fftw_destroy_plan(plan_correction) call quit(1_pInt) -end program DAMASK_spectral_AL \ No newline at end of file +end program DAMASK_spectral_AL diff --git a/code/spectral_quit.f90 b/code/spectral_quit.f90 index 2ed5740b2..6a5cad04c 100644 --- a/code/spectral_quit.f90 +++ b/code/spectral_quit.f90 @@ -53,7 +53,6 @@ subroutine quit(stop_id) write(6,'(a,2(i2.2,a),i2.2)') 'Time: ',dateAndTime(5),':',& dateAndTime(6),':',& dateAndTime(7) - write(6,'(/,a)') 'Exit code:' if (stop_id == 1_pInt) stop 1 ! normal termination if (stop_id <= 0_pInt) then ! trigger regridding write(6,'(a,i6)') 'restart a', stop_id*(-1_pInt)