Robotran C Documentation

Coordinate partitioning

Partitionning of the generalized coordinates into independent and dependent variables (for constrained multibody systems only).
For more information, see Robotran theoritical framework.

Note
This module must be run once prior to any other module in case of multibody model containing loop and/or user-constraint.

Code sample

For running the coordinate partitioning, insert the following code in your main script and adapt it to your need :

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/* COORDINATE PARTITIONING *
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
MbsPart *mbs_part;
mbs_data->process = 1;
mbs_part = mbs_new_part(mbs_data);
mbs_part->options->rowperm=1;
mbs_part->options->verbose = 1;
mbs_run_part(mbs_part, mbs_data);
mbs_delete_part(mbs_part);

Use

The partitioning is performed by the function mbs_run_part().

The user specifies the desired options of the partitioning in the MbsPartOptions structure. The results are provided in the MbsPart structure, and .

The function calls successively :

MbsPart::options
MbsPartOptions * options
Structure containing the options for coordinate partitioning module.
Definition: mbs_part.h:36
mbs_run_part
int mbs_run_part(MbsPart *mbs_part, MbsData *mbs_data)
Main function of the coordinate partitioning module.
Definition: mbs_part.c:494
MbsPart
Main structure for the coordinate partitioning module.
Definition: mbs_part.h:34
MbsPartOptions::verbose
int verbose
1 to get print indications related partitioning module; 0 otherwise, defaut = 1
Definition: mbs_part.h:19
mbs_new_part
MbsPart * mbs_new_part(MbsData *mbs_data)
Allocate a new MbsPart structure for the given MbsData structure.
Definition: mbs_part.c:787
MbsData::process
int process
Flag that indicate which module is currently running (1=partitioning, 2=equilibrium,...
Definition: mbs_data.h:297
mbs_delete_part
void mbs_delete_part(MbsPart *mbs_part)
Free the memory of the given MbsPart structure.
Definition: mbs_part.c:812
MbsPartOptions::rowperm
int rowperm
1 to allow line permutation; 0 otherwise, defaut = 0
Definition: mbs_part.h:15