fixed bug (causing sigsev) concerning new functions mesh_spectral_get***

This commit is contained in:
Martin Diehl 2012-04-12 08:03:08 +00:00
parent 8c559cbdc9
commit f905a97cdf
3 changed files with 9 additions and 10 deletions

View File

@ -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
end program DAMASK_spectral

View File

@ -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
end program DAMASK_spectral_AL

View File

@ -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)