From cf1ace33032acb370b383c6e72bf7b33b830ef3c Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Sun, 2 Mar 2014 19:39:16 -0500 Subject: [PATCH] added option to reset dhats --- src/cmfd_data.F90 | 6 ------ src/cmfd_execute.F90 | 2 +- src/cmfd_input.F90 | 8 ++++++++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/cmfd_data.F90 b/src/cmfd_data.F90 index 7962760cbf..df6b38e910 100644 --- a/src/cmfd_data.F90 +++ b/src/cmfd_data.F90 @@ -305,8 +305,6 @@ contains if (associated(m)) nullify(m) #ifdef CMFD_DEBUG - open(file='cmfd_src_' // trim(to_str(current_batch)) // '.dat', unit=100) - open(file='source_bank_' // trim(to_str(current_batch)) // '.dat', unit=101) open(file='openmc_src_' // trim(to_str(current_batch)) // '.dat', unit=102) open(file='totalxs1_' // trim(to_str(current_batch)) // '.dat', unit=103) open(file='totalxs2_' // trim(to_str(current_batch)) // '.dat', unit=104) @@ -343,8 +341,6 @@ contains ((cmfd % current(4*l-2,2,i,j,1) - & cmfd % current(4*l-3,2,i,j,1))) end do - write(100,*) cmfd % cmfd_src(1,i,j,1) - write(101,*) cmfd % sourcecounts(1,i,j,1) write(102,*) cmfd % openmc_src(1,i,j,1) write(103,*) cmfd % totalxs(1,i,j,1) write(104,*) cmfd % totalxs(2,i,j,1) @@ -366,8 +362,6 @@ contains write(120,*) leak2 end do end do - close(100) - close(101) close(102) close(103) close(104) diff --git a/src/cmfd_execute.F90 b/src/cmfd_execute.F90 index a1b8853042..f89f8c3c46 100644 --- a/src/cmfd_execute.F90 +++ b/src/cmfd_execute.F90 @@ -243,7 +243,7 @@ contains open(file='cmfd_src_' // trim(to_str(current_batch)) // '.dat', unit=100) do i = 1, nx do j = 1,ny - write(100,*) cmfd % sourcecounts(1,i,j,1) + write(100,*) cmfd % cmfd_src(1,i,j,1) end do end do close(100) diff --git a/src/cmfd_input.F90 b/src/cmfd_input.F90 index 93454ce4c2..39c780173f 100644 --- a/src/cmfd_input.F90 +++ b/src/cmfd_input.F90 @@ -165,6 +165,14 @@ contains cmfd_downscatter = .true. end if + ! Run an adjoint calc + if (check_for_node(doc, "dhat_reset")) then + call get_node_value(doc, "dhat_reset", temp_str) + call lower_case(temp_str) + if (trim(temp_str) == 'true' .or. trim(temp_str) == '1') & + dhat_reset = .true. + end if + ! Set the solver type if (check_for_node(doc, "solver")) & call get_node_value(doc, "solver", cmfd_solver_type)