Robotran C Documentation
Classes | Functions
mbs_euler_implicit.h File Reference

This header defines global functions for Euler Implicit integrator in C. More...

#include "mbs_project_interface.h"

Go to the source code of this file.

Classes

struct  MbsDirdynEulerIm
 Euler Implicit structure for dirdyn. More...
 

Functions

void initialize_euler_implicit (MbsData *mbs_data, MbsDirdyn *mbs_dd, int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), void(*loop_fct)(MbsData *, MbsDirdyn *), int(*save_realtime_update)(MbsDirdyn *dd, MbsData *mbs_data))
 Initialize all needed fields in MbsDirdyn for Euler Implicit integrator. More...
 
int loop_euler_implicit (double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
 Integrate the motion from t0 to tf. More...
 
void finish_euler_implicit (MbsData *mbs_data, MbsDirdyn *mbs_dd)
 Finalize and clear memory allocated for Euler Implicit integrator. More...
 
void error_euler_implicit (MbsData *mbs_data, MbsDirdyn *dd, int err)
 If an error occurs during time integration, this function prints the error message and call finish_euler_implicit. More...
 

Detailed Description

This header defines global functions for Euler Implicit integrator in C.

Creation date: April 2018

Author
by Sebastien Timmermans

@source adapted from Arnold M. et al, Linearly implicit time integration methods in real-time applications: DAEs and stiff ODEs Multibody System Dynamics, 2007, 17:99�117

(c) Universite catholique de Louvain

Function Documentation

◆ error_euler_implicit()

void error_euler_implicit ( MbsData mbs_data,
MbsDirdyn dd,
int  err 
)

If an error occurs during time integration, this function prints the error message and call finish_euler_implicit.

Parameters
mbs_dataThe computed MBS structure
mbs_ddThe associated MbsDirdyn structure
errThe error number

◆ finish_euler_implicit()

void finish_euler_implicit ( MbsData mbs_data,
MbsDirdyn mbs_dd 
)

Finalize and clear memory allocated for Euler Implicit integrator.

Parameters
mbs_dataThe computed MBS structure
mbs_ddThe associated MbsDirdyn structure

◆ initialize_euler_implicit()

void initialize_euler_implicit ( MbsData mbs_data,
MbsDirdyn mbs_dd,
int(*)(double, double[], double[], MbsData *, MbsDirdyn *)  derivs,
void(*)(MbsData *, MbsDirdyn *)  loop_fct,
int(*)(MbsDirdyn *dd, MbsData *mbs_data)  save_realtime_update 
)

Initialize all needed fields in MbsDirdyn for Euler Implicit integrator.

Parameters
mbs_dataThe computed MBS structure
mbs_ddThe associated MbsDirdyn structure
derivsThe function computing f'
loop_fctThe function to be called at the end of each time step, or waypoints.

◆ loop_euler_implicit()

int loop_euler_implicit ( double  t0,
double  tf,
MbsData mbs_data,
MbsDirdyn mbs_dd 
)

Integrate the motion from t0 to tf.

Parameters
t0The initial time
tfThe final time
mbs_dataThe computed MBS structure
mbs_ddThe associated MbsDirdyn structure
Returns
Error status, <0 in case of failure.

user loop

user loop