From ffc2224cacb665867e69966dd59ed74d2340cd90 Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Mon, 7 Nov 2011 17:48:44 -0500 Subject: [PATCH] when cmfd tally is created, also stores spatial and energy dimensions in cmfd object --- src/cmfd_utils.f90 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cmfd_utils.f90 b/src/cmfd_utils.f90 index 205d95842a..89babbe094 100644 --- a/src/cmfd_utils.f90 +++ b/src/cmfd_utils.f90 @@ -1,5 +1,6 @@ module cmfd_utils + use cmfd_header use datatypes, only: dict_add_key, dict_get_key use error, only: fatal_error, warning use global @@ -104,6 +105,7 @@ contains integer :: id ! user-specified identifier integer :: index ! index in mesh array integer :: n ! size of arrays in mesh specification + integer :: ng=1 ! number of energy groups (default 1) integer :: n_words ! number of words read logical :: file_exists ! does cmfd.xml file exist? character(MAX_LINE_LEN) :: filename @@ -195,6 +197,7 @@ contains ! read and set incoming energy mesh filter if (len_trim(energy_) > 0) then call split_string(energy_,words,n_words) + ng = n_words allocate(t % energy_in(n_words)) do j = 1,n_words t % energy_in(j) = str_to_real(words(j)) @@ -267,6 +270,10 @@ contains end do + ! set dimensions in cmfd object + cmfd % indices(1:3) = m % dimension(1:3) ! sets spatial dimensions + cmfd % indices(4) = ng ! sets energy group dimension + end subroutine create_cmfd_tally end module cmfd_utils