mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
reset to original multidark loading
This commit is contained in:
parent
04eb2a2483
commit
cb2b0de143
2 changed files with 8 additions and 8 deletions
|
@ -453,9 +453,9 @@ void makeBoxFromParameter(SimuData *simu, SimuData* &boxed, generateMock_info& a
|
||||||
boxed->BoxSize = simu->BoxSize;
|
boxed->BoxSize = simu->BoxSize;
|
||||||
|
|
||||||
NcAtt *d_sub = f.get_att("data_subsampling");
|
NcAtt *d_sub = f.get_att("data_subsampling");
|
||||||
if (d_sub == 0 || d_sub->as_double(0) != args_info.subsample_arg)
|
if (d_sub == 0 || d_sub->as_double(0)/args_info.subsample_arg-1. > 1.e-5)
|
||||||
{
|
{
|
||||||
cerr << "Parameter file was not generated with the same simulation subsampling argument. Particles will be different. Stop here." << endl;
|
cerr << "Parameter file was not generated with the same simulation subsampling argument. Particles will be different. Stop here." << d_sub->as_double(0) << " " << args_info.subsample_arg <<endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,15 +105,15 @@ public:
|
||||||
p.Pos[2] == -99 && p.Vel[2] == -99)
|
p.Pos[2] == -99 && p.Vel[2] == -99)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
p.Pos[0] = p.Pos[0]*rescale_position + shift;
|
//p.Pos[0] = p.Pos[0]*rescale_position + shift;
|
||||||
p.Pos[1] = p.Pos[1]*rescale_position + shift;
|
//p.Pos[1] = p.Pos[1]*rescale_position + shift;
|
||||||
p.Pos[2] = p.Pos[2]*rescale_position + shift;
|
//p.Pos[2] = p.Pos[2]*rescale_position + shift;
|
||||||
p.Vel[2] = p.Vel[2]*rescale_velocity;
|
//p.Vel[2] = p.Vel[2]*rescale_velocity;
|
||||||
|
|
||||||
// enforce box size in case of roundoff error
|
// enforce box size in case of roundoff error
|
||||||
for (int k = 0; k < 3; k++) {
|
for (int k = 0; k < 3; k++) {
|
||||||
//if (p.Pos[k] < 0) p.Pos[k] += simu->BoxSize;
|
if (p.Pos[k] < 0) p.Pos[k] += simu->BoxSize;
|
||||||
//if (p.Pos[k] >= simu->BoxSize) p.Pos[k] -= simu->BoxSize;
|
if (p.Pos[k] >= simu->BoxSize) p.Pos[k] -= simu->BoxSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preproc != 0 && !preproc->accept(p))
|
if (preproc != 0 && !preproc->accept(p))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue