Commit c22792ba authored by Olivier Lantsoght's avatar Olivier Lantsoght 🏁

Merge branch 'threshold_fix_mbs_part' into 'dev'

[fix][mbs_part] threshold now taken into account during part see issue #157

Closes #157

See merge request robotran/mbsysc!256
parents 707dc4fd ef482102
......@@ -61,6 +61,7 @@ int main(int argc, char const *argv[])
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);
......
......@@ -541,7 +541,7 @@ MbsData* MDS_create_MBSdataStruct(MDS_gen_strct* mds_gen_strct, MbsData* s)
s->lrod = NULL;
// NRerr
s->NRerr = 1e-9; //default value
s->NRerr = 1.0e-9; //default value
if (s->nqv){
// allocate to njoint, to be sure to have enough space if we add user constraints afte MbsData init
......
......@@ -493,6 +493,7 @@ void mbs_run_part(MbsPart* mbs_part, MbsData* mbs_data)
mbs_msg(">>PART>> ***** Geometrical Constraint solution *****\n");
}
mbs_aux = initMbsAux(mbs_data);
nbiter = mbs_close_geo(mbs_data, mbs_aux); // on essaie de fermer
nbiterMax = mbs_aux->MAX_NR_ITER;
freeMbsAux(mbs_aux, mbs_data);
......@@ -628,7 +629,6 @@ MbsPartOptions* mbs_new_part_options(void)
part_option_strct->rowperm = 0;
part_option_strct->visualise = 0;
part_option_strct->treshold = 1e-9;
part_option_strct->drivers = 0;
part_option_strct->verbose = 1;
part_option_strct->clearmbsglobal = 1;
......
......@@ -5,7 +5,6 @@
#include "mbs_data.h"
#include "MBSfun.h"
/**
* Structure defining the options of the coordinate
* partitioning module
......@@ -15,7 +14,6 @@ typedef struct MbsPartOptions
{
int rowperm; ///< 1 to allow line permutation; 0 otherwise, defaut = 0
int visualise; // no = 0, yes = 1, defaut = 0
double treshold; ///< Maximal error on constraint allowed in Newton-Raphson algorithm, defaut = 1e-9
int drivers; // no = 0, yes = 1, defaut = 0
int verbose; ///< 1 to get print indications related partitioning module; 0 otherwise, defaut = 1
int clearmbsglobal; // inout = 1, out = 2, none = 3, all = 4, defaut = 1
......
......@@ -21,8 +21,6 @@
#include "mbs_project_fct_ptr.h"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// utility structure for managing dynamic lib (for userfct and symbolic libraries)
......@@ -196,7 +194,7 @@ struct MbsData
int Nloopc; ///< Number of loop constraints.
int Ncons; ///< Number of algebraic constraints.
int Nuserc; ///< Number of user constraints.
double NRerr; ///< Maximal error on constraint allowed in Newton-Raphson algorithm.
double NRerr; ///< Maximal error on constraint allowed in Newton-Raphson algorithm, default 1.0e-9
double *lambda; ///< Array with the values of the Lagrange Multipliers related to the constraints.
// Driven variables (and joint forces)
double *Qc; ///< Array with the value of joint force introduced in driven joint to respect the user function.
......
......@@ -16,7 +16,6 @@ cdef extern from 'mbs_part.h':
cdef struct c_MbsPartOptions "MbsPartOptions":
int rowperm
int visualise
double treshold
int drivers
int verbose
int clearmbsglobal
......
......@@ -46,9 +46,6 @@ cdef class MbsPart(object):
if 'visualise' in kwargs:
self.mbs_part_ptr.options.visualise = kwargs['visualise']
kwargs.pop('visualise')
if 'treshold' in kwargs:
self.mbs_part_ptr.options.treshold = kwargs['treshold']
kwargs.pop('treshold')
if 'drivers' in kwargs:
self.mbs_part_ptr.options.drivers = kwargs['drivers']
kwargs.pop('drivers')
......
Markdown is supported
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