Commit 080337df authored by Sebastien Timmermans's avatar Sebastien Timmermans 🎹
Browse files

[dd] moving flag ongoing jac from opts to dd struct"

parent 59762152
......@@ -143,7 +143,6 @@ MbsDirdyn* mbs_new_dirdyn_aux(MbsData* mbs_data, MbsAux* mbs_aux)
int check_user_dirdyn_options(MbsDirdyn* dd, MbsData* mbs_data)
{
int i;
int err = 0;
// errors generated
if (dd->options->t0 > dd->options->tf)
......
......@@ -31,7 +31,7 @@ int mbs_estim_jac_acc(double x, double htry, double y[], double dydx[], int comp
int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *dd)
{
// setting the flag to ON
dd->options->flag_ongoing_jac_computation = 1;
dd->flag_ongoing_jac_computation = 1;
int i, j, err;
double perturb;
......@@ -100,7 +100,7 @@ int mbs_estim_jac_acc(double x, double htry, double y[], double dydx[], int comp
}
// setting the flag to OFF
dd->options->flag_ongoing_jac_computation = 0;
dd->flag_ongoing_jac_computation = 0;
return 0;
}
......
......@@ -131,8 +131,6 @@ typedef struct MbsDirdynOptions
// Options related to integrator that need Jacobian computation
/*TO BE COMPLETED*/
int n_freeze; //!< number of time step when the jacobian is freezed (computed once at the start of the n_freeze time steps), default = 0;
int flag_ongoing_jac_computation; //!< flag is ON when the implicit integrator is computing the jacobian.
//!< it allows the user the make a distinction in his user functions (typically a FSM state that should now change during jacobian computation).
// Various options
int show_failed_closure; //!< 1 to generate animation of the failed Newton-Raphson procedure, default = 0.
......@@ -176,6 +174,9 @@ struct MbsDirdyn
int savePeriodCounter;
// Part related to numerical integrator
int flag_ongoing_jac_computation; //!< flag is ON (=1) when the implicit integrator is currently computing the jacobian, default is 0.
//!< it allows the user the make a distinction in his user functions (typically a FSM state that should now change during jacobian computation).
/** pointer to store integrator structure **/
void *integrator_struct; // set by initialize_integrator
/** pointer to integrator initialize function **/
......@@ -185,6 +186,7 @@ struct MbsDirdyn
/** pointer to integrator closing function **/
finish_integrator_ptr finish_integrator;
};
......
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