idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.76k stars 1.05k forks source link

Issue with using random number in initQpStatefulProperties() #8111

Open hchen139 opened 7 years ago

hchen139 commented 7 years ago

Description of the enhancement or error report

In debug mode, usage of moose random number in initQpStatefulProperties() will give assertion error as:

Assertion `_states.find(i) != _states.end()' failed No random state initialized for id: 0 at /Users/chenh/projects/moose/framework/include/utils/MooseRandom.h, line 112

permcody commented 7 years ago

@rwcarlsen - If you do work on the #8101 and other Random Number stuff. Fold this ticket into that work. The issue here is that stateful materials run very early. I guess I had never considered somebody trying to use the PRNG system in a stateful material but somebody finally did.