Fixed mesh tallies for two dimensions and increased xml-fortran buffer length to 10000.

This commit is contained in:
Paul Romano 2011-10-05 22:48:23 -04:00
parent 5c8cacd046
commit ac2c500933
3 changed files with 17 additions and 5 deletions

View file

@ -17,17 +17,24 @@ contains
integer, intent(out) :: bin
logical, intent(out) :: in_mesh
integer :: n
integer, allocatable :: ijk(:)
! Get number of dimensions
n = m % n_dimension
! Create indices array same size as xyz
allocate(ijk(size(xyz)))
allocate(ijk(n))
! Determine indices
call get_mesh_indices(m, xyz, ijk, in_mesh)
call get_mesh_indices(m, xyz(1:n), ijk, in_mesh)
! Convert indices to bin
bin = mesh_indices_to_bin(m, ijk)
! Release memory for ijk
deallocate(ijk)
end subroutine get_mesh_bin
!===============================================================================

View file

@ -726,8 +726,13 @@ contains
m => meshes(t % mesh)
allocate(ijk(m % n_dimension))
call bin_to_mesh_indices(m, bin, ijk)
label = "Index (" // trim(int_to_str(ijk(1))) // ", " // &
trim(int_to_str(ijk(2))) // ", " // trim(int_to_str(ijk(3))) // ")"
if (m % n_dimension == 2) then
label = "Index (" // trim(int_to_str(ijk(1))) // ", " // &
trim(int_to_str(ijk(2))) // ")"
elseif (m % n_dimension == 3) then
label = "Index (" // trim(int_to_str(ijk(1))) // ", " // &
trim(int_to_str(ijk(2))) // ", " // trim(int_to_str(ijk(3))) // ")"
end if
case (T_ENERGYIN)
E0 = t % energy_in(bin)
E1 = t % energy_in(bin + 1)

View file

@ -46,7 +46,7 @@ module xmlparse
implicit none
integer, parameter :: XML_BUFFER_LENGTH = 1000
integer, parameter :: XML_BUFFER_LENGTH = 10000
!===============================================================================
! XML_PARSE defines the data type that holds the parser information