mirror of
https://github.com/cosmo-sims/monofonIC.git
synced 2024-09-19 17:03:45 +02:00
added call to see if old or new descriptor is used
This commit is contained in:
parent
ffc3334847
commit
69f9772cc5
2 changed files with 28 additions and 5 deletions
|
@ -97,7 +97,8 @@ ztarget = 2.5 # target redshift for CLASS module, output at
|
|||
## requirements by registering on the website http://icc.dur.ac.uk/Panphasia.php
|
||||
|
||||
generator = PANPHASIA_HO
|
||||
descriptor = [Panph1,L10,(800,224,576),S9,CH1564365824,MXXL]
|
||||
#descriptor = [Panph1,L10,(800,224,576),S9,CH1564365824,MXXL]
|
||||
descriptor = [Panph6,L20,(424060,82570,148256),S1,CH-999,Auriga_100_vol2]
|
||||
# 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
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
extern "C"{
|
||||
int PANPHASIA_HO_main( void );
|
||||
int parse_and_validate_descriptor_(const char *, int *);
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,12 +51,12 @@ private:
|
|||
protected:
|
||||
std::string descriptor_string_;
|
||||
int num_threads_;
|
||||
|
||||
int panphasia_mode_;
|
||||
size_t grid_res_;
|
||||
|
||||
public:
|
||||
explicit RNG_panphasia_ho(config_file &cf) : RNG_plugin(cf)
|
||||
{
|
||||
descriptor_string_ = pcf_->get_value<std::string>("random", "descriptor");
|
||||
|
||||
#ifdef _OPENMP
|
||||
num_threads_ = omp_get_max_threads();
|
||||
|
@ -63,10 +64,31 @@ public:
|
|||
num_threads_ = 1;
|
||||
#endif
|
||||
|
||||
PANPHASIA_HO_main();
|
||||
descriptor_string_ = pcf_->get_value<std::string>("random", "descriptor");
|
||||
grid_res_ = pcf_->get_value<size_t>("setup","GridRes");
|
||||
|
||||
panphasia_mode_ = 0;
|
||||
parse_and_validate_descriptor_(descriptor_string_.c_str(), &panphasia_mode_);
|
||||
|
||||
if( panphasia_mode_ == 0 ){
|
||||
std::cout << "PANPHASIA: Old descriptor" << std::endl;
|
||||
}else if( panphasia_mode_ == 1 ){
|
||||
std::cout << "PANPHASIA: New descriptor" << std::endl;
|
||||
PANPHASIA_HO_main();
|
||||
}else{
|
||||
std::cout << "PANPHASIA: Something went wrong with descriptor" << std::endl;
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
~RNG_panphasia_ho() { }
|
||||
~RNG_panphasia_ho()
|
||||
{
|
||||
if( panphasia_mode_ == 0) // old
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool isMultiscale() const { return true; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue