Changed plot to strickly serpent-style plots, and added mpi reduce

This commit is contained in:
nhorelik 2013-05-06 19:11:23 -04:00
parent 29fc61bb2a
commit 334b10077e
5 changed files with 29 additions and 12 deletions

View file

@ -187,6 +187,7 @@ hdf5_interface.o: string.o
hdf5_interface.o: tally_header.o
initialize.o: ace.o
initialize.o: ace_header.o
initialize.o: bank_header.o
initialize.o: constants.o
initialize.o: dict_header.o
@ -197,6 +198,7 @@ initialize.o: geometry_header.o
initialize.o: global.o
initialize.o: hdf5_interface.o
initialize.o: input_xml.o
initialize.o: material_header.o
initialize.o: output.o
initialize.o: random_lcg.o
initialize.o: source.o

View file

@ -1,6 +1,7 @@
module initialize
use ace, only: read_xs
use ace_header, only: Nuclide
use bank_header, only: Bank
use constants
use dict_header, only: DictIntInt, ElemKeyValueII
@ -11,6 +12,7 @@ module initialize
use global
use input_xml, only: read_input_xml, read_cross_sections_xml, &
cells_in_univ_dict, read_plots_xml
use material_header, only: Material
use output, only: title, header, write_summary, print_version, &
print_usage, write_xs_summary, print_plot
use random_lcg, only: initialize_prng
@ -42,6 +44,10 @@ contains
subroutine initialize_run()
integer :: i, j
type(Material), pointer :: mat => null()
type(Nuclide), pointer :: nuc => null()
! Start total and initialization timer
call time_total % start()
call time_initialize % start()
@ -98,10 +104,16 @@ contains
call read_xs()
call time_read_xs % stop()
TODO
! Set material fissionable flag
matnuc => nuclides(mat % nuclide(j))
if (matnuc % fissionable) mat % fissionable = .true.
do i = 1, n_materials
mat => materials(i)
do j = 1, mat % n_nuclides
! Set material fissionable flag
nuc => nuclides(mat % nuclide(j))
if (nuc % fissionable) mat % fissionable = .true.
end do
end do
! Construct unionized energy grid from cross-sections
if (grid_method == GRID_UNION) then

View file

@ -1018,7 +1018,6 @@ contains
type(ListChar) :: list_names ! temporary list of nuclide names
type(ListReal) :: list_density ! temporary list of nuclide densities
type(Material), pointer :: mat => null()
type(Nuclide), pointer :: matnuc => null()
type(nuclide_xml), pointer :: nuc => null()
type(sab_xml), pointer :: sab => null()
@ -2431,10 +2430,6 @@ contains
! Copy rxn rate type
select case (plot_(i) % rrtype)
case ("fission")
pl % rrtype = PLOT_RXN_FISSION
case ("absorption")
pl % rrtype = PLOT_RXN_ABSORPTION
case ("fluxthermal")
pl % rrtype = PLOT_RXN_FLUX_THERMAL
case ("fluxfast")

View file

@ -14,6 +14,10 @@ module plot
use progress_header
use string, only: to_str
#ifdef MPI
use mpi
#endif
implicit none
contains
@ -77,7 +81,6 @@ contains
if (bin == NO_BIN_FOUND) cycle
if (nuclides(p % event_nuclide) % fissionable) then
! pl % fisswgt(bin) = pl % fisswgt(bin) + keff * p % wgt_bank
n = nuclides(p % event_nuclide) % index_fission(1)
pl % fisswgt(bin) = pl% fisswgt(bin) + p % last_wgt * &
nuclides(p % event_nuclide) % reactions(n) % Q_value
@ -103,6 +106,13 @@ contains
if (.not. pl % type == PLOT_TYPE_RXNRATE) cycle
#ifdef MPI
call MPI_REDUCE(MPI_IN_PLACE, pl % fisswgt, size(pl % fisswgt), &
MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
call MPI_REDUCE(MPI_IN_PLACE, pl % fluxwgt, size(pl % fluxwgt), &
MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
#endif
pl % fisswgt = pl % fisswgt / maxval(pl % fisswgt)
pl % fluxwgt = pl % fluxwgt / maxval(pl % fluxwgt)

View file

@ -51,8 +51,6 @@ module plot_header
! Reaction rate plot types
integer, parameter :: PLOT_RXN_FLUX_THERMAL = 1
integer, parameter :: PLOT_RXN_FLUX_FAST = 2
integer, parameter :: PLOT_RXN_FISSION = 3
integer, parameter :: PLOT_RXN_ABSORPTION = 4
contains