Commit a8aba764 authored by Nicolas Van der Noot's avatar Nicolas Van der Noot
Browse files

add dirdyn to user fields

parent 466f9eee
......@@ -12,8 +12,9 @@
#include "MBSdef.h"
#include "mbs_data.h"
#include "mbs_aux.h"
#include "mbs_dirdyn.h"
void user_finish(MbsData *mbs_data, MbsAux *mbs_aux)
void user_finish(MbsData *mbs_data, MbsAux *mbs_aux, MbsDirdyn* dd)
{
}
......@@ -12,8 +12,9 @@
#include "MBSdef.h"
#include "mbs_data.h"
#include "mbs_aux.h"
#include "mbs_dirdyn.h"
void user_init(MbsData *mbs_data, MbsAux *mbs_aux)
void user_init(MbsData *mbs_data, MbsAux *mbs_aux, MbsDirdyn* dd)
{
}
......@@ -12,8 +12,9 @@
#include "MBSdef.h"
#include "mbs_data.h"
#include "mbs_aux.h"
#include "mbs_dirdyn.h"
void user_loop(MbsData *mbs_data, MbsAux *mbs_aux)
void user_loop(MbsData *mbs_data, MbsAux *mbs_aux, MbsDirdyn* dd)
{
}
......@@ -143,7 +143,7 @@ void mbs_dirdyn_init(MbsDirdyn* dd, MbsData* mbs_data){
dd->dt = dd->options->dt0;
// user intialization
user_init(mbs_data, dd->mbs_aux);
user_init(mbs_data, dd->mbs_aux, dd);
// Simulation state initialization
for(i=1; i<=mbs_data->nqu; i++)
......@@ -256,7 +256,7 @@ void mbs_dirdyn_loop(MbsDirdyn* dd, MbsData* mbs_data){
while(dd->tsim < dd->options->tf){
// user loop
user_loop(mbs_data, dd->mbs_aux);
user_loop(mbs_data, dd->mbs_aux, dd);
mbs_fct_dirdyn(dd->tsim, dd->y, dd->yd, mbs_data, dd->mbs_aux);
rk4(dd->y, dd->yd, dd->nState, dd->tsim, dd->dt, dd->yout, mbs_fct_dirdyn, mbs_data, dd->mbs_aux);
......@@ -321,7 +321,7 @@ void mbs_dirdyn_finish(MbsDirdyn* dd, MbsData* mbs_data){
#endif
// user finalization
user_finish(mbs_data, dd->mbs_aux);
user_finish(mbs_data, dd->mbs_aux, dd);
free(dd->y);
free(dd->yd);
......
......@@ -7,6 +7,7 @@
#include "mbs_data.h"
#include "mbs_aux.h"
#include "mbs_dirdyn.h"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
......@@ -14,9 +15,9 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void user_init(MbsData *MBSdata, MbsAux *mbs_aux);
void user_loop(MbsData *MBSdata, MbsAux *mbs_aux);
void user_finish(MbsData *MBSdata, MbsAux *mbs_aux);
void user_init(MbsData *MBSdata, MbsAux *mbs_aux, MbsDirdyn* dd);
void user_loop(MbsData *MBSdata, MbsAux *mbs_aux, MbsDirdyn* dd);
void user_finish(MbsData *MBSdata, MbsAux *mbs_aux, MbsDirdyn* dd);
void user_cons_hJ(double *h, double **Jac, MbsData *s, double tsim);
......
Supports Markdown
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