Merged in latest updates to master

This commit is contained in:
Sterling Harper 2013-06-17 09:21:29 -04:00
commit 1b4cec54b1
27 changed files with 312 additions and 118 deletions

View file

@ -48,7 +48,7 @@ copyright = u'2011-2013, Massachusetts Institute of Technology'
# The short X.Y version.
version = "0.5"
# The full version, including alpha/beta/rc tags.
release = "0.5.1"
release = "0.5.2"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View file

@ -10,6 +10,7 @@ bugs fixed, and known issues for each successive release.
.. toctree::
:maxdepth: 1
notes_0.5.2
notes_0.5.1
notes_0.5.0
notes_0.4.4

View file

@ -0,0 +1,55 @@
.. _notes_0.5.2:
==============================
Release Notes for OpenMC 0.5.2
==============================
-------------------
System Requirements
-------------------
There are no special requirements for running the OpenMC code. As of this
release, OpenMC has been tested on a variety of Linux distributions, Mac OS X,
and Microsoft Windows 7. Memory requirements will vary depending on the size of
the problem at hand (mostly on the number of nuclides in the problem).
------------
New Features
------------
- Python script for mesh tally plotting
- Isotopic abundances based on IUPAC 2009 when using <element>
- Particle restart file
- Code will abort after certain number of lost particles (defaults to 10)
- Region outside lattice can be filled with material (void by default)
- 3D voxel plots
- Full HDF5/PHDF5 support (including support in statepoint.py)
- Cell overlap checking with -g command line flag (or when plotting)
---------
Bug Fixes
---------
- 7632f3_: Fixed bug in statepoint.py for multiple generations per batch.
- f85ac4_: Fix infinite loop bug in error module.
- 49c36b_: Don't convert surface ids if surface filter is for current tallies.
- 5ccc78_: Fix bug in reassignment of bins for mesh filter.
- b1f52f_: Fixed bug in plot color specification.
- eae7e5_: Fixed many memory leaks.
- 10c1cc_: Minor CMFD fixes.
- afdb50_: Add compatibility for XML comments without whitespace.
- a3c593_: Fixed bug in use of free gas scattering for H-1.
- 3a66e3_: Fixed bug in 2D mesh tally implementation.
- ab0793_: Corrected PETSC_NULL references to their correct types.
.. _7632f3: https://github.com/mit-crpg/openmc/commit/7632f3
.. _f85ac4: https://github.com/mit-crpg/openmc/commit/f85ac4
.. _49c36b: https://github.com/mit-crpg/openmc/commit/49c36b
.. _5ccc78: https://github.com/mit-crpg/openmc/commit/5ccc78
.. _b1f52f: https://github.com/mit-crpg/openmc/commit/b1f52f
.. _eae7e5: https://github.com/mit-crpg/openmc/commit/eae7e5
.. _10c1cc: https://github.com/mit-crpg/openmc/commit/10c1cc
.. _afdb50: https://github.com/mit-crpg/openmc/commit/afdb50
.. _a3c593: https://github.com/mit-crpg/openmc/commit/a3c593
.. _3a66e3: https://github.com/mit-crpg/openmc/commit/3a66e3
.. _ab0793: https://github.com/mit-crpg/openmc/commit/ab0793

View file

@ -288,7 +288,7 @@ SILO file can be created with:
import silomesh as sm
sm.init_silo("fluxtally.silo")
sm.init_mesh('tally_mesh',*mesh.dimension, *mesh.lower_left, *mesh.upper_right)
sm.init_mesh('tally_mesh', *mesh.dimension, *mesh.lower_left, *mesh.upper_right)
sm.init_var('flux_tally_thermal')
for x in range(1,nx+1):
for y in range(1,ny+1):

View file

