Commit 7df557fa authored by Sebastien Timmermans's avatar Sebastien Timmermans 🎹
Browse files

[dd][integrator] flag_stop taken into account #241

parent 088a8c4a
......@@ -87,6 +87,11 @@ int loop_bader(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd) {
{
user_dirdyn_loop(mbs_data, mbs_dd); ///user loop
if (mbs_data->flag_stop) {
// stop the simulation if 'flag_stop' set to 1
break;
}
if (mbs_dd->options->flag_precise_dynamics) // Compute f' if asked
{
error_code = mbs_fct_dirdyn(mbs_dd->tsim, mbs_dd->y, mbs_dd->yd, mbs_data, mbs_dd);
......
......@@ -57,6 +57,11 @@ int loop_custom(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd) {
{
user_dirdyn_loop(mbs_data, mbs_dd); ///user loop
if (mbs_data->flag_stop) {
// stop the simulation if 'flag_stop' set to 1
break;
}
if (mbs_dd->options->flag_precise_dynamics) // Compute f' if asked
{
err = mbs_fct_dirdyn(mbs_dd->tsim, mbs_dd->y, mbs_dd->yd, mbs_data, mbs_dd);
......
......@@ -72,6 +72,11 @@ int loop_eulerEx(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd) {
while (mbs_dd->tsim <= tf)
{
user_dirdyn_loop(mbs_data, mbs_dd); ///user loop
if (mbs_data->flag_stop) {
// stop the simulation if 'flag_stop' set to 1
break;
}
if (mbs_dd->options->flag_precise_dynamics) // Compute f' if asked
{
......
......@@ -74,6 +74,12 @@ int loop_euler_implicit(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_
while (mbs_dd->tsim < tf) {
user_dirdyn_loop(mbs_data, mbs_dd); ///user loop
if (mbs_data->flag_stop) {
// stop the simulation if 'flag_stop' set to 1
break;
}
if (mbs_dd->options->flag_precise_dynamics) // Compute f' if asked
{
err = mbs_fct_dirdyn(mbs_dd->tsim, mbs_dd->y, mbs_dd->yd, mbs_data, mbs_dd);
......
......@@ -51,6 +51,11 @@ int loop_rk4(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd) {
while (mbs_dd->tsim <= tf)
{
user_dirdyn_loop(mbs_data, mbs_dd); ///user loop
if (mbs_data->flag_stop) {
// stop the simulation if 'flag_stop' set to 1
break;
}
if (mbs_dd->options->flag_precise_dynamics) // Compute f' if asked
{
......
......@@ -82,6 +82,11 @@ int loop_rosenbrock(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
while (t < tf)
{
user_dirdyn_loop(mbs_data, mbs_dd); ///user loop
if (mbs_data->flag_stop) {
// stop the simulation if 'flag_stop' set to 1
break;
}
if (mbs_dd->options->flag_precise_dynamics) // Compute f' if asked
{
......
......@@ -95,6 +95,11 @@ int loop_w_methods(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd) {
while (mbs_dd->tsim < tf) {
user_dirdyn_loop(mbs_data, mbs_dd); ///user loop
if (mbs_data->flag_stop) {
// stop the simulation if 'flag_stop' set to 1
break;
}
if (mbs_dd->options->flag_precise_dynamics) // Compute f' if asked
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment