Particle Manipulation Functions

group ParticleManipFunctions

List of reb_particle manipulation functions for REBOUND

Functions

struct reb_particle reb_particle_minus(struct reb_particle p1, struct reb_particle p2)

Subtract particle p2 from particle p1 (p1 - p2).

Subtracts positions, velocities, accelerations and mass element by element.

Return
A new particle with no pointers (not in any simulation etc.) set.
Parameters

struct reb_particle reb_particle_plus(struct reb_particle p1, struct reb_particle p2)

Add particle p1 to particle p1.

Adds positions, velocities, accelerations and mass element by element.

Return
A new particle with no pointers (not in any simulation etc.) set.
Parameters

struct reb_particle reb_particle_multiply(struct reb_particle p1, double value)

Multiply a particle’s members by a constant.

Multiplies particle’s positions, velocities, accelerations and mass by a constant.

Return
A new particle with no pointers (not in any simulation etc.) set.
Parameters
  • p1 -

    reb_particle to modify.

  • value -

    Value by which to multiply particle’s fields.

struct reb_particle reb_particle_divide(struct reb_particle p1, double value)

Divide a particle’s members by a constant.

Divides particle’s positions, velocities, accelerations and mass by a constant.

Return
A new particle with no pointers (not in any simulation etc.) set.
Parameters
  • p1 -

    reb_particle to modify.

  • value -

    Value by which to divide particle’s fields.