@ -98,8 +98,38 @@ with the :envvar:`CROSS_SECTIONS` environment variable. It is recommended to add
a line in your ``.profile`` or ``.bash_profile`` setting the
:envvar:`CROSS_SECTIONS` environment variable.
Geometry Debugging
******************
Overlapping Cells
^^^^^^^^^^^^^^^^^
For fast run times, normal simulations do not check if the geometry is
incorrectly defined to have overlapping cells. This can lead to incorrect
results that may or may not be obvious when there are errors in the geometry
input file. The built-in 2D and 3D plotters will check for cell overlaps at
the center of every pixel or voxel position they process, however this might
not be a sufficient check to ensure correctly defined geometry. For instance,
if an overlap is of small aspect ratio, the plotting resolution might not be
high enough to produce any pixels in the overlapping area.
To reliably validate a geometry input, it is best to run the problem in
geometry debugging mode with the ``-g``, ``-geometry-debug``, or
``--geometry-debug`` command-line options. This will enable checks for
overlapping cells at every move of esch simulated particle. Depending on the
complexity of the geometry input file, this could add considerable overhead to
the run (these runs can still be done in parallel). As a result, for this run
mode the user will probably want to run fewer particles than a normal
simulation run. In this case it is important to be aware of how much coverage
each area of the geometry is getting. For instance, if certain regions do not
have many particles travelling through them there will not be many locations
where overlaps are checked for in that region. The user should refer to the
output after a geometry debug run to see how many checks were performed in each
cell, and then adjust the number of starting particles or starting source
distributions accordingly to achieve good coverage.
ERROR: After particle __ crossed surface __ it could not be located in any cell and it did not leak.
****************************************************************************************************
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This error can arise either if a problem is specified with no boundary
conditions or if there is an error in the geometry itself. First check to ensure
@ -120,5 +150,10 @@ has a collision. For example, if you received this error at cycle 5, generation
<trace>5 1 4032</trace>
For large runs it is often advantageous to run only the offending particle by
using particle restart mode with the ``-s``, ``-particle``, or ``--particle``
command-line options in conjunction with the particle restart files that are
created when particles are lost with this error.
.. _gfortran: http://gcc.gnu.org/wiki/GFortran
.. _mailing list: https://groups.google.com/forum/?fromgroups=#!forum/openmc-users

View file

@ -13,15 +13,16 @@ It is assumed that if no
is specified, the XML input files are present in the current directory.
.SH OPTIONS
.TP
.B "\-g\fR, \fP\-\-geometry-debug"
Run in geometry debugging mode, where cell overlaps are checked for after each
move of a particle
.TP
.B "\-p\fR, \fP\-\-plot"
Run in plotting mode
.TP
.BI \-r " statepoint" "\fR,\fP \-\-restart" " statepoint"
Restart a previous run using data stored in \fIstatepoint\fP.
.TP
.BI \-s " particleFile" "\fR,\fP \-\-particle" " particleFile"
Run a single particle history from a particle restart file named
\fIparticleFile\fP.
.BI \-r " binaryFile" "\fR,\fP \-\-restart" " binaryFile"
Restart a previous run from a state point or a particle restart file named
\fIbinaryFile\fP.
.TP
.B "\-v\fR, \fP\-\-version"
Show version information.

View file

