1
0
Fork 0
mirror of https://github.com/cosmo-sims/MUSIC.git synced 2024-09-19 17:03:46 +02:00

Fixed a bug in the random number generator that could lead to segfaults in some situations.

This commit is contained in:
Oliver Hahn 2010-09-27 15:06:44 -07:00
parent 3ba59a04f9
commit 876740e8d9

View file

@ -886,7 +886,7 @@ public:
#ifndef SINGLETHREAD_FFTW
rfftwnd_threads_one_complex_to_real( omp_get_max_threads(), ipc, ccoarse, NULL );
#else
rfftwnd_one_complex_to_real( ipf, cfine, NULL );
rfftwnd_one_complex_to_real( ipc, cfine, NULL );
#endif
rnums_.push_back( new Meshvar<T>( res_, 0, 0, 0 ) );
@ -1275,7 +1275,7 @@ protected:
{
bool kavg = pcf_->getValueSafe<bool>("random","kaveraging",true);
std::vector< rng* > randc(std::max(levelmax_+1,levelmin_seed_),(rng*)NULL);
std::vector< rng* > randc(std::max(levelmax_,levelmin_seed_)+1,(rng*)NULL);
//--- FILL ALL WHITE NOISE ARRAYS FOR WHICH WE NEED THE FULL FIELD ---//