File numerics/src/NonSmoothDrivers.h¶
Go to the source code of this file
This file provides all generic functions (drivers), interfaces to the different formulations for Non-Smooth Problems available in Numerics.
- Todo:
solve_qp does not exist
Use fc3d tools.
Functions
-
int linearComplementarity_driver(LinearComplementarityProblem *problem, double *z, double *w, SolverOptions *options)¶
General interface to solvers for Linear Complementarity Problems.
- Parameters
problem – [in] the LinearComplementarityProblem structure which handles the problem (M,q)
z – [inout] a n-vector of doubles which contains the solution of the problem.
w – [inout] a n-vector of doubles which contains the solution of the problem.
options – [inout] structure used to define the solver(s) and their parameters
- Returns
info termination value
0 : successful
>0 : otherwise see each solver for more information about the log info
-
int mlcp_driver(MixedLinearComplementarityProblem *problem, double *z, double *w, SolverOptions *options)¶
General interface to solver for MLCP problems.
0 : successful
>0 : otherwise see each solver for more information about the log info
- Todo:
Sizing the regularization parameter and apply it only on null diagnal term
- Parameters
problem – [in] the MixedLinearComplementarityProblem structure which handles the problem (M,q)
z – [inout] a m+n-vector of doubles which contains the solution of the problem.
w – [inout] a m+n-vector of doubles which contains the solution of the problem.
options – [inout] structure used to define the solver(s) and their parameters
- Returns
info termination value,
-
int fc2d_driver(FrictionContactProblem *problem, double *reaction, double *velocity, SolverOptions *options)¶
General interface to solvers for friction-contact 2D problem.
- Parameters
problem – [in] the structure which handles the Friction-Contact problem
reaction – [inout] global vector (n)
velocity – [inout] global vector (n)
options – [inout] structure used to define the solver(s) and their parameters
- Returns
result (0 if successful otherwise 1).
-
int fc3d_driver(FrictionContactProblem *problem, double *reaction, double *velocity, SolverOptions *options)¶
General interface to solvers for friction-contact 3D problem.
- Parameters
problem – [in] the structure which handles the Friction-Contact problem
reaction – [inout] global vector (n)
velocity – [inout] global vector (n)
options – [inout] structure used to define the solver(s) and their parameters
- Returns
result (0 if successful otherwise 1).
-
int rolling_fc3d_driver(RollingFrictionContactProblem *problem, double *reaction, double *velocity, SolverOptions *options)¶
General interface to solvers for rolling friction-contact 3D problem.
- Parameters
problem – [in] the structure which handles the Friction-Contact problem
reaction – [inout] global vector (n)
velocity – [inout] global vector (n)
options – [inout] structure used to define the solver(s) and their parameters
- Returns
result (0 if successful otherwise 1).
-
int rolling_fc2d_driver(RollingFrictionContactProblem *problem, double *reaction, double *velocity, SolverOptions *options)¶
General interface to solvers for rolling friction-contact 2D problem.
- Parameters
problem – [in] the structure which handles the Friction-Contact problem
reaction – [inout] global vector (n)
velocity – [inout] global vector (n)
options – [inout] structure used to define the solver(s) and their parameters
- Returns
result (0 if successful otherwise 1).
-
int gfc2d_driver(GlobalFrictionContactProblem *problem, double *reaction, double *velocity, double *globalVelocity, SolverOptions *options)¶
General interface to solvers for global friction-contact 2D problem.
- Parameters
problem – [in] the structure which handles the Friction-Contact problem
reaction – [inout] global vector (n)
velocity – [inout] global vector (n)
globalVelocity – [inout] global vector
options – [inout] structure used to define the solver(s) and their parameters
- Returns
result (0 if successful otherwise 1).
-
int gfc3d_driver(GlobalFrictionContactProblem *problem, double *reaction, double *velocity, double *globalVelocity, SolverOptions *options)¶
General interface to solvers for global friction-contact 3D problem.
- Parameters
problem – [in] the structure which handles the Friction-Contact problem
reaction – [inout] global vector (n)
velocity – [inout] global vector (n)
globalVelocity – [inout] global vector
options – [inout] structure used to define the solver(s) and their parameters
- Returns
result (0 if successful otherwise 1).
-
int g_rolling_fc3d_driver(GlobalRollingFrictionContactProblem *problem, double *reaction, double *velocity, double *globalVelocity, SolverOptions *options)¶
General interface to solvers for global rolling friction-contact 3D problem.
- Parameters
problem – [in] the structure which handles the Friction-Contact problem
reaction – [inout] global vector (n)
velocity – [inout] global vector (n)
options – [inout] structure used to define the solver(s) and their parameters
- Returns
result (0 if successful otherwise 1).
-
int variationalInequality_driver(VariationalInequality *problem, double *x, double *w, SolverOptions *options)¶
General interface to solvers for friction-contact 3D problem.
- Parameters
problem – [in] the structure which handles the Friction-Contact problem
x – [inout] global vector (n)
w – [inout] global vector (n)
options – [inout] structure used to define the solver(s) and their parameters
- Returns
result (0 if successful otherwise 1).
-
int avi_driver(AffineVariationalInequalities *problem, double *z, double *w, SolverOptions *options)¶
General interface to solvers for Affine Variational Inequalities (AVI)
- Parameters
problem – [in] the AffineVariationalInequalities structure which handles the problem (M,q)
z – [inout] a n-vector of doubles which contains the solution of the problem.
w – [inout] a n-vector of doubles which contains the solution of the problem.
options – [inout] structure used to define the solver(s) and their parameters
- Returns
info termination value
0 : successful
>0 : otherwise see each solver for more information about the log info
-
int mcp_old_driver(MixedComplementarityProblem_old *problem, double *z, double *w, SolverOptions *options)¶
General interface to solver for MCP problems.
- Parameters
problem – [in] the MixedComplementarityProblem_old structure which handles the problem
z – [inout] a m+n-vector of doubles which contains the solution of the problem.
w – [inout] a m+n-vector of doubles which contains the solution of the problem.
options – [inout] structure used to define the solver(s) and its(their) parameters
- Returns
info termination value 0 : successful, else error.
-
int mcp_driver(MixedComplementarityProblem *problem, double *z, double *w, SolverOptions *options)¶
General interface to solver for MCP problems — new version.
- Parameters
problem – [in] the MixedComplementarityProblem structure which handles the problem
z – [inout] a m+n-vector of doubles which contains the solution of the problem.
w – [inout] a m+n-vector of doubles which contains the solution of the problem.
options – [inout] structure used to define the solver(s) and its(their) parameters
- Returns
info termination value 0 : successful, else error.
-
int ncp_driver(NonlinearComplementarityProblem *problem, double *z, double *F, SolverOptions *options)¶
General interface to solver for NCP problems.
- Parameters
problem – [in] the NonlinearComplementarityProblem structure which handles the problem
z – [inout] a n-vector of doubles which contains the solution of the problem.
F – [inout] a n-vector of doubles which contains value of the function evaluated at the solution of the problem.
options – [inout] structure used to define the solver(s) and its(their) parameters
- Returns
info termination value 0 : successful, else error
-
int soclcp_driver(SecondOrderConeLinearComplementarityProblem *problem, double *r, double *v, SolverOptions *options)¶
General interface to solvers for SOCLCP problem.
- Parameters
problem – [in] the structure which handles the Friction-Contact problem
r – [inout] global vector (n)
v – [inout] global vector (n)
options – [inout] structure used to define the solver(s) and their parameters
- Returns
result (0 if successful otherwise 1).
-
int fc3d_LmgcDriver(double *reaction, double *velocity, double *q, double *mu, double *W, unsigned int *row, unsigned int *column, unsigned int nc, unsigned int nb, int solver_id, double tolerance, int itermax, int verbose, int outputFile, int freq_output, int ndof)¶
LMGC interface to solvers for friction-contact 3D problem.
- Parameters
reaction – [inout] global vector (nc*3)
velocity – [inout] global vector (nc*3)
q – [in] global vector (nc*3)
mu – [in] global vector (nc)
W – [in] the block matrix in coordinate format
row – [in] block row indices
column – [in] block column indices
nc – [in] number of contacts
nb – [in] number of blocks
solver_id – [in] id an int to be mapped to actual solver in Numerics
tolerance – [in] threshold used to validate the solution: if the error is less than this value, the solution is accepted
itermax – [in] the maximum number of iteration
verbose – [in] level 0 : nothing, 1: mid level 2: high level
outputFile – [in] outputFile option 0 : nothing 1 : dat file 2: FCLIB HDF5 file if FCLIB is found
freq_output – [in]
ndof – [in] the numbe of dof in the dynamical systems involved in contact (for output in file.)
- Returns
result (0 if successful otherwise 1).
-
int gfc3d_LmgcDriver(double *reaction, double *velocity, double *globalVelocity, double *q, double *b, double *mu, double *Mdata, unsigned int nzM, unsigned int *rowM, unsigned int *colM, double *Hdata, unsigned int nzH, unsigned int *rowH, unsigned int *colH, unsigned int n, unsigned int nc, int solver_id, int isize, int *iparam, int dsize, double *dparam, int verbose, int outputFile, int freq_output)¶
LMGC interface to solvers for global friction-contact 3D problem.
- Parameters
reaction – [inout] global vector (nc*3)
velocity – [inout] global vector (nc*3)
globalVelocity – [inout] global velocity vector (n)
q – [in] global vector (n)
b – [in] global vector (nc*3)
mu – [in] global vector (nc)
Mdata – [in] the sparse matrix in coordinate format
nzM – [in] number of non zeros in Mdata
rowM – [in] row indices of M
colM – [in] column indices of M
Hdata – [in] the sparse matrix in coordinate format
nzH – [in] number of non zeros in Hdata
rowH – [in] row indices of H
colH – [in] column indices of H
n – [in] size of global velocity
nc – [in] number of contacts
solver_id – [in] id an int to be mapped to actual solver in Numerics
isize – [in] sive of integer parameters array
iparam – [in] integer parameters array
dsize – [in] sive of double parameters array
dparam – [in] double parameters array
verbose – [in] level 0 : nothing, 1: mid level 2: high level
outputFile – [in] outputFile option 0 : nothing 1 : C file , 1 : dat file 3: FCLIB HDF5 file if FCLIB is found
freq_output – [in]
- Returns
result (0 if successful otherwise 1).
-
int relay_driver(RelayProblem *problem, double *z, double *w, SolverOptions *options)¶
General interface to solver for relay problems.
0 : successful
>0 : otherwise see each solver for more information about the log info
- Parameters
problem – [in] the RelayProblem structure which handles the problem (M,q)
z – [inout] a n-vector of doubles which contains the solution of the problem.
w – [inout] a n-vector of doubles which contains the solution of the problem.
options – [inout] structure used to define the solver(s) and its (their) parameters
- Returns
info termination value