Completed bin_to_mesh_indices subroutine. Added dependency of mesh on mesh_header.

This commit is contained in:
Paul Romano 2011-09-29 22:22:49 -04:00
parent 2581562ca6
commit 2b1e58b3ab
3 changed files with 24 additions and 1 deletions

View file

@ -109,6 +109,8 @@ main.o: string.o
main.o: tally.o
main.o: timing.o
mesh.o: mesh_header.o
mpi_routines.o: constants.o
mpi_routines.o: error.o
mpi_routines.o: global.o

View file

@ -91,6 +91,24 @@ contains
integer, intent(in) :: bin
integer, intent(out) :: ijk(:)
integer :: n_y
integer :: n_z
integer :: temp_bin
if (m % n_dimension == 2) then
n_y = m % dimension(2)
ijk(1) = (bin - 1)/n_y + 1
ijk(2) = mod(bin - 1, n_y) + 1
else if (m % n_dimension == 3) then
n_y = m % dimension(2)
n_z = m % dimension(3)
ijk(1) = (bin - 1)/(n_y*n_z) + 1
ijk(2) = mod(bin - 1, n_y*n_z)/n_z + 1
ijk(3) = mod(bin - 1, n_z) + 1
end if
end subroutine bin_to_mesh_indices
end module mesh

View file

@ -562,7 +562,10 @@ contains
string = ""
uid = t % mesh
sm => meshes(uid)
string = trim(string) // ' ' // trim(int_to_str(sm % uid))
string = trim(string) // ' ' // trim(int_to_str(sm % dimension(1)))
do i = 2, sm % n_dimension
string = trim(string) // ' x ' // trim(int_to_str(sm % dimension(i)))
end do
write(ou, *) ' Mesh Bins:' // trim(string)
end if