mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
added base file for particle restarts
This commit is contained in:
parent
07a2f696b2
commit
4bfc53db15
3 changed files with 61 additions and 0 deletions
|
|
@ -264,6 +264,10 @@ output.o: tally_header.o
|
|||
|
||||
particle_header.o: constants.o
|
||||
|
||||
particle_restart.o: constants.o
|
||||
particle_restart.o: global.o
|
||||
particle_restart.o: hdf5_interface.o
|
||||
|
||||
physics.o: ace_header.o
|
||||
physics.o: constants.o
|
||||
physics.o: cross_section.o
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ mesh_header.o \
|
|||
mesh.o \
|
||||
output.o \
|
||||
particle_header.o \
|
||||
particle_restart.o \
|
||||
physics.o \
|
||||
plot.o \
|
||||
plot_header.o \
|
||||
|
|
|
|||
56
src/particle_restart.F90
Normal file
56
src/particle_restart.F90
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
module particle_restart
|
||||
|
||||
use constants
|
||||
use global
|
||||
use string
|
||||
|
||||
#ifdef HDF5
|
||||
use hdf5_interface
|
||||
#endif
|
||||
|
||||
private
|
||||
public :: write_particle_restart
|
||||
|
||||
integer(HID_T) :: hdf5_particle_file
|
||||
|
||||
contains
|
||||
|
||||
!===============================================================================
|
||||
! WRITE_PARTICLE_RESTART
|
||||
!===============================================================================
|
||||
|
||||
subroutine write_particle_restart()
|
||||
|
||||
character(MAX_FILE_LEN) :: filename
|
||||
|
||||
! set up file name
|
||||
filename = 'particle_'//to_str(p % id)//'.h5'
|
||||
|
||||
! create hdf5 file
|
||||
call h5fcreate_f(filename, H5F_ACC_TRUNC_F, hdf5_particle_file, hdf5_err)
|
||||
|
||||
! write data to file
|
||||
|
||||
|
||||
! close hdf5 file
|
||||
call h5fclose_f(hdf5_particle_file, hdf5_err)
|
||||
|
||||
end subroutine write_particle_restart
|
||||
|
||||
!===============================================================================
|
||||
! READ_PARTICLE_RESTART
|
||||
!===============================================================================
|
||||
|
||||
subroutine read_particle_restart
|
||||
|
||||
end subroutine read_particle_restart
|
||||
|
||||
!===============================================================================
|
||||
! RUN_PARTICLE_RESTART
|
||||
!===============================================================================
|
||||
|
||||
subroutine run_particle_restart
|
||||
|
||||
end subroutine run_particle_restart
|
||||
|
||||
end module particle_restart
|
||||
Loading…
Add table
Add a link
Reference in a new issue