mirror of
https://github.com/cosmo-sims/monofonIC.git
synced 2024-09-19 17:03:45 +02:00
added a minimum panphasia resolution
This commit is contained in:
parent
61eced697f
commit
563a6c9f07
2 changed files with 4 additions and 1 deletions
|
@ -98,6 +98,7 @@ seed = 12345
|
||||||
|
|
||||||
# generator = PANPHASIA
|
# generator = PANPHASIA
|
||||||
# descriptor = [Panph1,L10,(800,224,576),S9,CH1564365824,MXXL]
|
# descriptor = [Panph1,L10,(800,224,576),S9,CH1564365824,MXXL]
|
||||||
|
# PanphasiaMinRootResolution = 512 # requires the white noise reallisation to be made at least at that resolution (default is 512)
|
||||||
|
|
||||||
##> The MUSIC1 multi-scale random number generator is provided for convenience
|
##> The MUSIC1 multi-scale random number generator is provided for convenience
|
||||||
## warning: MUSIC1 generator is not MPI parallel (yet) (memory is needed for full field on each task)
|
## warning: MUSIC1 generator is not MPI parallel (yet) (memory is needed for full field on each task)
|
||||||
|
|
|
@ -171,10 +171,12 @@ protected:
|
||||||
{
|
{
|
||||||
// if ngrid is not a multiple of i_base, then we need to enlarge and then sample down
|
// if ngrid is not a multiple of i_base, then we need to enlarge and then sample down
|
||||||
ngrid_ = pcf_->get_value<size_t>("setup", "GridRes");
|
ngrid_ = pcf_->get_value<size_t>("setup", "GridRes");
|
||||||
|
size_t ngidminsize_panphasia = pcf_->get_value_safe<size_t>("random", "PanphasiaMinRootResolution",512);
|
||||||
|
|
||||||
grid_p_ = pdescriptor_->i_base;
|
grid_p_ = pdescriptor_->i_base;
|
||||||
|
|
||||||
lextra_ = (log10((double)ngrid_ / (double)grid_p_) + 0.001) / log10(2.0);
|
lextra_ = (log10((double)std::max(ngrid_,ngidminsize_panphasia) / (double)grid_p_) + 0.001) / log10(2.0);
|
||||||
|
// lmin
|
||||||
|
|
||||||
ngrid_panphasia_ = (1 << lextra_) * grid_p_;
|
ngrid_panphasia_ = (1 << lextra_) * grid_p_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue