Skip to content

Commit 1095652

Browse files
committed
Added 1pn vs 2.5pn flag and black format
1 parent ef459ca commit 1095652

File tree

5 files changed

+628
-162
lines changed

5 files changed

+628
-162
lines changed

__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# generated file
1+
# generated file

interface.cc

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ int initialize_code()
4545

4646
perturbations["None"] = new Perturbation();
4747
perturbations["1PN_Pairwise"] = new Pairwise1PNPerturbation();
48-
perturbations["1PN_EIH"] = new EIHPerturbation();
48+
perturbations["1PN_EIH"] = new EIH1PNPerturbation();
49+
perturbations["2.5PN_EIH"] = new EIH2dot5PNPerturbation();
50+
4951

5052
return 0;
5153
}
@@ -398,6 +400,28 @@ int set_acceleration(int id, double ax, double ay, double az)
398400
return -2;
399401
}
400402

403+
int get_jerk(int id, double *sx, double *sy, double *sz)
404+
{
405+
Particle *p = model->GetParticle(id);
406+
if (p)
407+
{
408+
Vec jerk = p->jerk_newton + p->jerk_pert;
409+
*sx = jerk[0];
410+
*sy = jerk[1];
411+
*sz = jerk[2];
412+
return 0;
413+
}
414+
else
415+
{
416+
return -1;
417+
}
418+
}
419+
420+
int set_jerk(int id, double jx, double jy, double jz)
421+
{
422+
return -2;
423+
}
424+
401425
int evolve_model(double t)
402426
{
403427
if (num_threads > model->GetNumParticles())

0 commit comments

Comments
 (0)