@ -99,7 +99,6 @@ eigenvalue.o: cmfd_execute.o
eigenvalue.o: constants.o
eigenvalue.o: error.o
eigenvalue.o: global.o
eigenvalue.o: hdf5_interface.o
eigenvalue.o: math.o
eigenvalue.o: mesh.o
eigenvalue.o: mesh_header.o
@ -137,7 +136,6 @@ fission.o: search.o
fixed_source.o: constants.o
fixed_source.o: global.o
fixed_source.o: hdf5_interface.o
fixed_source.o: output.o
fixed_source.o: physics.o
fixed_source.o: random_lcg.o
@ -177,8 +175,9 @@ hdf5_summary.o: constants.o
hdf5_summary.o: endf.o
hdf5_summary.o: geometry_header.o
hdf5_summary.o: global.o
hdf5_summary.o: hdf5_interface.o
hdf5_summary.o: material_header.o
hdf5_summary.o: mesh_header.o
hdf5_summary.o: output_interface.o
hdf5_summary.o: output.o
hdf5_summary.o: string.o
hdf5_summary.o: tally_header.o
@ -193,7 +192,9 @@ initialize.o: geometry.o
initialize.o: geometry_header.o
initialize.o: global.o
initialize.o: hdf5_interface.o
initialize.o: hdf5_summary.o
initialize.o: input_xml.o
initialize.o: output_interface.o
initialize.o: output.o
initialize.o: random_lcg.o
initialize.o: source.o
@ -262,8 +263,12 @@ output.o: plot_header.o
output.o: string.o
output.o: tally_header.o
output_interface.o: constants.o
output_interface.o: error.o
output_interface.o: global.o
output_interface.o: hdf5_interface.o
output_interface.o: mpiio_interface.o
output_interface.o: tally_header.o
particle_header.o: constants.o
@ -334,9 +339,9 @@ source.o: output.o
source.o: particle_header.o
source.o: physics.o
source.o: random_lcg.o
source.o: state_point.o
source.o: string.o
state_point.o: constants.o
state_point.o: error.o
state_point.o: global.o
state_point.o: output.o

View file

@ -28,8 +28,9 @@ PETSC = no
# External Library Paths
#===============================================================================
MPI_DIR = /opt/mpich/3.0.2-$(COMPILER)
HDF5_DIR = /opt/hdf5/1.8.10-patch1-$(COMPILER)
MPI_DIR = /opt/mpich/3.0.4-$(COMPILER)
HDF5_DIR = /opt/hdf5/1.8.11-$(COMPILER)
PHDF5_DIR = /opt/phdf5/1.8.11-$(COMPILER)
PETSC_DIR = /opt/petsc/3.3-p6-$(COMPILER)
#===============================================================================
@ -44,7 +45,7 @@ GIT_SHA1 = $(shell git log -1 2>/dev/null | head -n 1 | awk '{print $$2}')
ifeq ($(COMPILER),gnu)
F90 = gfortran
F90FLAGS := -cpp -fbacktrace -DNO_F2008
F90FLAGS := -cpp -fbacktrace
LDFLAGS =
# Debugging
@ -165,20 +166,21 @@ endif
# Setup External Libraries
#===============================================================================
# MPI for distributed-memory parallelism
# MPI for distributed-memory parallelism and HDF5 for I/O
ifeq ($(MPI),yes)
F90 = $(MPI_DIR)/bin/mpif90
ifeq ($(HDF5),yes)
F90 = $(PHDF5_DIR)/bin/h5pfc
F90FLAGS += -DHDF5
else
F90 = $(MPI_DIR)/bin/mpif90
endif
F90FLAGS += -DMPI
endif
# HDF5 for I/O
ifeq ($(HDF5),yes)
F90FLAGS += -DHDF5 -I$(HDF5_DIR)/include
LDFLAGS += -L$(HDF5_DIR)/lib $(HDF5_DIR)/lib/libhdf5hl_fortran.a \
$(HDF5_DIR)/lib/libhdf5_hl.a $(HDF5_DIR)/lib/libhdf5_fortran.a \
$(HDF5_DIR)/lib/libhdf5.a -lz -lrt -lm -Wl,-rpath -Wl,$(HDF5_DIR)/lib
else
ifeq ($(HDF5),yes)
F90 = $(HDF5_DIR)/bin/h5fc
F90FLAGS += -DHDF5
endif
endif
# PETSC for CMFD functionality

View file

@ -8,7 +8,7 @@ module constants
! OpenMC major, minor, and release numbers
integer, parameter :: VERSION_MAJOR = 0
integer, parameter :: VERSION_MINOR = 5
integer, parameter :: VERSION_RELEASE = 1
integer, parameter :: VERSION_RELEASE = 2
! Revision numbers for binary files
integer, parameter :: REVISION_STATEPOINT = 9

View file

