Commit 021e20c0 authored by Nicolas Docquier's avatar Nicolas Docquier
Browse files

Add the mbs_ prefix to all symbolic function so as to avoid conflicting names (issue #18)

parent 7b86bf18
......@@ -32,7 +32,7 @@
#include "MBSdataStructR7.h"
#include "MBSfunR7.h"
void cons_hJ(double *h,double **Jac,
void mbs_cons_hJ(double *h,double **Jac,
MbsData *s, double tsim)
// double h[2];
......
......@@ -32,7 +32,7 @@
#include "MBSdataStructR7.h"
#include "MBSfunR7.h"
void cons_jdqd(double *Jdqd,
void mbs_cons_jdqd(double *Jdqd,
MbsData *s, double tsim)
// double Jdqd[2];
......
......@@ -32,7 +32,7 @@
#include "MBSdataStructR7.h"
#include "MBSfunR7.h"
void dirdyna(double **M,double *c,
void mbs_dirdyna(double **M,double *c,
MbsData *s, double tsim)
// double M[5][5];
......
......@@ -32,7 +32,7 @@
#include "MBSdataStructR7.h"
#include "MBSfunR7.h"
void extforces(double **frc,double **trq,
void mbs_extforces(double **frc,double **trq,
MbsData *s, double tsim)
// double frc[3][5];
......
......@@ -32,7 +32,7 @@
#include "MBSdataStructR7.h"
#include "MBSfunR7.h"
void gensensor(MbsSensor *sens,
void mbs_gensensor(MbsSensor *sens,
MbsData *s,
int isens)
{
......
......@@ -32,7 +32,7 @@
#include "MBSdataStructR7.h"
#include "MBSfunR7.h"
void invdyna(double *Qq,
void mbs_invdyna(double *Qq,
MbsData *s, double tsim)
// double Qq[5];
......
......@@ -34,7 +34,7 @@
void link(double **frc,double **trq,double *Flnk,double *Z,double *Zd,
void mbs_link(double **frc,double **trq,double *Flnk,double *Z,double *Zd,
MbsData *s, double tsim)
// double frc[3][5];
......
......@@ -32,7 +32,7 @@
#include "MBSdataStructR7.h"
#include "MBSfunR7.h"
void sensor(MbsSensor *sens,
void mbs_sensor(MbsSensor *sens,
MbsData *s,
int isens)
{
......
......@@ -67,7 +67,7 @@ function(increment_void_symbolic arg0)
file(GLOB SYMBOLIC_FILES "${PROJECT_SOURCE_DIR}/../${arg0}/mbs_cons_jdqd*")
if (NOT SYMBOLIC_FILES)
message("Symbolic cons_jdqd not found, linking to void function")
message("Symbolic mbs_cons_jdqd not found, linking to void function")
set(VOID_SYMBOLIC ${VOID_SYMBOLIC} ${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_void_symbolicR/mbs_cons_jdqd_void.c)
endif()
......@@ -75,7 +75,7 @@ function(increment_void_symbolic arg0)
file(GLOB SYMBOLIC_FILES "${PROJECT_SOURCE_DIR}/../${arg0}/mbs_dirdyna*")
if (NOT SYMBOLIC_FILES)
message("Symbolic dirdyna not found, linking to void function")
message("Symbolic mbs_dirdyna not found, linking to void function")
set(VOID_SYMBOLIC ${VOID_SYMBOLIC} ${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_void_symbolicR/mbs_dirdyna_void.c)
endif()
......@@ -83,7 +83,7 @@ function(increment_void_symbolic arg0)
file(GLOB SYMBOLIC_FILES "${PROJECT_SOURCE_DIR}/../${arg0}/mbs_extforces*")
if (NOT SYMBOLIC_FILES)
message("Symbolic extforces not found, linking to void function")
message("Symbolic mbs_extforces not found, linking to void function")
set(VOID_SYMBOLIC ${VOID_SYMBOLIC} ${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_void_symbolicR/mbs_extforces_void.c)
endif()
......@@ -95,26 +95,26 @@ function(increment_void_symbolic arg0)
file(GLOB SYMBOLIC_FILES "${PROJECT_SOURCE_DIR}/../${arg0}/mbs_invdyna*")
if (NOT SYMBOLIC_FILES)
message("Symbolic invdyna not found, linking to void function")
message("Symbolic mbs_invdyna not found, linking to void function")
set(VOID_SYMBOLIC ${VOID_SYMBOLIC} ${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_void_symbolicR/mbs_invdyna_void.c)
endif()
file(GLOB SYMBOLIC_FILES "${PROJECT_SOURCE_DIR}/../${arg0}/mbs_link*")
if (NOT SYMBOLIC_FILES)
message("Symbolic link not found, linking to void function")
message("Symbolic mbs_link not found, linking to void function")
set(VOID_SYMBOLIC ${VOID_SYMBOLIC} ${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_void_symbolicR/mbs_link_void.c)
endif()
file(GLOB SYMBOLIC_FILES "${PROJECT_SOURCE_DIR}/../${arg0}/mbs_link3D*")
if (NOT SYMBOLIC_FILES)
message("Symbolic link3D not found, linking to void function")
message("Symbolic mbs_link3D not found, linking to void function")
set(VOID_SYMBOLIC ${VOID_SYMBOLIC} ${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_void_symbolicR/mbs_link3D_void.c)
endif()
file(GLOB SYMBOLIC_FILES "${PROJECT_SOURCE_DIR}/../${arg0}/mbs_sensor*")
if (NOT SYMBOLIC_FILES)
message("Symbolic sensor not found, linking to void function")
message("Symbolic mbs_sensor not found, linking to void function")
set(VOID_SYMBOLIC ${VOID_SYMBOLIC} ${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_void_symbolicR/mbs_sensor_void.c)
endif()
......
......@@ -23,11 +23,11 @@ void mbs_calc_force(MbsData* s){
}
}
if(s->Nlink > 0) link(s->frc,s->trq,s->Fl,s->Z,s->Zd,s,s->tsim);
if(s->Nlink > 0) mbs_link(s->frc,s->trq,s->Fl,s->Z,s->Zd,s,s->tsim);
if(s->Nlink3D > 0) link3D(s->frc,s->trq,s,s->tsim);
if(s->Nlink3D > 0) mbs_link3D(s->frc,s->trq,s,s->tsim);
if(s->Nxfrc > 0) extforces(s->frc,s->trq,s,s->tsim);
if(s->Nxfrc > 0) mbs_extforces(s->frc,s->trq,s,s->tsim);
s->Qq = user_JointForces(s,s->tsim);
......
......@@ -127,7 +127,7 @@ void mbs_calc_hJ(MbsData *s, MbsAux *mbs_aux)
int i,j;
// contraintes de fermeture de boucles
cons_hJ(mbs_aux->h,mbs_aux->Jac,s,s->tsim);
mbs_cons_hJ(mbs_aux->h,mbs_aux->Jac,s,s->tsim);
// contraintes user
if (s->Nuserc>0) {
......@@ -147,7 +147,7 @@ void mbs_calc_jdqd(MbsData *s, MbsAux *mbs_aux)
int i;
// compute contribution of symbolic constraints to jdqd
cons_jdqd(mbs_aux->jdqd,s,s->tsim);
mbs_cons_jdqd(mbs_aux->jdqd,s,s->tsim);
// compute contribution of user constraints to jdqd
if (s->Nuserc>0) {
......
......@@ -57,7 +57,7 @@ int dirdynared(MbsAux *mbs_aux,MbsData *s)
// calcul de la matrice de masse et du vecteur des forces non linéaires
dirdyna(mbs_aux->M,mbs_aux->c,s,s->tsim);
mbs_dirdyna(mbs_aux->M,mbs_aux->c,s,s->tsim);
for(i=1;i<=s->njoint;i++)
{
......
......@@ -91,9 +91,9 @@ int compute_Fr_uc( double *Fr_uc, MDS_gen_strct *mds_gen_strct, MbsPart *mbs_par
}
}
if(mbs_data->Nlink > 0) link(mbs_data->frc,mbs_data->trq,mbs_data->Fl,mbs_data->Z,mbs_data->Zd,mbs_data,mbs_data->tsim);
if(mbs_data->Nlink > 0) mbs_link(mbs_data->frc,mbs_data->trq,mbs_data->Fl,mbs_data->Z,mbs_data->Zd,mbs_data,mbs_data->tsim);
if(mbs_data->Nxfrc > 0) extforces(mbs_data->frc,mbs_data->trq,mbs_data,mbs_data->tsim);
if(mbs_data->Nxfrc > 0) mbs_extforces(mbs_data->frc,mbs_data->trq,mbs_data,mbs_data->tsim);
mbs_data->Qq = user_JointForces(mbs_data,mbs_data->tsim);
......@@ -102,7 +102,7 @@ int compute_Fr_uc( double *Fr_uc, MDS_gen_strct *mds_gen_strct, MbsPart *mbs_par
zeros_double_vec(&(mbs_data->qdd[1]), mbs_data->njoint); // ... sécurité en attente d'une fonction symb c(q,qd)
dirdyna(mbs_aux->M,mbs_aux->c,mbs_data,mbs_data->tsim); // futur : c(q,qd)
mbs_dirdyna(mbs_aux->M,mbs_aux->c,mbs_data,mbs_data->tsim); // futur : c(q,qd)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
copy_double_vec(&(mbs_aux->c[1]), c, mds_gen_strct->bodytree->n_joint); // change it
......
......@@ -452,7 +452,7 @@ void PART_calc_hJ(MbsData* mbs_data, double* h, double** J)
if(mbs_data->Nloopc)
{
cons_hJ(h_loopc, J_loopc, mbs_data, mbs_data->tsim);
mbs_cons_hJ(h_loopc, J_loopc, mbs_data, mbs_data->tsim);
for (i=0; i<mbs_data->Nloopc; i++)
{
h[i] = h_loopc[i+1];
......
......@@ -53,30 +53,30 @@ double* user_Link3DForces(double PxF[4], double RxF[4][4],
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void cons_hJ(double *h,double **Jac,MbsData *s, double tsim);
void mbs_cons_hJ(double *h,double **Jac,MbsData *s, double tsim);
void cons_jdqd(double *Jdqd,MbsData *s, double tsim);
void mbs_cons_jdqd(double *Jdqd,MbsData *s, double tsim);
void link(double **frc,double **trq,double *Flnk,double *Z,double *Zd,MbsData *s, double tsim);
void mbs_link(double **frc,double **trq,double *Flnk,double *Z,double *Zd,MbsData *s, double tsim);
void link3D(double **frc,double **trq, MbsData *s, double tsim);
void mbs_link3D(double **frc,double **trq, MbsData *s, double tsim);
void extforces(double **frc, double **trq, MbsData *s, double tsim);
void mbs_extforces(double **frc, double **trq, MbsData *s, double tsim);
int accelred(double *qddu,MbsData *s, double tsim);
int mbs_accelred(double *qddu,MbsData *s, double tsim);
void gensensor(MbsSensor *sens,
void mbs_gensensor(MbsSensor *sens,
MbsData *s,
int isens);
void sensor(MbsSensor *sens,
void mbs_sensor(MbsSensor *sens,
MbsData *s,
int isens);
void invdyna(double *Qq,
void mbs_invdyna(double *Qq,
MbsData *s, double tsim);
void dirdyna(double **M,double *c,
void mbs_dirdyna(double **M,double *c,
MbsData *s, double tsim);
......
......@@ -12,7 +12,7 @@
#include "mbs_data.h"
void cons_hJ(double *h,double **Jac, MbsData *s, double tsim)
void mbs_cons_hJ(double *h,double **Jac, MbsData *s, double tsim)
{
}
......@@ -12,7 +12,7 @@
#include "mbs_data.h"
void cons_jdqd(double *Jdqd, MbsData *s, double tsim)
void mbs_cons_jdqd(double *Jdqd, MbsData *s, double tsim)
{
}
......@@ -12,7 +12,7 @@
#include "mbs_data.h"
void dirdyna(double **M,double *c, MbsData *s, double tsim)
void mbs_dirdyna(double **M,double *c, MbsData *s, double tsim)
{
}
......@@ -12,7 +12,7 @@
#include "mbs_data.h"
void extforces(double **frc,double **trq, MbsData *s, double tsim)
void mbs_extforces(double **frc,double **trq, MbsData *s, double tsim)
{
}
......@@ -14,7 +14,7 @@
#include "mbs_data.h"
#include "mbs_sensor.h"
void gensensor(MbsSensor *sens, MbsData *s,int isens)
void mbs_gensensor(MbsSensor *sens, MbsData *s,int isens)
{
}
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