Commit ef482102 authored by Sebastien Timmermans's avatar Sebastien Timmermans 🎹

[PART] removing threshold option

parent 2c21215a
...@@ -541,7 +541,7 @@ MbsData* MDS_create_MBSdataStruct(MDS_gen_strct* mds_gen_strct, MbsData* s) ...@@ -541,7 +541,7 @@ MbsData* MDS_create_MBSdataStruct(MDS_gen_strct* mds_gen_strct, MbsData* s)
s->lrod = NULL; s->lrod = NULL;
// NRerr // NRerr
s->NRerr = DEFAULT_THRESHOLD_NRerr; //default value s->NRerr = 1.0e-9; //default value
if (s->nqv){ if (s->nqv){
// allocate to njoint, to be sure to have enough space if we add user constraints afte MbsData init // allocate to njoint, to be sure to have enough space if we add user constraints afte MbsData init
......
...@@ -413,8 +413,6 @@ void mbs_run_part(MbsPart* mbs_part, MbsData* mbs_data) ...@@ -413,8 +413,6 @@ void mbs_run_part(MbsPart* mbs_part, MbsData* mbs_data)
int* ind_u_des = NULL; int* ind_u_des = NULL;
int nbiterMax; int nbiterMax;
mbs_data->NRerr = mbs_part->options->threshold; // taking user threshold into account
MbsAux *mbs_aux; //change it ! MbsAux *mbs_aux; //change it !
if(mbs_data->Ncons == 0) // change it ! if(mbs_data->Ncons == 0) // change it !
...@@ -612,8 +610,6 @@ void mbs_run_part(MbsPart* mbs_part, MbsData* mbs_data) ...@@ -612,8 +610,6 @@ void mbs_run_part(MbsPart* mbs_part, MbsData* mbs_data)
} }
free_ivec_0(ind_u_des); free_ivec_0(ind_u_des);
free_ivec_0(ind_c); free_ivec_0(ind_c);
mbs_data->NRerr = DEFAULT_THRESHOLD_NRerr; //default value of NRerr
} }
...@@ -633,7 +629,6 @@ MbsPartOptions* mbs_new_part_options(void) ...@@ -633,7 +629,6 @@ MbsPartOptions* mbs_new_part_options(void)
part_option_strct->rowperm = 0; part_option_strct->rowperm = 0;
part_option_strct->visualise = 0; part_option_strct->visualise = 0;
part_option_strct->threshold = DEFAULT_THRESHOLD_NRerr;
part_option_strct->drivers = 0; part_option_strct->drivers = 0;
part_option_strct->verbose = 1; part_option_strct->verbose = 1;
part_option_strct->clearmbsglobal = 1; part_option_strct->clearmbsglobal = 1;
......
...@@ -14,7 +14,6 @@ typedef struct MbsPartOptions ...@@ -14,7 +14,6 @@ typedef struct MbsPartOptions
{ {
int rowperm; ///< 1 to allow line permutation; 0 otherwise, defaut = 0 int rowperm; ///< 1 to allow line permutation; 0 otherwise, defaut = 0
int visualise; // no = 0, yes = 1, defaut = 0 int visualise; // no = 0, yes = 1, defaut = 0
double threshold; ///< Maximal error on constraint allowed in Newton-Raphson algorithm, defaut = 1e-9
int drivers; // no = 0, yes = 1, defaut = 0 int drivers; // no = 0, yes = 1, defaut = 0
int verbose; ///< 1 to get print indications related partitioning module; 0 otherwise, defaut = 1 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 int clearmbsglobal; // inout = 1, out = 2, none = 3, all = 4, defaut = 1
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include "mbs_project_fct_ptr.h" #include "mbs_project_fct_ptr.h"
#define DEFAULT_THRESHOLD_NRerr 1.0e-9
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// utility structure for managing dynamic lib (for userfct and symbolic libraries) // utility structure for managing dynamic lib (for userfct and symbolic libraries)
...@@ -196,7 +194,7 @@ struct MbsData ...@@ -196,7 +194,7 @@ struct MbsData
int Nloopc; ///< Number of loop constraints. int Nloopc; ///< Number of loop constraints.
int Ncons; ///< Number of algebraic constraints. int Ncons; ///< Number of algebraic constraints.
int Nuserc; ///< Number of user 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. double *lambda; ///< Array with the values of the Lagrange Multipliers related to the constraints.
// Driven variables (and joint forces) // Driven variables (and joint forces)
double *Qc; ///< Array with the value of joint force introduced in driven joint to respect the user function. 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': ...@@ -16,7 +16,6 @@ cdef extern from 'mbs_part.h':
cdef struct c_MbsPartOptions "MbsPartOptions": cdef struct c_MbsPartOptions "MbsPartOptions":
int rowperm int rowperm
int visualise int visualise
double threshold
int drivers int drivers
int verbose int verbose
int clearmbsglobal int clearmbsglobal
......
...@@ -46,9 +46,6 @@ cdef class MbsPart(object): ...@@ -46,9 +46,6 @@ cdef class MbsPart(object):
if 'visualise' in kwargs: if 'visualise' in kwargs:
self.mbs_part_ptr.options.visualise = kwargs['visualise'] self.mbs_part_ptr.options.visualise = kwargs['visualise']
kwargs.pop('visualise') kwargs.pop('visualise')
if 'threshold' in kwargs:
self.mbs_part_ptr.options.threshold = kwargs['threshold']
kwargs.pop('threshold')
if 'drivers' in kwargs: if 'drivers' in kwargs:
self.mbs_part_ptr.options.drivers = kwargs['drivers'] self.mbs_part_ptr.options.drivers = kwargs['drivers']
kwargs.pop('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