store load case (full reproducibility for grid solver)
This commit is contained in:
parent
e01d271ee4
commit
ddb0429a1d
|
@ -119,9 +119,10 @@ function IO_read(fileName) result(fileContent)
|
|||
character(len=:), allocatable :: fileContent
|
||||
|
||||
integer :: &
|
||||
fileLength, &
|
||||
fileUnit, &
|
||||
myStat
|
||||
integer(pI64) :: &
|
||||
fileLength
|
||||
|
||||
|
||||
inquire(file = fileName, size=fileLength)
|
||||
|
|
|
@ -107,6 +107,8 @@ program DAMASK_grid
|
|||
step_bc, &
|
||||
step_mech, &
|
||||
step_discretization
|
||||
character(len=:), allocatable :: &
|
||||
fileContent
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! init DAMASK (all modules)
|
||||
|
@ -127,6 +129,12 @@ program DAMASK_grid
|
|||
if (stagItMax < 0) call IO_error(301,ext_msg='maxStaggeredIter')
|
||||
if (maxCutBack < 0) call IO_error(301,ext_msg='maxCutBack')
|
||||
|
||||
if (worldrank == 0) then
|
||||
fileContent = IO_read(interface_loadFile)
|
||||
call results_openJobFile(parallel=.false.)
|
||||
call results_writeDataset_str(fileContent,'setup',interface_loadFile,'load case definition (grid solver)')
|
||||
call results_closeJobFile
|
||||
endif
|
||||
config_load => YAML_parse_file(trim(interface_loadFile))
|
||||
solver => config_load%get('solver')
|
||||
|
||||
|
|
|
@ -68,9 +68,6 @@ subroutine discretization_grid_init(restart)
|
|||
devNull, z, z_offset
|
||||
integer, dimension(worldsize) :: &
|
||||
displs, sendcounts
|
||||
integer :: fileUnit, myStat
|
||||
integer(pI64) :: &
|
||||
fileLength
|
||||
character(len=:), allocatable :: &
|
||||
fileContent
|
||||
|
||||
|
@ -79,13 +76,7 @@ subroutine discretization_grid_init(restart)
|
|||
|
||||
|
||||
if(worldrank == 0) then
|
||||
inquire(file = trim(interface_geomFile), size=fileLength)
|
||||
open(newunit=fileUnit, file=trim(interface_geomFile), access='stream',&
|
||||
status='old', position='rewind', action='read',iostat=myStat)
|
||||
if(myStat /= 0) call IO_error(100,ext_msg=trim(interface_geomFile))
|
||||
allocate(character(len=fileLength)::fileContent)
|
||||
read(fileUnit) fileContent
|
||||
close(fileUnit)
|
||||
fileContent = IO_read(interface_geomFile)
|
||||
call readVTI(grid,geomSize,origin,materialAt_global,fileContent)
|
||||
call results_openJobFile(parallel=.false.)
|
||||
call results_writeDataset_str(fileContent,'setup',interface_geomFile,'geometry definition (grid solver)')
|
||||
|
|
Loading…
Reference in New Issue