continued with sourced allocation and EOL improvements
This commit is contained in:
parent
118dff9f23
commit
ba89df7784
|
@ -52,7 +52,8 @@ program DAMASK_spectral_Driver
|
|||
IO_lc, &
|
||||
IO_intOut, &
|
||||
IO_warning, &
|
||||
IO_timeStamp
|
||||
IO_timeStamp, &
|
||||
IO_EOF
|
||||
use debug, only: &
|
||||
debug_level, &
|
||||
debug_spectral, &
|
||||
|
@ -169,7 +170,7 @@ program DAMASK_spectral_Driver
|
|||
rewind(FILEUNIT)
|
||||
do
|
||||
line = IO_read(FILEUNIT)
|
||||
if (trim(line) == '#EOF#') exit
|
||||
if (trim(line) == IO_EOF) exit
|
||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
||||
positions = IO_stringPos(line,maxNchunks)
|
||||
do i = 1_pInt, positions(1) ! reading compulsory parameters for loadcase
|
||||
|
@ -194,7 +195,7 @@ program DAMASK_spectral_Driver
|
|||
rewind(FILEUNIT)
|
||||
do
|
||||
line = IO_read(FILEUNIT)
|
||||
if (trim(line) == '#EOF#') exit
|
||||
if (trim(line) == IO_EOF) exit
|
||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
||||
currentLoadCase = currentLoadCase + 1_pInt
|
||||
positions = IO_stringPos(line,maxNchunks)
|
||||
|
|
|
@ -251,7 +251,7 @@ subroutine utilities_init()
|
|||
call c_f_pointer(tensorField, field_real, [grid(1)+2_pInt-mod(grid(1),2_pInt),grid(2),grid(3),3,3])! place a pointer for a real representation on tensorField
|
||||
call c_f_pointer(tensorField, field_fourier,[grid1Red, grid(2),grid(3),3,3])! place a pointer for a complex representation on tensorField
|
||||
call c_f_pointer(phaseFieldFFT,phaseField_real,[grid(1)+2_pInt-mod(grid(1),2_pInt),grid(2),grid(3)])! place a pointer for a real representation on tensorField
|
||||
call c_f_pointer(phaseFieldFFT,phaseField_fourier,[grid1Red,grid(2),grid(3)])! place a pointer for a complex representation on tensorField
|
||||
call c_f_pointer(phaseFieldFFT,phaseField_fourier,[grid1Red,grid(2),grid(3)]) ! place a pointer for a complex representation on tensorField
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! general initialization of FFTW (see manual on fftw.org for more details)
|
||||
|
@ -308,7 +308,7 @@ subroutine utilities_init()
|
|||
endif
|
||||
|
||||
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)
|
||||
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
|
||||
|
|
|
@ -172,38 +172,23 @@ subroutine homogenization_init()
|
|||
allocate(homogenization_state0(mesh_maxNips,mesh_NcpElems))
|
||||
allocate(homogenization_subState0(mesh_maxNips,mesh_NcpElems))
|
||||
allocate(homogenization_state(mesh_maxNips,mesh_NcpElems))
|
||||
allocate(homogenization_sizeState(mesh_maxNips,mesh_NcpElems))
|
||||
homogenization_sizeState = 0_pInt
|
||||
allocate(homogenization_sizePostResults(mesh_maxNips,mesh_NcpElems))
|
||||
homogenization_sizePostResults = 0_pInt
|
||||
allocate(materialpoint_heat(mesh_maxNips,mesh_NcpElems))
|
||||
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.
|
||||
|
||||
allocate(homogenization_sizeState(mesh_maxNips,mesh_NcpElems), source=0_pInt)
|
||||
allocate(homogenization_sizePostResults(mesh_maxNips,mesh_NcpElems), source=0_pInt)
|
||||
allocate(materialpoint_heat(mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
|
||||
allocate(materialpoint_dPdF(3,3,3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
|
||||
allocate(materialpoint_F0(3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue