Particle Manipulation Functions

group ParticleManipFunctions

List of reb_particle manipulation functions for REBOUND

Functions

void reb_particle_isub(struct reb_particle *p1, struct reb_particle *p2)

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

Subtracts positions, velocities, and mass element by element.

Return

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

Parameters
  • p1: First reb_particle (will be modified)

  • p2: Second reb_particle to subtract from p1.

void reb_particle_iadd(struct reb_particle *p1, struct reb_particle *p2)

Add particle p2 to particle p1.

Adds positions, velocities, and mass element by element.

Parameters
  • p1: First reb_particle (will be modified)

  • p2: Second reb_particle.

void reb_particle_imul(struct reb_particle *p1, double value)

Multiply a particle’s members by a constant.

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

Parameters
  • p1: reb_particle to modify.

  • value: Value by which to multiply particle’s fields.