Robotran C Documentation
Classes | Macros | Functions
mbs_w_methods.h File Reference

This header defines global functions for W methods integrator in C. More...

#include "mbs_data.h"
#include "integrator.h"
#include "mbs_dirdyn.h"
#include "useful_functions.h"
#include "mbs_dirdyn_struct.h"
#include "mbs_project_interface.h"
#include "MBSfun.h"

Go to the source code of this file.

Classes

struct  MbsDirdynWMethods
 W Methods structure for dirdyn. More...
 

Macros

#define W_S   2
 
#define W_A21   0.66666666666667
 first order parameters More...
 
#define W_C1   0.0
 
#define W_C2   0.66666666666667
 
#define W_B1   (0.25)
 
#define W_B2   (0.75)
 
#define W_GAMMA11   0.788675134594813
 
#define W_GAMMA22   0.788675134594813
 
#define W_GAMMA21   -1.051566846126417
 

Functions

void initialize_w_methods (MbsData *mbs_data, MbsDirdyn *mbs_dd)
 Initialize all needed fields in MbsDirdyn for W Methods integrator. More...
 
int loop_w_methods (double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
 Integrate the motion from t0 to tf. More...
 
void finish_w_methods (MbsData *mbs_data, MbsDirdyn *mbs_dd)
 Finalize and clear memory allocated for W Methods integrator. More...
 
void error_w_methods (MbsData *mbs_data, MbsDirdyn *dd, int err)
 If an error occurs during time integration, this function prints the error message and call finish_w_methods. More...
 

Detailed Description

This header defines global functions for W methods integrator in C.

Creation date: June 2018

Author
by Sebastien Timmermans

@source 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

Macro Definition Documentation

◆ W_A21

#define W_A21   0.66666666666667

first order parameters

second order parameters

◆ W_B1

#define W_B1   (0.25)

◆ W_B2

#define W_B2   (0.75)

◆ W_C1

#define W_C1   0.0

◆ W_C2

#define W_C2   0.66666666666667

◆ W_GAMMA11

#define W_GAMMA11   0.788675134594813

◆ W_GAMMA21

#define W_GAMMA21   -1.051566846126417

◆ W_GAMMA22

#define W_GAMMA22   0.788675134594813

◆ W_S

#define W_S   2

Function Documentation

◆ error_w_methods()

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

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

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

◆ finish_w_methods()

void finish_w_methods ( MbsData mbs_data,
MbsDirdyn mbs_dd 
)

Finalize and clear memory allocated for W Methods integrator.

Parameters
mbs_dataThe computed MBS structure
mbs_ddThe associated MbsDirdyn structure

◆ initialize_w_methods()

void initialize_w_methods ( MbsData mbs_data,
MbsDirdyn mbs_dd 
)

Initialize all needed fields in MbsDirdyn for W Methods integrator.

Parameters
mbs_dataThe computed MBS structure
mbs_ddThe associated MbsDirdyn structure

◆ loop_w_methods()

int loop_w_methods ( 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