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
|
character(len=:), allocatable :: fileContent
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
fileLength, &
|
|
||||||
fileUnit, &
|
fileUnit, &
|
||||||
myStat
|
myStat
|
||||||
|
integer(pI64) :: &
|
||||||
|
fileLength
|
||||||
|
|
||||||
|
|
||||||
inquire(file = fileName, size=fileLength)
|
inquire(file = fileName, size=fileLength)
|
||||||
|
|
|
@ -107,6 +107,8 @@ program DAMASK_grid
|
||||||
step_bc, &
|
step_bc, &
|
||||||
step_mech, &
|
step_mech, &
|
||||||
step_discretization
|
step_discretization
|
||||||
|
character(len=:), allocatable :: &
|
||||||
|
fileContent
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! init DAMASK (all modules)
|
! init DAMASK (all modules)
|
||||||
|
@ -127,6 +129,12 @@ program DAMASK_grid
|
||||||
if (stagItMax < 0) call IO_error(301,ext_msg='maxStaggeredIter')
|
if (stagItMax < 0) call IO_error(301,ext_msg='maxStaggeredIter')
|
||||||
if (maxCutBack < 0) call IO_error(301,ext_msg='maxCutBack')
|
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))
|
config_load => YAML_parse_file(trim(interface_loadFile))
|
||||||
solver => config_load%get('solver')
|
solver => config_load%get('solver')
|
||||||
|
|
||||||
|
|
|
@ -68,9 +68,6 @@ subroutine discretization_grid_init(restart)
|
||||||
devNull, z, z_offset
|
devNull, z, z_offset
|
||||||
integer, dimension(worldsize) :: &
|
integer, dimension(worldsize) :: &
|
||||||
displs, sendcounts
|
displs, sendcounts
|
||||||
integer :: fileUnit, myStat
|
|
||||||
integer(pI64) :: &
|
|
||||||
fileLength
|
|
||||||
character(len=:), allocatable :: &
|
character(len=:), allocatable :: &
|
||||||
fileContent
|
fileContent
|
||||||
|
|
||||||
|
@ -79,13 +76,7 @@ subroutine discretization_grid_init(restart)
|
||||||
|
|
||||||
|
|
||||||
if(worldrank == 0) then
|
if(worldrank == 0) then
|
||||||
inquire(file = trim(interface_geomFile), size=fileLength)
|
fileContent = IO_read(interface_geomFile)
|
||||||
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)
|
|
||||||
call readVTI(grid,geomSize,origin,materialAt_global,fileContent)
|
call readVTI(grid,geomSize,origin,materialAt_global,fileContent)
|
||||||
call results_openJobFile(parallel=.false.)
|
call results_openJobFile(parallel=.false.)
|
||||||
call results_writeDataset_str(fileContent,'setup',interface_geomFile,'geometry definition (grid solver)')
|
call results_writeDataset_str(fileContent,'setup',interface_geomFile,'geometry definition (grid solver)')
|
||||||
|
|
Loading…
Reference in New Issue