Minor tally derivative cleanup

This commit is contained in:
Sterling Harper 2019-01-26 14:32:46 -05:00
parent fe6fba2954
commit 69376894cc
4 changed files with 6 additions and 27 deletions

View file

@ -947,7 +947,6 @@ contains
type(XMLNode), allocatable :: node_tal_list(:)
type(XMLNode), allocatable :: node_filt_list(:)
type(XMLNode), allocatable :: node_trigger_list(:)
type(XMLNode), allocatable :: node_deriv_list(:)
type(DictEntryCI) :: elem
type(TallyDerivative), pointer :: deriv
@ -1004,11 +1003,6 @@ contains
call read_tally_derivatives(root % ptr)
do i = 0, n_tally_derivs() - 1
deriv => tally_deriv_c(i)
call tally_deriv_dict % set(deriv % id, i)
end do
! ==========================================================================
! READ FILTER DATA

View file

@ -102,14 +102,12 @@ read_tally_derivatives(pugi::xml_node* node)
fatal_error("Differential tallies not supported in multi-group mode");
}
/*
//! Set the flux derivatives on differential tallies to zero.
extern "C" void
zero_flux_derivs_c()
zero_flux_derivs()
{
for (auto& deriv : model::tally_derivs) deriv.flux_deriv = 0.;
}
*/
//==============================================================================
// Fortran interop

View file

@ -46,6 +46,11 @@ module tally
end subroutine score_analog_tally_
end interface
interface
subroutine zero_flux_derivs() bind(C)
end subroutine
end interface
contains
!===============================================================================
@ -3713,19 +3718,6 @@ contains
end do
end subroutine score_collision_derivative
!===============================================================================
! ZERO_FLUX_DERIVS Set the flux derivatives on differential tallies to zero.
!===============================================================================
subroutine zero_flux_derivs()
integer :: i
type(TallyDerivative), pointer :: deriv
do i = 0, n_tally_derivs() - 1
deriv => tally_deriv_c(i)
deriv % flux_deriv = ZERO
end do
end subroutine zero_flux_derivs
!===============================================================================
! ACCUMULATE_TALLIES accumulates the sum of the contributions from each history
! within the batch to a new random variable

View file

@ -2,8 +2,6 @@ module tally_derivative_header
use, intrinsic :: ISO_C_BINDING
use dict_header, only: DictIntInt
implicit none
!===============================================================================
@ -19,9 +17,6 @@ module tally_derivative_header
real(C_DOUBLE) :: flux_deriv
end type TallyDerivative
! Dictionary that maps user IDs to indices in 'tally_derivs'
type(DictIntInt), public :: tally_deriv_dict
interface
function n_tally_derivs() result(n) bind(C)
import C_INT