Hi all
I wonder if anyone else is having this problem or perhaps I have done something wrong
using the latest develop branch I am running a simulation and the loading up the statepoint file with python
Once the file is loaded I am looking at the .source object and I notice it is no longer contains anything
import openmc
sp = openmc.StatePoint(‘statepoint.10.h5’)
sp.source
This now is empty when it use to contain lots of info like energy x , y, z
Has the writing of source information been changed and now turned off by default?
If so does anyone know how it is turned back on
Many thanks
Jon
Hi Jon,
This was an intentional change made in pull request #1518. Fixed source calculations no longer store source sites in a big vector (like we do for k-eigenvalue calculations) and instead the sites are sampled as they are needed during the simulation. One side effect is that when it comes time to write a statepoint, we don’t have that vector of source sites laying around to write to an HDF5 file, and in fact it’s not needed for a restart calculation as it would be for a k-eigenvalue calculation. This change was made at the request of the UKAEA, in case you’re wondering who to blame ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/google/slight_smile.png?v=9)
Best,
Paul
Ah I think I’ve been caught in the collateral of my own meddling, I should have paid more attention to that PR
Not automatic writing of the source information to the h5 file for fixed source problems is great as the files get quite large with 1e9 plus particles
But I might try to add it back as an optional flag in the future.
I thought the focus of that PR was more on fixing the initialization as OpenMC was generating and extra batch of particles that were not being used but I can see if fixed a few things.
Thanks for explaining and sorry for breaking everything (again)
best
Jon