|
Robotran C Documentation
|
Go to the documentation of this file.
18 #ifndef BADER_H_INCLUDED
19 #define BADER_H_INCLUDED
31 #define IMAXX (KMAXX+1)
59 int simpr(
double y[],
double dydx[],
int nvar,
double xs,
double htot,
int nstep,
double yout[],
81 int mmid(
double y[],
double dydx[],
int nvar,
double xs,
double htot,
int nstep,
double yout[],
114 int bader(
double y[],
double dydx[],
int nv,
double *xx,
double htry,
double eps,
115 double yscal[],
double *hdid,
double *hnext,
double h_max,
133 void pzextr(
int iest,
double xest,
double yest[],
double yz[],
double dy[],
int nv,
MbsData *s,
MbsDirdyn *dd);
140 void rzextr(
int iest,
double xest,
double yest[],
double yz[],
double dy[],
int nv,
MbsData *s,
MbsDirdyn *dd);
142 #endif // BADER_H_INCLUDED
static double dmaxarg1
Definition: bader.c:28
static double sqrarg
Definition: bader.c:28
#define KMAXX
Definition: bader.h:30
Implementation of eig function using lapacke without using the lapackE interface.
Definition: cholesky.c:14
int mbs_estim_jac_acc(double x, double htry, double y[], double dydx[], int compute_dfdx, double dfdx[], double **dfdy, int n, int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *dd)
Evaluate the Jacobian of a function accelerations using finite difference.
Definition: integrator.c:30
void lubksb_0(double **a, int n, int *indx, double b[])
Definition: lubksb.c:31
void pzextr(int iest, double xest, double yest[], double yz[], double dy[], int nv, MbsData *s, MbsDirdyn *dd)
Use polynomial extrapolation to evaluate nv functions at x = 0 by fitting a polynomial to a sequence ...
Definition: bader.c:353
This header defines global functions for Bader integrator in C.
static double dminarg1
Definition: bader.c:29
double * get_dvec_0(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 0
Definition: mbs_1D_array.c:880
static double maxarg1
Definition: bader.c:28
void lubksb(double **a, int n, int *indx, double b[])
Definition: lubksb.c:10
void rzextr(int iest, double xest, double yest[], double yz[], double dy[], int nv, MbsData *s, MbsDirdyn *dd)
Exact substitute for pzextr, but uses diagonal rational function extrapolation instead of polynomial ...
Definition: bader.c:387
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:415
#define SAFE1
Definition: bader.h:32
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:293
int mbs_invLU_0(double **A, double **Am1, int n)
Inverse the square matrix A using a LU decomposition.
Definition: inverse_lapack.c:28
static double maxarg2
Definition: bader.c:28
void rzextr(int iest, double xest, double yest[], double yz[], double dy[], int nv, MbsData *s, MbsDirdyn *dd)
Exact substitute for pzextr, but uses diagonal rational function extrapolation instead of polynomial ...
Definition: bader.c:387
double * k1
Definition: dopri5.c:32
static double minarg2
Definition: bader.c:29
static double dminarg2
Definition: bader.c:29
int ludcmp(double **a, int n, int *indx, double *d)
LU decomposition of a matrix with index starting at 1.
Definition: ludcmp.c:19
int mbs_freeze_jac(int freeze_index, int *next_freeze_index, double x, double h, double y[], double dydx[], int compute_dfdx, double dfdx[], double **dfdy, double dydx_freeze[], double dfdx_freeze[], double **dfdy_freeze, int n, int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *mbs_dd)
Freeze the Jacobian of an integrator structure until mbs_dd->options->n_freeze.
Definition: integrator.c:107
Definition: cholesky.c:15
#define _MBS_ERR_LOW_LU_DCMP
Low Level error number LU decompostion = -2.
Definition: mbs_errors_names.h:122
float x
Definition: cholesky.c:14
int mmid(double y[], double dydx[], int nvar, double xs, double htot, int nstep, double yout[], int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *dd)
Modified midpoint step.
Definition: bader.c:286
void * integrator_struct
pointer to store integrator structure
Definition: mbs_dirdyn_struct.h:183
int ludcmp_0(double **a, int n, int *indx, double *d)
LU decomposition of a matrix with index starting at 0.
Definition: ludcmp.c:82
double ** get_dmat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 0
Definition: mbs_matrix.c:238
static double minarg1
Definition: bader.c:29
static long nstep
Definition: dopri5.c:29
double tsim
current simulation time
Definition: mbs_dirdyn_struct.h:149
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
static double dmaxarg2
Definition: bader.c:28
int simpr(double y[], double dydx[], int nvar, double xs, double htot, int nstep, double yout[], int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *dd)
Performs one step of semi-implicit midpoint rule.
Definition: bader.c:169
#define TINY
Definition: ludcmp.c:17
float y
Definition: cholesky.c:14
int n_freeze
number of time step when the jacobian is freezed (computed once at the start of the n_freeze time ste...
Definition: mbs_dirdyn_struct.h:134
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:901
double y
Definition: cholesky.c:15
int simpr(double y[], double dydx[], int nvar, double xs, double htot, int nstep, double yout[], int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *dd)
Performs one step of semi-implicit midpoint rule.
Definition: bader.c:169
#define SAFE2
Definition: bader.h:33
#define REDMIN
Definition: bader.h:35
int mmid(double y[], double dydx[], int nvar, double xs, double htot, int nstep, double yout[], int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *dd)
Modified midpoint step.
Definition: bader.c:286
#define _MBS_ERR_MOD_SPEC_16
Generic error number Module specific errors range from -11 to -19 please read the error message a...
Definition: mbs_errors_names.h:192
This header defines function for bader integrators in C. based on an external source.
int bader(double y[], double dydx[], int nv, double *xx, double htry, double eps, double yscal[], double *hdid, double *hnext, double h_max, int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *dd)
Semi - implicit extrapolation step for integrating stiffo.d.e.
Definition: bader.c:31
void transpose_dmat_0(double **tab_src, double **tab_dest, int nb_r, int nb_c)
Transpose a [nb_r times nb_c] matrix of doubles and store the results in a [y times nb_r] matrix,...
Definition: mbs_matrix.c:440
#define REDMAX
Definition: bader.h:34
int * get_ivec_0(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 0
Definition: mbs_1D_array.c:399
double x
Definition: cholesky.c:15
Definition: mbs_data.h:149
int bader(double y[], double dydx[], int nv, double *xx, double htry, double eps, double yscal[], double *hdid, double *hnext, double h_max, int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *dd)
Semi - implicit extrapolation step for integrating stiffo.d.e.
Definition: bader.c:31
This header defines specific integrators functions in C.
double * get_dvec_1(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 1
Definition: mbs_1D_array.c:885
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:896
General structure of the direct dynamic module.
Definition: mbs_dirdyn_struct.h:144
void pzextr(int iest, double xest, double yest[], double yz[], double dy[], int nv, MbsData *s, MbsDirdyn *dd)
Use polynomial extrapolation to evaluate nv functions at x = 0 by fitting a polynomial to a sequence ...
Definition: bader.c:353
bader structure for dirdyn
Definition: mbs_bader.h:28
#define IMAXX
Definition: bader.h:31
MbsDirdynOptions * options
structure defining the option of a direct dynamic
Definition: mbs_dirdyn_struct.h:146
#define SCALMX
Definition: bader.h:37
#define _MBS_ERR_LOW_LAPACKE
Low Level error number problem with Lapacke system resolution = -5.
Definition: mbs_errors_names.h:137