mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Fixed mesh tallies for two dimensions and increased xml-fortran buffer length to 10000.
This commit is contained in:
parent
5c8cacd046
commit
ac2c500933
3 changed files with 17 additions and 5 deletions
11
src/mesh.f90
11
src/mesh.f90
|
|
@ -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
|
||||
|
||||
!===============================================================================
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue