Bugfixes;
Restarts now reproduce longer Sims
This commit is contained in:
@@ -37,7 +37,14 @@ MaxwellBoltzmann::MaxwellBoltzmann(double temperature_K)
|
||||
}
|
||||
|
||||
double MaxwellBoltzmann::rollEnergy(std::mt19937* engine) {
|
||||
return distribution_(*engine);
|
||||
double value = distribution_(*engine);
|
||||
// this makes (the test case) reproduceable through restart
|
||||
// but it does impact the efficiency of the drawing (simple test
|
||||
// resultet in about an increase of 50% for the function call)
|
||||
// however, i think that that time increse is almost negligible
|
||||
// compared to the rest of the operations in the simulation
|
||||
distribution_.reset();
|
||||
return value;
|
||||
}
|
||||
|
||||
Constant::Constant(double constant_eV) : constant_eV_(constant_eV) {
|
||||
|
||||
Reference in New Issue
Block a user