Commit graph

9978 commits

Author SHA1 Message Date
Andrew Johnson
cb3e89bf95
Always reshape depletion process time dataset
The conditional to reshape/extend the "depletion time"
dataset in the exporting of a deplete.Results object
has been removed. This caused the last exporting to
hang when running with MPI
2019-06-21 10:20:50 -05:00
Andrew Johnson
e291725b6b
Modify deplete.integrator.predictor to store, write process time
Use new timed_deplete wrapper func to obtain process time.
Pass process time to modifed openmc.deplete.Results.save
to be reduced and written to depletion file.

test_deplete_predictor is modified to ensure that the
shape of the resulting "depletion time" vector is correct
2019-06-21 09:47:36 -05:00
Andrew Johnson
2ecca7bff6
Add wrapped timed_deplete method for providing process time
Simple wrapper function that passes all arguments to
openmc.deplete.integrator.deplete and returns a two-item
tuple. The first item is the process time spent depleting
all materials (can be on one of many MPI processes).
The second item is what is returned directly from the
deplete function.
2019-06-21 09:43:17 -05:00
Andrew Johnson
a31e6ced65
Add ResultsList.get_depletion_time method
Returns a numpy array with the time spent depleting materials
between transport steps. This array has shape
(N-1, 1), where N is the number of transport steps
2019-06-21 09:41:29 -05:00
Andrew Johnson
d55c77a65f
Pass depletion process time to deplete.Results.save
Method openmc.deplete.Results.save now accepts a new argument,
proc_time, to represent the time each process spent depleting
all materials. This value is summed across all processes to
get the total cpu time depleting. Time in transport simulations
should not be included.

The value written to depletion_results.h5 is
proc_time / (n_proc * n_burn_materials)
to get a look at the average time required to deplete a material.
A new dataset, "depletion time" is created in this file, and has
one fewer rows than other data set, like eigenvalues. This corresponds
to there being one fewer round of depletion simulations than transport.

The proc_time is also read in from the depletion file in the
class method Results.from_hdf5(), with one notable exception.
If data from the last step is requested, then the proc_time
attribute will be a numpy array of nans, reflecting the lack
of depletion data.
2019-06-21 09:38:48 -05:00
Andrew Johnson
6370b362c7
Check that hdf5 has MPI if performing depletion with MPI
Check added in openmc/depletion/__init__.py.
Without this check, the exporting of the Results to hdf5 will
hang, as the second process attempts to write to a file
that has already been opened on another process.
This error is only raised after a full transport calculation
has been run.
The check raises a more helpful error directly at the import
from openmc.deplete, prior to transport calculations.
2019-06-20 14:43:33 -05:00
Gavin Ridley
d13a84c36b stop division by zero in keff trigger if no trigger given 2019-06-20 14:03:51 -04:00
Paul Romano
812c667c81
Merge pull request #1266 from drewejohnson/xsfile-elem-expand
Iterate over all libraries, not children, in Element.expand
2019-06-20 09:47:09 -05:00
Andrew Johnson
3e165c0d54
Iterate over all libraries, not children, in Element.expand
After PR #1247, the cross section file is allowed to contain
the depletion chain file. This is present as a new tag, of
the form
```
   <depletion_chain path="path.xml" type="depletion_chain" />
```

