deallocate cmfd object added and changed hdf5 call in init

This commit is contained in:
Bryan Herman 2012-01-20 13:40:19 -05:00
parent 5e03ced37e
commit 5d24a5b36f
3 changed files with 21 additions and 4 deletions

View file

@ -238,7 +238,21 @@ contains
if (allocated(source_bank)) deallocate(source_bank)
! Deallocate cmfd
! if (allocated(cmfd)) deallocate(cmfd)
if (allocated(cmfd % totalxs)) deallocate(cmfd % totalxs)
if (allocated(cmfd % p1scattxs)) deallocate(cmfd % p1scattxs)
if (allocated(cmfd % scattxs)) deallocate(cmfd % scattxs)
if (allocated(cmfd % nfissxs)) deallocate(cmfd % nfissxs)
if (allocated(cmfd % diffcof)) deallocate(cmfd % diffcof)
if (allocated(cmfd % current)) deallocate(cmfd % current)
if (allocated(cmfd % flux)) deallocate(cmfd % flux)
if (allocated(cmfd % dtilde)) deallocate(cmfd % dtilde)
if (allocated(cmfd % dhat)) deallocate(cmfd % dhat)
if (allocated(cmfd % hxyz)) deallocate(cmfd % hxyz)
if (allocated(cmfd % coremap)) deallocate(cmfd % coremap)
if (allocated(cmfd % phi)) deallocate(cmfd % phi)
if (allocated(cmfd % sourcepdf)) deallocate(cmfd % sourcepdf)
if (allocated(cmfd % sourcecounts)) deallocate(cmfd % sourcecounts)
if (allocated(cmfd % weightfactors)) deallocate(cmfd % weightfactors)
end subroutine free_memory

View file

@ -26,7 +26,7 @@ module initialize
#endif
#ifdef HDF5
use hdf5_interface, only: hdf5_open_output, hdf5_write_summary
use hdf5_interface, only: hdf5_create_output, hdf5_write_summary
#endif
implicit none
@ -61,8 +61,8 @@ contains
call create_summary_file()
#ifdef HDF5
! Open HDF5 output file for writing
call hdf5_open_output()
! Create HDF5 output file for writing
call hdf5_create_output()
call hdf5_write_summary()
#endif

View file

@ -52,6 +52,9 @@ program main
! run diffusion
call cmfd_solver()
! deallocate arrays
call free_memory()
! terminate code
stop