Removed id attribute from Bank derived type.

This commit is contained in:
Paul Romano 2012-08-18 13:10:49 -04:00
parent b73a89b31d
commit 94cf248159
6 changed files with 13 additions and 21 deletions

View file

@ -21,6 +21,8 @@ the problem at hand (mostly on the number of nuclides in the problem).
New Features
------------
- Option to specify <upper_right> for tally meshes.
---------
Bug Fixes
---------

View file

@ -14,7 +14,6 @@ module bank_header
! sites are sent from one processor to another.
sequence
integer(8) :: id ! Unique ID
real(8) :: wgt ! weight of bank site
real(8) :: xyz(3) ! location of bank particle
real(8) :: uvw(3) ! diretional cosines

View file

@ -159,9 +159,9 @@ contains
subroutine setup_mpi()
#ifdef MPI
integer :: bank_blocks(5) ! Count for each datatype
integer :: bank_types(5) ! Datatypes
integer(MPI_ADDRESS_KIND) :: bank_disp(5) ! Displacements
integer :: bank_blocks(4) ! Count for each datatype
integer :: bank_types(4) ! Datatypes
integer(MPI_ADDRESS_KIND) :: bank_disp(4) ! Displacements
type(Bank) :: b
mpi_enabled = .true.
@ -195,19 +195,18 @@ contains
end if
! Determine displacements for MPI_BANK type
call MPI_GET_ADDRESS(b % id, bank_disp(1), mpi_err)
call MPI_GET_ADDRESS(b % wgt, bank_disp(2), mpi_err)
call MPI_GET_ADDRESS(b % xyz, bank_disp(3), mpi_err)
call MPI_GET_ADDRESS(b % uvw, bank_disp(4), mpi_err)
call MPI_GET_ADDRESS(b % E, bank_disp(5), mpi_err)
call MPI_GET_ADDRESS(b % wgt, bank_disp(1), mpi_err)
call MPI_GET_ADDRESS(b % xyz, bank_disp(2), mpi_err)
call MPI_GET_ADDRESS(b % uvw, bank_disp(3), mpi_err)
call MPI_GET_ADDRESS(b % E, bank_disp(4), mpi_err)
! Adjust displacements
bank_disp = bank_disp - bank_disp(1)
! Define MPI_BANK for fission sites
bank_blocks = (/ 1, 1, 3, 3, 1 /)
bank_types = (/ MPI_INTEGER8, MPI_REAL8, MPI_REAL8, MPI_REAL8, MPI_REAL8 /)
call MPI_TYPE_CREATE_STRUCT(5, bank_blocks, bank_disp, &
bank_blocks = (/ 1, 3, 3, 1 /)
bank_types = (/ MPI_REAL8, MPI_REAL8, MPI_REAL8, MPI_REAL8 /)
call MPI_TYPE_CREATE_STRUCT(4, bank_blocks, bank_disp, &
bank_types, MPI_BANK, mpi_err)
call MPI_TYPE_COMMIT(MPI_BANK, mpi_err)

View file

@ -913,7 +913,6 @@ contains
if (nu == 0 .or. n_bank == 3*work) return
do i = int(n_bank,4) + 1, int(min(n_bank + nu, 3*work),4)
! Bank source neutrons by copying particle data
fission_bank(i) % id = p % id
fission_bank(i) % xyz = p % coord0 % xyz
! Set weight of fission bank site

View file

@ -45,14 +45,8 @@ contains
! Get pointer to source bank site
src => source_bank(i)
! Set ID of source bank site
id = bank_first + i - 1
src % id = id
! Set weight to one
src % wgt = ONE
! initialize random number seed
id = bank_first + i - 1
call set_particle_seed(id)
! sample external source distribution

View file

@ -15,7 +15,6 @@ class SourceFile(object):
for i in range(self.n_sites):
# Read position, angle, and energy
(uid,) = struct.unpack('q', self.f.read(8))
(weight,) = struct.unpack('d', self.f.read(8))
xyz = struct.unpack('3d', self.f.read(24))
uvw = struct.unpack('3d', self.f.read(24))