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:
parent
3ba59a04f9
commit
876740e8d9
1 changed files with 2 additions and 2 deletions
|
@ -886,7 +886,7 @@ public:
|
||||||
#ifndef SINGLETHREAD_FFTW
|
#ifndef SINGLETHREAD_FFTW
|
||||||
rfftwnd_threads_one_complex_to_real( omp_get_max_threads(), ipc, ccoarse, NULL );
|
rfftwnd_threads_one_complex_to_real( omp_get_max_threads(), ipc, ccoarse, NULL );
|
||||||
#else
|
#else
|
||||||
rfftwnd_one_complex_to_real( ipf, cfine, NULL );
|
rfftwnd_one_complex_to_real( ipc, cfine, NULL );
|
||||||
#endif
|
#endif
|
||||||
rnums_.push_back( new Meshvar<T>( res_, 0, 0, 0 ) );
|
rnums_.push_back( new Meshvar<T>( res_, 0, 0, 0 ) );
|
||||||
|
|
||||||
|
@ -1275,7 +1275,7 @@ protected:
|
||||||
{
|
{
|
||||||
bool kavg = pcf_->getValueSafe<bool>("random","kaveraging",true);
|
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 ---//
|
//--- FILL ALL WHITE NOISE ARRAYS FOR WHICH WE NEED THE FULL FIELD ---//
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue