continued with sourced allocation and EOL improvements

This commit is contained in:
Martin Diehl 2013-12-16 11:58:03 +00:00
parent 118dff9f23
commit ba89df7784
3 changed files with 25 additions and 39 deletions

View File

@ -52,7 +52,8 @@ program DAMASK_spectral_Driver
IO_lc, & IO_lc, &
IO_intOut, & IO_intOut, &
IO_warning, & IO_warning, &
IO_timeStamp IO_timeStamp, &
IO_EOF
use debug, only: & use debug, only: &
debug_level, & debug_level, &
debug_spectral, & debug_spectral, &
@ -169,7 +170,7 @@ program DAMASK_spectral_Driver
rewind(FILEUNIT) rewind(FILEUNIT)
do do
line = IO_read(FILEUNIT) line = IO_read(FILEUNIT)
if (trim(line) == '#EOF#') exit if (trim(line) == IO_EOF) exit
if (IO_isBlank(line)) cycle ! skip empty lines if (IO_isBlank(line)) cycle ! skip empty lines
positions = IO_stringPos(line,maxNchunks) positions = IO_stringPos(line,maxNchunks)
do i = 1_pInt, positions(1) ! reading compulsory parameters for loadcase do i = 1_pInt, positions(1) ! reading compulsory parameters for loadcase
@ -194,7 +195,7 @@ program DAMASK_spectral_Driver
rewind(FILEUNIT) rewind(FILEUNIT)
do do
line = IO_read(FILEUNIT) line = IO_read(FILEUNIT)
if (trim(line) == '#EOF#') exit if (trim(line) == IO_EOF) exit
if (IO_isBlank(line)) cycle ! skip empty lines if (IO_isBlank(line)) cycle ! skip empty lines
currentLoadCase = currentLoadCase + 1_pInt currentLoadCase = currentLoadCase + 1_pInt
positions = IO_stringPos(line,maxNchunks) positions = IO_stringPos(line,maxNchunks)

View File

@ -308,7 +308,7 @@ subroutine utilities_init()
endif endif
if (debugFFTW) then if (debugFFTW) then
scalarField_realC = fftw_alloc_complex(int(product(grid),C_SIZE_T)) ! allocate data for real representation (no in place transform) scalarField_realC = fftw_alloc_complex(int(product(grid),C_SIZE_T)) ! allllocate data for real representation (no in place transform)
scalarField_fourierC = fftw_alloc_complex(int(product(grid),C_SIZE_T)) ! allocate data for fourier representation (no in place transform) scalarField_fourierC = fftw_alloc_complex(int(product(grid),C_SIZE_T)) ! allocate data for fourier representation (no in place transform)
call c_f_pointer(scalarField_realC, scalarField_real, grid) ! place a pointer for a real representation call c_f_pointer(scalarField_realC, scalarField_real, grid) ! place a pointer for a real representation
call c_f_pointer(scalarField_fourierC, scalarField_fourier, grid) ! place a pointer for a fourier representation call c_f_pointer(scalarField_fourierC, scalarField_fourier, grid) ! place a pointer for a fourier representation

View File

@ -172,38 +172,23 @@ subroutine homogenization_init()
allocate(homogenization_state0(mesh_maxNips,mesh_NcpElems)) allocate(homogenization_state0(mesh_maxNips,mesh_NcpElems))
allocate(homogenization_subState0(mesh_maxNips,mesh_NcpElems)) allocate(homogenization_subState0(mesh_maxNips,mesh_NcpElems))
allocate(homogenization_state(mesh_maxNips,mesh_NcpElems)) allocate(homogenization_state(mesh_maxNips,mesh_NcpElems))
allocate(homogenization_sizeState(mesh_maxNips,mesh_NcpElems)) allocate(homogenization_sizeState(mesh_maxNips,mesh_NcpElems), source=0_pInt)
homogenization_sizeState = 0_pInt allocate(homogenization_sizePostResults(mesh_maxNips,mesh_NcpElems), source=0_pInt)
allocate(homogenization_sizePostResults(mesh_maxNips,mesh_NcpElems)) allocate(materialpoint_heat(mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
homogenization_sizePostResults = 0_pInt allocate(materialpoint_dPdF(3,3,3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
allocate(materialpoint_heat(mesh_maxNips,mesh_NcpElems)) allocate(materialpoint_F0(3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
materialpoint_heat = 0.0_pReal
allocate(materialpoint_dPdF(3,3,3,3,mesh_maxNips,mesh_NcpElems))
materialpoint_dPdF = 0.0_pReal
allocate(materialpoint_F0(3,3,mesh_maxNips,mesh_NcpElems))
allocate(materialpoint_F(3,3,mesh_maxNips,mesh_NcpElems))
materialpoint_F = 0.0_pReal
allocate(materialpoint_subF0(3,3,mesh_maxNips,mesh_NcpElems))
materialpoint_subF0 = 0.0_pReal
allocate(materialpoint_subF(3,3,mesh_maxNips,mesh_NcpElems))
materialpoint_subF = 0.0_pReal
allocate(materialpoint_P(3,3,mesh_maxNips,mesh_NcpElems))
materialpoint_P = 0.0_pReal
allocate(materialpoint_subFrac(mesh_maxNips,mesh_NcpElems))
materialpoint_subFrac = 0.0_pReal
allocate(materialpoint_subStep(mesh_maxNips,mesh_NcpElems))
materialpoint_subStep = 0.0_pReal
allocate(materialpoint_subdt(mesh_maxNips,mesh_NcpElems))
materialpoint_subdt = 0.0_pReal
allocate(materialpoint_requested(mesh_maxNips,mesh_NcpElems))
materialpoint_requested = .false.
allocate(materialpoint_converged(mesh_maxNips,mesh_NcpElems))
materialpoint_converged = .true.
allocate(materialpoint_doneAndHappy(2,mesh_maxNips,mesh_NcpElems))
materialpoint_doneAndHappy = .true.
materialpoint_F0 = spread(spread(math_I3,3,mesh_maxNips),4,mesh_NcpElems) ! initialize to identity materialpoint_F0 = spread(spread(math_I3,3,mesh_maxNips),4,mesh_NcpElems) ! initialize to identity
materialpoint_F = materialpoint_F0 allocate(materialpoint_F(3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
materialpoint_F = materialpoint_F0 ! initialize to identity
allocate(materialpoint_subF0(3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
allocate(materialpoint_subF(3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
allocate(materialpoint_P(3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
allocate(materialpoint_subFrac(mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
allocate(materialpoint_subStep(mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
allocate(materialpoint_subdt(mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
allocate(materialpoint_requested(mesh_maxNips,mesh_NcpElems), source=.false.)
allocate(materialpoint_converged(mesh_maxNips,mesh_NcpElems), source=.true.)
allocate(materialpoint_doneAndHappy(2,mesh_maxNips,mesh_NcpElems), source=.true.)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! allocate and initialize global state and postresutls variables ! allocate and initialize global state and postresutls variables