mit-crpg/openmc — pull request #236 by bhermanmit (2014-01-06 15:59:36+00:00)
Title: More control for source bank writing

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 .

A new tag has been added to settings called ``````. It has options such as ```batches``` and ```interval``` just like the `````` tag does. The ```source_separate``` and ```write_source``` options has now been moved to this tag and removed from ``````. 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
- ``````
- have statepoints written at every batch for tallies, source written in statepoint file at every 50 batches and keep the latest source
- ``````
- ``````

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