#include <float.h>
#include <string.h>
#include "mbs_data.h"
#include "mbs_path.h"
#include "mbs_trigo.h"
#include "mbs_matrix.h"
#include "mbs_message.h"
#include "mbs_1D_array.h"
Macros | |
#define | mbs_new_user_model() s->fct.user.mbs_new_user_model() |
#define | mbs_print_user_model(um) s->fct.user.mbs_print_user_model(um) |
#define | mbs_save_um(file, um) s->fct.user.mbs_save_um(file, um) |
#define | mbs_save_user_IO(file, um) s->fct.user.mbs_save_user_IO(file, um) |
Functions | |
void | mbs_print_data (MbsData *s) |
void | mbs_copy_data (MbsData *s, MbsData *s_copy) |
Copy all fields between two MBSdata structures. More... | |
void | mbs_reset_data (MbsData *s) |
Reset all fields of a MbsData structure to initial values. More... | |
int | mbs_write_data (MbsData *s, char *filename, char *function_name) |
Write a source with a function allocating and setting a MbsData copy of the provided. More... | |
int | mbs_compare_data (MbsData *s1, MbsData *s2, int accelred) |
Compare two MbsData. More... | |
#define mbs_new_user_model | ( | ) | s->fct.user.mbs_new_user_model() |
#define mbs_print_user_model | ( | um | ) | s->fct.user.mbs_print_user_model(um) |
#define mbs_save_um | ( | file, | |
um | |||
) | s->fct.user.mbs_save_um(file, um) |
#define mbs_save_user_IO | ( | file, | |
um | |||
) | s->fct.user.mbs_save_user_IO(file, um) |
Compare two MbsData.
The following fields are not compared:
Other fields may be ommited.
The user model parameters are not compared.
If using "accelred" activate the flag accelred
(non-null value). Otherwhise deactivate it (null value). The field specifiec to accelered (MbsData::jac_user and MbsData::jdqd_user) are allocated with size MbsData::nqv at file loading. When not using "accelred" this value can be changed without reallocating the fields.
[in] | s1 | The first multibody system. |
[in] | s2 | The second multibody system |
[in] | accelred | Flag to compare specified field for accelred usage (user jacobian and jdqd fields). Should be set to False by default. |
Copy all fields between two MBSdata structures.
WARNING: This function is not updated daily with new functionnalities of MbsData. Use with care.
The function does not modify the followings:
[in] | s | Pointer to the multibody source. |
[out] | s_copy | Pointer to the multibody output. |
void mbs_print_data | ( | MbsData * | s | ) |
void mbs_reset_data | ( | MbsData * | s | ) |
int mbs_write_data | ( | MbsData * | mbs, |
char * | filename, | ||
char * | function_name | ||
) |
Write a source with a function allocating and setting a MbsData copy of the provided.
[in] | mbs | The MbsData structure to be set in the function. |
[in] | filename | The name of the source file to be created. |
[in] | function_name | The name of the function creating the new MbsData. NULL can be provided, in such a case the name will be "get_mbs_data". |