@ -29,7 +29,7 @@ contains
if (.not. master) return
! Write warning at beginning
write(OUTPUT_UNIT, fmt='(1X,A)', advance='no') 'WARNING: '
write(ERROR_UNIT, fmt='(1X,A)', advance='no') 'WARNING: '
! Set line wrapping and indentation
line_wrap = 80
@ -42,7 +42,7 @@ contains
do
if (length - i_start < line_wrap - indent + 1) then
! Remainder of message will fit on line
write(OUTPUT_UNIT, fmt='(A)') message(i_start+1:length)
write(ERROR_UNIT, fmt='(A)') message(i_start+1:length)
exit
else
@ -58,7 +58,7 @@ contains
i_end = i_end - 1
else
! Write up to last space
write(OUTPUT_UNIT, fmt='(A/A)', advance='no') &
write(ERROR_UNIT, fmt='(A/A)', advance='no') &
message(i_start+1:i_end-1), repeat(' ', indent)
end if

View file

@ -4,7 +4,8 @@ module finalize
use cmfd_output, only: finalize_cmfd
# endif
use global
use output, only: print_runtime, print_results, write_tallies
use output, only: print_runtime, print_results, &
print_overlap_check, write_tallies
use tally, only: tally_statistics
#ifdef MPI
@ -35,6 +36,7 @@ contains
if (output_tallies) then
if (master) call write_tallies()
end if
if (check_overlaps) call reduce_overlap_count()
end if
#ifdef PETSC
@ -50,6 +52,7 @@ contains
run_mode /= MODE_PARTICLE)) then
call print_runtime()
call print_results()
if (check_overlaps) call print_overlap_check()
end if
! deallocate arrays
@ -71,4 +74,22 @@ contains
end subroutine finalize_run
!===============================================================================
! REDUCE_OVERLAP_COUNT accumulates cell overlap check counts to master
!===============================================================================
subroutine reduce_overlap_count()
#ifdef MPI
if (master) then
call MPI_REDUCE(MPI_IN_PLACE, overlap_check_cnt, n_cells, &
MPI_INTEGER8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
else
call MPI_REDUCE(overlap_check_cnt, overlap_check_cnt, n_cells, &
MPI_INTEGER8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
end if
#endif
end subroutine reduce_overlap_count
end module finalize

View file

@ -62,6 +62,58 @@ contains
end function simple_cell_contains
!===============================================================================
! CHECK_CELL_OVERLAP checks for overlapping cells at the current particle's
! position using simple_cell_contains and the LocalCoord's built up by find_cell
!===============================================================================
subroutine check_cell_overlap()
integer :: i ! cell loop index on a level
integer :: n ! number of cells to search on a level
integer :: index_cell ! index in cells array
type(Cell), pointer :: c ! pointer to cell
type(Universe), pointer :: univ ! universe to search in
type(LocalCoord), pointer :: coord ! particle coordinate to search on
coord => p % coord0
! loop through each coordinate level
do while (associated(coord))
p % coord => coord
univ => universes(coord % universe)
n = univ % n_cells
! loop through each cell on this level
do i = 1, n
index_cell = univ % cells(i)
c => cells(index_cell)
if (simple_cell_contains(c)) then
! the particle should only be contained in one cell per level
if (index_cell /= coord % cell) then
message = "Overlapping cells detected: " // &
trim(to_str(cells(index_cell) % id)) // ", " // &
trim(to_str(cells(coord % cell) % id)) // &
" on universe " // trim(to_str(univ % id))
call fatal_error()
end if
overlap_check_cnt(index_cell) = overlap_check_cnt(index_cell) + 1
end if
end do
coord => coord % next
end do
end subroutine check_cell_overlap
!===============================================================================
! FIND_CELL determines what cell a source particle is in within a particular
! universe. If the base universe is passed, the particle should be found as long

View file

@ -274,6 +274,10 @@ module global
! screen and in logs
integer :: verbosity = 7
! Flag for enabling cell overlap checking during transport
logical :: check_overlaps = .false.
integer(8), allocatable :: overlap_check_cnt(:)
! Trace for single particle
logical :: trace
integer :: trace_batch
@ -399,6 +403,9 @@ contains
if (allocated(materials)) deallocate(materials)
if (allocated(plots)) deallocate(plots)
! Deallocate geometry debugging information
if (allocated(overlap_check_cnt)) deallocate(overlap_check_cnt)
! Deallocate cross section data, listings, and cache
if (allocated(nuclides)) then
! First call the clear routines

View file

@ -5,14 +5,15 @@ module initialize
use constants
use dict_header, only: DictIntInt, ElemKeyValueII
use energy_grid, only: unionized_grid
use error, only: fatal_error
use error, only: fatal_error, warning
use geometry, only: neighbor_lists
use geometry_header, only: Cell, Universe, Lattice, BASE_UNIVERSE
use global
use input_xml, only: read_input_xml, read_cross_sections_xml, &
cells_in_univ_dict, read_plots_xml
use output, only: title, header, write_summary, print_version, &
print_usage, write_xs_summary, print_plot
print_usage, write_xs_summary, print_plot, &
write_message
use output_interface, only: file_open, file_close, read_data
use random_lcg, only: initialize_prng
use source, only: initialize_source
@ -142,9 +143,17 @@ contains
end if
end if
! check for particle restart run
! Check for particle restart run
if (particle_restart_run) run_mode = MODE_PARTICLE
! Warn if overlap checking is on
if (master .and. check_overlaps) then
message = ""
call write_message()
message = "Cell overlap checking is ON"
call warning()
end if
! Stop initialization timer
call time_initialize % stop()
@ -316,6 +325,8 @@ contains
select case (argv(i))
case ('-p', '-plot', '--plot')
run_mode = MODE_PLOTTING
check_overlaps = .true.
case ('-n', '-n_particles', '--n_particles')
! Read number of particles per cycle
i = i + 1
@ -354,6 +365,9 @@ contains
path_state_point = argv(i)
restart_run = .true.
case ('-g', '-geometry-debug', '--geometry-debug')
check_overlaps = .true.
case ('-?', '-help', '--help')
call print_usage()
stop

View file

@ -626,6 +626,11 @@ contains
! Allocate cells array
allocate(cells(n_cells))
if (check_overlaps) then
allocate(overlap_check_cnt(n_cells))
overlap_check_cnt = 0
end if
n_universes = 0
do i = 1, n_cells
c => cells(i)

View file

@ -165,12 +165,13 @@ contains
write(OUTPUT_UNIT,*) 'Usage: openmc [options] [directory]'
write(OUTPUT_UNIT,*)
write(OUTPUT_UNIT,*) 'Options:'
write(OUTPUT_UNIT,*) ' -p, --plot Run in plotting mode'
write(OUTPUT_UNIT,*) ' -r, --restart Restart a previous run from a state point'
write(OUTPUT_UNIT,*) ' or a particle restart file'
write(OUTPUT_UNIT,*) ' -t, --tallies Write tally results from state point'
write(OUTPUT_UNIT,*) ' -v, --version Show version information'
write(OUTPUT_UNIT,*) ' -?, --help Show this message'
write(OUTPUT_UNIT,*) ' -g, --geometry-debug Run in geometry debugging mode'
write(OUTPUT_UNIT,*) ' -p, --plot Run in plotting mode'
write(OUTPUT_UNIT,*) ' -r, --restart Restart a previous run from a state point'
write(OUTPUT_UNIT,*) ' or a particle restart file'
write(OUTPUT_UNIT,*) ' -t, --tallies Write tally results from state point'
write(OUTPUT_UNIT,*) ' -v, --version Show version information'
write(OUTPUT_UNIT,*) ' -?, --help Show this message'
end if
end subroutine print_usage
@ -1478,6 +1479,42 @@ contains
end subroutine print_results
!===============================================================================
! PRINT_OVERLAP_DEBUG displays information regarding overlap checking results
!===============================================================================
subroutine print_overlap_check
integer :: i, j
integer :: num_sparse = 0
! display header block for geometry debugging section
call header("Cell Overlap Check Summary")
write(ou,100) 'Cell ID','No. Overlap Checks'
do i = 1, n_cells
write(ou,101) cells(i) % id, overlap_check_cnt(i)
if (overlap_check_cnt(i) < 10) num_sparse = num_sparse + 1
end do
write(ou,*)
write(ou,'(1X,A)') 'There were ' // trim(to_str(num_sparse)) // &
' cells with less than 10 overlap checks'
j = 0
do i = 1, n_cells
if (overlap_check_cnt(i) < 10) then
j = j + 1
write(ou,'(1X,A8)', advance='no') trim(to_str(cells(i) % id))
if (modulo(j,8) == 0) write(ou,*)
end if
end do
write(ou,*)
100 format (1X,A,T15,A)
101 format (1X,I8,T15,I12)
end subroutine print_overlap_check
!===============================================================================
! WRITE_TALLIES creates an output file and writes out the mean values of all
! tallies and their standard deviations

View file

@ -7,7 +7,8 @@ module physics
use error, only: fatal_error, warning
use fission, only: nu_total, nu_delayed
use geometry, only: find_cell, distance_to_boundary, &
cross_surface, cross_lattice
cross_surface, cross_lattice, &
check_cell_overlap
use geometry_header, only: Universe, BASE_UNIVERSE
use global
use interpolation, only: interpolate_tab1
@ -17,7 +18,6 @@ module physics
write_particle_track, &
finalize_particle_track
use particle_header, only: LocalCoord
! use particle_restart, only: write_particle_track
use particle_restart_write, only: write_particle_restart
use random_lcg, only: prn
use search, only: binary_search
@ -84,9 +84,9 @@ contains
do while (p % alive)
! Write particle track.
if (write_track) then
call write_particle_track()
endif
if (write_track) call write_particle_track()
if (check_overlaps) call check_cell_overlap()
! Calculate microscopic and macroscopic cross sections -- note: if the
! material is the same as the last material and the energy of the

View file

@ -2,8 +2,8 @@ module plot
use constants
use error, only: fatal_error
use geometry, only: find_cell
use geometry_header, only: Universe, BASE_UNIVERSE
use geometry, only: find_cell, check_cell_overlap
use geometry_header, only: Cell, BASE_UNIVERSE
use global
use output, only: write_message
use particle_header, only: deallocate_coord
@ -62,6 +62,7 @@ contains
p % coord => p % coord0
call find_cell(found_cell)
if (check_overlaps) call check_cell_overlap()
if (.not. found_cell) then
! If no cell, revert to default color

View file

@ -20,9 +20,7 @@ for src in glob.iglob('*.F90'):
dependencies[module] = sorted(list(deps))
keys = dependencies.keys()
keys.sort()
for module in keys:
for module in dependencies.keys():
for dep in dependencies[module]:
print("{0}.o: {1}.o".format(module, dep))
print('')

View file

@ -212,21 +212,24 @@ class XsdirTable(object):
@property
def alias(self):
zaid = self.zaid
Z = int(zaid[:-3])
A = zaid[-3:]
if zaid:
Z = int(zaid[:-3])
A = zaid[-3:]
if A == '000':
s = 'Nat'
elif zaid == '95242':
s = '242m'
elif zaid == '95642':
s = '242'
elif int(A) > 300:
s = str(int(A) - 400) + "m"
if A == '000':
s = 'Nat'
elif zaid == '95242':
s = '242m'
elif zaid == '95642':
s = '242'
elif int(A) > 300:
s = str(int(A) - 400) + "m"
else:
s = str(int(A))
return "{0}-{1}.{2}".format(elements[Z], s, self.xs)
else:
s = str(int(A))
return "{0}-{1}.{2}".format(elements[Z], s, self.xs)
return None
@property
def zaid(self):

View file

@ -5,7 +5,6 @@
import sys
import os
import matplotlib.pyplot as pyplot
if len(sys.argv) > 1:
# Get path to cross_sections.out file from command line argument
@ -56,8 +55,3 @@ print(' Secondary Energy Distributions = ' + str(sum(memory_energy)))
print(' Probability Tables = ' + str(sum(memory_urr)))
print(' S(a,b) Tables = ' + str(sum(memory_sab)))
print(' Total = ' + str(sum(memory_total)))
# Histograms
# pyplot.hist(memory_xs,100)
# pyplot.title('Memory for Cross Sections')
# pyplot.show()

View file

@ -1,34 +0,0 @@
#!/usr/bin/env python2
import struct
class SourceFile(object):
def __init__(self, filename):
# Open source file for reading
self.f = open(filename, 'r')
# Read number of source sites
self.n_sites = struct.unpack('q', self.f.read(8))[0]
# Create list to store source sites
self.sites = []
for i in range(self.n_sites):
# Read position, angle, and energy
(weight,) = struct.unpack('d', self.f.read(8))
xyz = struct.unpack('3d', self.f.read(24))
uvw = struct.unpack('3d', self.f.read(24))
(E,) = struct.unpack('d', self.f.read(8))
# Create source site and append to list
self.sites.append(SourceSite(weight, xyz, uvw, E))
class SourceSite(object):
def __init__(self, weight, xyz, uvw, E):
self.weight = weight
self.xyz = xyz
self.uvw = uvw
self.E = E
def __repr__(self):
return "<SourceSite: xyz={0} at E={1}>".format(self.xyz, self.E)

View file

@ -3,7 +3,7 @@
import sys
if len(sys.argv) != 3:
print "Must supply element and atom/b-cm"
print("Must supply element and atom/b-cm")
exit
element = sys.argv[1]

View file

@ -1,12 +1,9 @@
<?xml version="1.0"?>
<geometry>
<!-- Nested Cylinders with Tracking Error -->
<surface id="1" type="z-cylinder" coeffs="0.0 0.0 10.0" />
<surface id="2" type="z-cylinder" coeffs="0.0 0.0 20.0" boundary="reflective" />
<surface id="3" type="z-plane" coeffs="5.0" boundary="reflective" />
<surface id="4" type="z-plane" coeffs="-5.0" boundary="reflective" />
<cell id="1" material="1" surfaces="-1 3 -4" />
<cell id="2" material="1" surfaces="1 -2"/>
<!-- Sphere with no boundary condition -->
<surface id="1" type="sphere" coeffs="0.0 0.0 0.0 80.0" />
<surface id="2" type="sphere" coeffs="0.0 0.0 0.0 10000.0" boundary="vacuum" />
<cell id="1" material="1" surfaces="-1" />
</geometry>

View file

@ -2,7 +2,7 @@
<materials>
<material id="1">
<density value="4.5" units="g/cc" />
<density value="20.0" units="g/cc" />
<nuclide name="U-235" xs="70c" ao="1.0" />
</material>

View file

@ -9,7 +9,7 @@
<source>
<space type="box">
<parameters>-20 -20 -5 20 20 5</parameters>
<parameters>-10 -10 -5 10 10 5</parameters>
</space>
</source>

View file

@ -15,16 +15,16 @@ def test_run():
assert stderr != ''
def test_created_restart():
assert os.path.exists(pwd + '/particle_0.binary')
assert os.path.exists(pwd + '/particle_10_638.binary')
def test_run_restart():
proc = Popen([pwd + '/../../src/openmc -s particle_0.binary'],
proc = Popen([pwd + '/../../src/openmc -s particle_10_638.binary'],
stderr=PIPE, stdout=PIPE, shell=True)
stdout, stderr = proc.communicate()
assert stderr != ''
def teardown():
output = [pwd + '/particle_0.binary']
output = [pwd + '/particle_10_638.binary']
for f in output:
if os.path.exists(f):
os.remove(f)