fixed bug when allocating core map, added new global var to detect cmfd_only runs

This commit is contained in:
Bryan Herman 2012-01-10 12:09:14 -05:00
parent 29853e4071
commit 7911291903
4 changed files with 12 additions and 5 deletions

View file

@ -52,7 +52,7 @@ contains
write(108,*) cmfd % dhat
! write cmfd object to hdf5 file
call write_hdf5()
! call write_hdf5()
! solve diffusion equation
call cmfd_solver()

View file

@ -59,6 +59,9 @@ contains
cmfd % coremap = reshape(mesh_ % map,(cmfd % indices(1:3)))
end if
! check for core map activation by printing note
if (allocated(cmfd % coremap)) print *,"Core Map Overlay Activated"
! create tally objects
call create_cmfd_tally()
@ -103,7 +106,7 @@ contains
if (.not. allocated(cmfd % current)) allocate(cmfd % current(12,ng,nx,ny,nz))
! allocate for coremap
if (.not. allocated(cmfd % coremap)) allocate(cmfd % coremap(nx,ny,nz))
if (cmfd_only) allocate(cmfd % coremap(nx,ny,nz))
end subroutine allocate_cmfd
@ -130,7 +133,7 @@ contains
if (allocated(cmfd % coremap)) then
! get idx from core map
nidx = ng*(cmfd % coremap(i,j,k)) + (ng - g)
nidx = ng*(cmfd % coremap(i,j,k)) - (ng - g)
else
@ -465,8 +468,6 @@ contains
! close file
close(UNIT=UNIT_CMFD)
STOP
end subroutine neutron_balance
!===============================================================================

View file

@ -191,6 +191,9 @@ module global
type(Timer) :: time_mat ! timer for mat building
type(Timer) :: time_power ! timer for power iteration
! Flag for CMFD only
logical :: cmfd_only = .FALSE.
! Trace for single particle
logical :: trace
integer :: trace_cycle

View file

@ -43,6 +43,9 @@ program main
! only perform diffusion
case('--cmfd_only')
! set CMFD only to true
cmfd_only = .TRUE.
! read in HDF5 file
call read_hdf5()