From 4bfc53db159fbe7bbb3f01e161d0a10d012877fe Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Tue, 2 Apr 2013 05:16:38 -0700 Subject: [PATCH] added base file for particle restarts --- src/DEPENDENCIES | 4 +++ src/OBJECTS | 1 + src/particle_restart.F90 | 56 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 src/particle_restart.F90 diff --git a/src/DEPENDENCIES b/src/DEPENDENCIES index 61c31dd909..433f62f679 100644 --- a/src/DEPENDENCIES +++ b/src/DEPENDENCIES @@ -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 diff --git a/src/OBJECTS b/src/OBJECTS index d53f0a543b..d9ec550f01 100644 --- a/src/OBJECTS +++ b/src/OBJECTS @@ -40,6 +40,7 @@ mesh_header.o \ mesh.o \ output.o \ particle_header.o \ +particle_restart.o \ physics.o \ plot.o \ plot_header.o \ diff --git a/src/particle_restart.F90 b/src/particle_restart.F90 new file mode 100644 index 0000000000..49cc5f3df8 --- /dev/null +++ b/src/particle_restart.F90 @@ -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