The Element.expand method looked for `material` attributes
in all children of the OPENMC_CROSS_SECTION file.
This caused an error for the depletion_chain element.
Now, only those children with the `library` tag are
iterated over.
2019-06-20 08:26:43 -05:00
Paul Romano
8555f914fa
Merge pull request #1264 from pshriwise/dagmc_example
DagMC example notebook
2019-06-19 15:35:22 -05:00
Patrick Shriwise
d64ed285b1 Adding notebook to documentation, going back to use of iPython.display.Image so images are embedded. 2019-06-18 08:57:35 -05:00
Patrick Shriwise
ee4db3d158 Fixing typos caught by @paulromano. 2019-06-18 08:36:21 -05:00
Paul Romano
8b83f0c847 Update hexagonal lattice example notebook 2019-06-18 06:18:05 -05:00
Paul Romano
da5f7440b1 Remove get_ from get_hexagonal_prism, get_rectangular_prism 2019-06-18 06:17:54 -05:00
Paul Romano
c0f90effcd Merge branch 'develop' into rotate-lattice 2019-06-18 06:17:33 -05:00
Patrick Shriwise
4365966722 Adding DagMC example notebook. 2019-06-17 15:36:59 -05:00
Sterling Harper
2c0b16e73d
Merge pull request #1216 from dryuri92/newhex
Support different orientations for hexagonal lattices
2019-06-17 15:21:49 -04:00
Sterling Harper
1f44d74690
Merge pull request #1259 from paulromano/dev-version
Increment version to 0.11.0-dev and some documentation changes
2019-06-17 14:50:45 -04:00
dryuri92
ba641c5022
Merge pull request #4 from paulromano/newhex-more-fixes
Fix from_hdf5 for hex lattice with x orientation. Assorted other fixes.
2019-06-17 20:36:27 +03:00
Sterling Harper
f29be35a2c
Merge pull request #1258 from paulromano/gsl
Add guidelines support library and fix a bug
2019-06-17 11:03:17 -04:00
Sterling Harper
a65aad2595 Fix complex cell geometry partitioning bug 2019-06-17 09:45:38 -04:00
Paul Romano
7ca97676aa
Merge pull request #1260 from pshriwise/overlap_plotting
Overlap plotting
2019-06-17 07:08:12 -05:00
Paul Romano
41bb3cf6be
Merge pull request #1255 from pshriwise/dagmc_rayhist
Adding RayHistory to DagMC
2019-06-17 07:04:40 -05:00
Paul Romano
a6c099e29a A few more fixes pointed out by @smharper 2019-06-17 06:24:45 -05:00
Patrick Shriwise
cb3f878d11 Renaming test. Altering includes in surface/cell.h to isolate external package includes. 2019-06-16 22:02:03 -05:00
Patrick Shriwise
71957b24b8 Removing some hasty comments. 2019-06-16 20:59:37 -05:00
Patrick Shriwise
42627cfce4 Resizing overlap plot counters if plot is asking for overlap plotting. 2019-06-16 20:56:45 -05:00
Patrick Shriwise
c7950cba00 Adding overlaps property to capi PlotBase. 2019-06-15 12:14:49 -05:00
Paul Romano
df2b03c704 Update 0.11.0 release notes 2019-06-14 22:45:18 -05:00
Paul Romano
b64f17e62e
Merge pull request #1249 from liangjg/windows
Compiling OpenMC using Visual Studio
2019-06-14 22:30:54 -05:00
Paul Romano
5f001ee6b5 Add a short user's guide section on depletion 2019-06-14 22:22:38 -05:00
jingang
7cf9bca908 added include <cctype> in cell.cpp 2019-06-14 20:46:41 -04:00
jingang
23d7e41592 and -> &&, or -> || 2019-06-14 20:07:42 -04:00
jingang
e5b2c6b477 &name[0] -> name.data() 2019-06-14 19:59:27 -04:00
Paul Romano
ca608653e3
Merge pull request #1247 from drewejohnson/dep-chain-file
Read depletion_chain information from main cross section file
2019-06-14 14:43:09 -05:00
Paul Romano
52293dae83 Improve display of Python API in generated HTML documentation 2019-06-14 14:35:39 -05:00
Paul Romano
f21de21ccc Start writing release notes for the next release 2019-06-14 14:33:19 -05:00
Andrew Johnson
ed6c78a0e7
Fix documentation in openmc/model/model.py 2019-06-14 13:43:22 -04:00
Patrick Shriwise
7096b44633 Updating test results after rebase to account for changes in develop. 2019-06-14 12:36:45 -05:00
Paul Romano
68faf095fb Use sphinxcontrib-katex for faster math rendering 2019-06-14 12:13:37 -05:00
Paul Romano
93e043e630 Add old release notes and current in new directory in docs/ 2019-06-14 12:13:37 -05:00
Paul Romano
ea92cc1800 Fix name of capi.RegularMesh in documentation 2019-06-14 12:13:34 -05:00
Patrick Shriwise
4256e031c3 Applying internal color check to meshlines. 2019-06-14 11:55:25 -05:00
Patrick Shriwise
48959ab84c Updating test name 2019-06-14 11:15:17 -05:00
Patrick Shriwise
36b4fbad12 Adding check color function to replace duplicate code. 2019-06-14 11:15:16 -05:00
Patrick Shriwise
89c0d06b30 Moving a few defaults into the class def. 2019-06-14 11:15:16 -05:00
Patrick Shriwise
daf129f1ec Initializing overlap color in the class constructor. 2019-06-14 11:15:16 -05:00
Patrick Shriwise
8d1098400c PEP8 corrections to plot overlap test. 2019-06-14 11:15:16 -05:00
Patrick Shriwise
2c6aa62977 Correcting indentation. 2019-06-14 11:15:16 -05:00
Patrick Shriwise
235b662775 Update include/openmc/geometry.h
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2019-06-14 11:15:16 -05:00