1
0
Fork 0
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:
Oliver Hahn 2012-10-01 18:06:39 +02:00
parent 709ffbe025
commit 8071a19a01

View file

@ -87,12 +87,13 @@ namespace convolution{
if( shift )
{
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");
double dxmax = boxlength/(1<<lmax);
double dxcur = cparam_.lx/cparam_.nx;
//std::cerr << "Performing staggering shift for SPH\n";
LOGUSER("Performing staggering shift for SPH");
dstag = M_PI/cparam_.nx * dxmax/dxcur;
dstag = stagfact * 2.0 * M_PI/cparam_.nx * dxmax/dxcur;
}
//.............................................