@@ -149,16 +149,17 @@ int new_particle(
149149 double a_mb
150150) {
151151 if (!index_of_the_particle) return -1 ;
152+ int id = particle_id_counter++;
152153
153154 std::vector<Body>& bodies = tidymess->bodies ;
154155 Body newbody (
155156 mass, radius, xi, kf, tau, a_mb,
156157 wx, wy, wz, x, y, z, vx, vy, vz
157158 );
158- newbody.set_id (particle_id_counter );
159+ newbody.set_id (id );
159160 bodies.push_back (newbody);
160161
161- *index_of_the_particle = particle_id_counter++ ;
162+ *index_of_the_particle = id ;
162163
163164 return 0 ;
164165}
@@ -218,8 +219,8 @@ int evolve_model(double time) {
218219 return 0 ;
219220}
220221
221- // Setters and Getters
222- // -------------------
222+ // PARTICLE GETTERS AND SETTERS
223+ // ----------------------------
223224
224225/* *
225226 * Get state of a particle
@@ -553,6 +554,9 @@ int set_spin(
553554 return 0 ;
554555}
555556
557+ // PARAMETER GETTERS AND SETTERS
558+ // -----------------------------
559+
556560/* *
557561 * Get Tidymess tidal model parameter
558562 */
@@ -590,7 +594,7 @@ int set_pn_order(int pn_order) {
590594}
591595
592596/* *
593- * Get Tidymess magnetic braking paramter
597+ * Get Tidymess magnetic braking parameter
594598 */
595599int get_magnetic_braking (int * magnetic_braking) {
596600 if (!magnetic_braking) return -1 ;
0 commit comments