mirror of
https://github.com/cosmo-sims/MUSIC.git
synced 2024-09-19 17:03:46 +02:00
added support for arbitrary staggering shifts when using SPH through internal option [setup]/baryon_staggering=0..1
This commit is contained in:
parent
709ffbe025
commit
8071a19a01
1 changed files with 2 additions and 1 deletions
|
@ -87,12 +87,13 @@ namespace convolution{
|
||||||
if( shift )
|
if( shift )
|
||||||
{
|
{
|
||||||
double boxlength = pk->pcf_->getValue<double>("setup","boxlength");
|
double boxlength = pk->pcf_->getValue<double>("setup","boxlength");
|
||||||
|
double stagfact = pk->pcf_->getValueSafe<double>("setup","baryon_staggering",0.5);
|
||||||
int lmax = pk->pcf_->getValue<int>("setup","levelmax");
|
int lmax = pk->pcf_->getValue<int>("setup","levelmax");
|
||||||
double dxmax = boxlength/(1<<lmax);
|
double dxmax = boxlength/(1<<lmax);
|
||||||
double dxcur = cparam_.lx/cparam_.nx;
|
double dxcur = cparam_.lx/cparam_.nx;
|
||||||
//std::cerr << "Performing staggering shift for SPH\n";
|
//std::cerr << "Performing staggering shift for SPH\n";
|
||||||
LOGUSER("Performing staggering shift for SPH");
|
LOGUSER("Performing staggering shift for SPH");
|
||||||
dstag = M_PI/cparam_.nx * dxmax/dxcur;
|
dstag = stagfact * 2.0 * M_PI/cparam_.nx * dxmax/dxcur;
|
||||||
}
|
}
|
||||||
|
|
||||||
//.............................................
|
//.............................................
|
||||||
|
|
Loading…
Reference in a new issue