More control for source bank writing
Created by: bhermanmit
This PR allows a user more flexibility when writing out the source bank. Before these additions, the user had the option to write the source bank within the statepoint (default), write it out separately when the statepoint is written or not write the source bank at all. It addresses #219 (closed) .
A new tag has been added to settings called
<source_point>. It has options such as
interval just like the
<state_point> tag does. The
write_source options has now been moved to this tag and removed from
<state_point>. Finally, an option called
overwrite_latest has been added so that the source bank is overwritten at every batch in the file source.binary or source.h5.
With this additions, the following can be done:
- write out the source bank in the statepoint file for a subset of the batches that the statepoint is written
- the code checks to make sure that the batches at which a source bank is written is contained in the batch list for statepoint because a statepoint file must exist here to store the source bank in.
- write out the source bank separately at any batch - no restrictions like the example above
- have the source overwritten at every batch and no other source written
<source_point batches="0" source_separate="0" overwrite_latest="true" />
- have statepoints written at every batch for tallies, source written in statepoint file at every 50 batches and keep the latest source
<state_point interval="1" />
<source_point interval="50" overwrite_latest="true" />
Finally, a modification to restarting was added. Now any source file can be restarted with any statepoint file. By default if you say
openmc -r statepoint.8.binary it will search for additional arguments for a source file. If there is no additional arguments, OpenMC works the same as before. It will look for a
source.8.binary file if you have source separate on in your settings file. You can now send a specific source file with
openmc -r statepoint.8.binary source.binary.
New tests were added to the regression suite:
- Check to make sure batches works for sourcepoint
- Check to make sure interval works for sourcepoint
- Check to make sure overwrite latest works for sourcepoint
- Check to make sure restarting works with source point
Things to finish:
- Update documentation
- Run regression suite