@@ -71,18 +71,20 @@ void assist_additional_forces(struct reb_simulation* sim){
71
71
// We might consider adding the heliocenter.
72
72
73
73
if (geo == 1 ){
74
- // geocentric
75
- // Get mass, position, velocity, and acceleration of the Earth for later use.
76
- // The offset position is used to adjust the particle positions.
77
- int flag = assist_all_ephem (ephem , assist -> ephem_cache , ASSIST_BODY_EARTH , t , & GM , & xo , & yo , & zo , & vxo , & vyo , & vzo , & axo , & ayo , & azo );
78
- if (flag != ASSIST_SUCCESS ){
79
- reb_simulation_error (sim , assist_error_messages [flag ]);
80
- }
74
+ // geocentric
75
+ // Get mass, position, velocity, and acceleration of the Earth for later use.
76
+ // The offset position is used to adjust the particle positions.
77
+ int flag = assist_all_ephem (ephem , assist -> ephem_cache , ASSIST_BODY_EARTH , t , & GM , & xo , & yo , & zo , & vxo , & vyo , & vzo , & axo , & ayo , & azo );
78
+ if (flag != ASSIST_SUCCESS ){
79
+ reb_simulation_error (sim , assist_error_messages [flag ]);
80
+ sim -> status = REB_STATUS_GENERIC_ERROR ;
81
+ return ;
82
+ }
81
83
}else {
82
- // barycentric
83
- xo = 0.0 ; yo = 0.0 ; zo = 0.0 ;
84
- vxo = 0.0 ; vyo = 0.0 ; vzo = 0.0 ;
85
- axo = 0.0 ; ayo = 0.0 ; azo = 0.0 ;
84
+ // barycentric
85
+ xo = 0.0 ; yo = 0.0 ; zo = 0.0 ;
86
+ vxo = 0.0 ; vyo = 0.0 ; vzo = 0.0 ;
87
+ axo = 0.0 ; ayo = 0.0 ; azo = 0.0 ;
86
88
}
87
89
88
90
// TODO: eliminate the output files after testing
@@ -315,6 +317,8 @@ static void assist_additional_force_direct(struct reb_simulation* sim, double xo
315
317
316
318
if (flag != ASSIST_SUCCESS ){
317
319
reb_simulation_error (sim , assist_error_messages [flag ]);
320
+ sim -> status = REB_STATUS_GENERIC_ERROR ;
321
+ return ;
318
322
}
319
323
320
324
// Loop over test particles
@@ -359,6 +363,8 @@ static void assist_additional_force_direct(struct reb_simulation* sim, double xo
359
363
360
364
if (flag != ASSIST_SUCCESS ){
361
365
reb_simulation_error (sim , assist_error_messages [flag ]);
366
+ sim -> status = REB_STATUS_GENERIC_ERROR ;
367
+ return ;
362
368
}
363
369
364
370
// Skip remainder of calculation if variational particles are not used
0 commit comments