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.

Use fc3d tools.

Functions

int avi_driver(AffineVariationalInequalities *problem, double *z, double *w, SolverOptions *options)

General interface to solvers for Affine Variational Inequalities (AVI)

Return
info termination value
  • 0 : successful
  • >0 : otherwise see each solver for more information about the log info
Parameters
  • problem: the AffineVariationalInequalities structure which handles the problem (M,q)
  • z: a n-vector of doubles which contains the solution of the problem.
  • w: a n-vector of doubles which contains the solution of the problem.
  • options: structure used to define the solver(s) and their parameters

int fc2d_driver(FrictionContactProblem *problem, double *reaction, double *velocity, SolverOptions *options)

General interface to solvers for friction-contact 2D problem.

Return
result (0 if successful otherwise 1).
Parameters
  • problem: the structure which handles the Friction-Contact problem
  • reaction: global vector (n)
  • velocity: global vector (n)
  • options: structure used to define the solver(s) and their parameters

int fc3d_driver(FrictionContactProblem *problem, double *reaction, double *velocity, SolverOptions *options)

General interface to solvers for friction-contact 3D problem.

Return
result (0 if successful otherwise 1).
Parameters
  • problem: the structure which handles the Friction-Contact problem
  • reaction: global vector (n)
  • velocity: global vector (n)
  • options: structure used to define the solver(s) and their parameters

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.

Return
result (0 if successful otherwise 1).
Parameters
  • reaction: global vector (nc*3)
  • velocity: global vector (nc*3)
  • q: global vector (nc*3)
  • mu: global vector (nc)
  • W: the block matrix in coordinate format
  • row: block row indices
  • column: block column indices
  • nc: number of contacts
  • nb: number of blocks
  • solver_id: id an int to be mapped to actual solver in Numerics
  • tolerance: threshold used to validate the solution: if the error is less than this value, the solution is accepted
  • itermax: the maximum number of iteration
  • verbose: level 0 : nothing, 1: mid level 2: high level
  • outputFile: outputFile option 0 : nothing 1 : dat file 2: FCLIB HDF5 file if FCLIB is found
  • freq_output:
  • ndof: the numbe of dof in the dynamical systems involved in contact (for output in file.)

int gfc3d_driver(GlobalFrictionContactProblem *problem, double *reaction, double *velocity, double *globalVelocity, SolverOptions *options)

General interface to solvers for global friction-contact 3D problem.

Return
result (0 if successful otherwise 1).
Parameters
  • problem: the structure which handles the Friction-Contact problem
  • reaction: global vector (n)
  • velocity: global vector (n)
  • globalVelocity: global vector
  • options: structure used to define the solver(s) and their parameters

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.

Return
result (0 if successful otherwise 1).
Parameters
  • reaction: global vector (nc*3)
  • velocity: global vector (nc*3)
  • globalVelocity: global velocity vector (n)
  • q: global vector (n)
  • b: global vector (nc*3)
  • mu: global vector (nc)
  • Mdata: the sparse matrix in coordinate format
  • nzM: number of non zeros in Mdata
  • rowM: row indices of M
  • colM: column indices of M
  • Hdata: the sparse matrix in coordinate format
  • nzH: number of non zeros in Hdata
  • rowH: row indices of H
  • colH: column indices of H
  • n: size of global velocity
  • nc: number of contacts
  • solver_id: id an int to be mapped to actual solver in Numerics
  • isize: sive of integer parameters array
  • iparam: integer parameters array
  • dsize: sive of double parameters array
  • dparam: double parameters array
  • verbose: level 0 : nothing, 1: mid level 2: high level
  • outputFile: outputFile option 0 : nothing 1 : C file , 1 : dat file 3: FCLIB HDF5 file if FCLIB is found
  • freq_output:

int linearComplementarity_driver(LinearComplementarityProblem *problem, double *z, double *w, SolverOptions *options)

General interface to solvers for Linear Complementarity Problems.

Return
info termination value
  • 0 : successful
  • >0 : otherwise see each solver for more information about the log info
Parameters
  • problem: the LinearComplementarityProblem structure which handles the problem (M,q)
  • z: a n-vector of doubles which contains the solution of the problem.
  • w: a n-vector of doubles which contains the solution of the problem.
  • options: structure used to define the solver(s) and their parameters

int mcp_driver(MixedComplementarityProblem *problem, double *z, double *w, SolverOptions *options)

General interface to solver for MCP problems.

Return
info termination value 0 : successful, else error.
Parameters
  • problem: the MixedComplementarityProblem structure which handles the problem
  • z: a m+n-vector of doubles which contains the solution of the problem.
  • w: a m+n-vector of doubles which contains the solution of the problem.
  • options: structure used to define the solver(s) and its(their) parameters

int mcp_driver2(MixedComplementarityProblem2 *problem, double *z, double *w, SolverOptions *options)

General interface to solver for MCP problems new version.

Return
info termination value 0 : successful, else error.
Parameters
  • problem: the MixedComplementarityProblem2 structure which handles the problem
  • z: a m+n-vector of doubles which contains the solution of the problem.
  • w: a m+n-vector of doubles which contains the solution of the problem.
  • options: structure used to define the solver(s) and its(their) parameters

int mlcp_driver(MixedLinearComplementarityProblem *problem, double *z, double *w, SolverOptions *options)

General interface to solver for MLCP problems.

Return
info termination value
  • 0 : successful
  • >0 : otherwise see each solver for more information about the log info
Parameters
  • problem: the MixedLinearComplementarityProblem structure which handles the problem (M,q)
  • z: a m+n-vector of doubles which contains the solution of the problem.
  • w: a m+n-vector of doubles which contains the solution of the problem.
  • options: structure used to define the solver(s) and their parameters

int ncp_driver(NonlinearComplementarityProblem *problem, double *z, double *F, SolverOptions *options)

General interface to solver for NCP problems.

Return
info termination value 0 : successful, else error
Parameters
  • problem: the NonlinearComplementarityProblem structure which handles the problem
  • z: a n-vector of doubles which contains the solution of the problem.
  • F: a n-vector of doubles which contains value of the function evaluated at the solution of the problem.
  • options: structure used to define the solver(s) and its(their) parameters

int relay_driver(RelayProblem *problem, double *z, double *w, SolverOptions *options)

General interface to solver for relay problems.

Return
info termination value
  • 0 : successful
  • >0 : otherwise see each solver for more information about the log info
Parameters
  • problem: the RelayProblem structure which handles the problem (M,q)
  • z: a n-vector of doubles which contains the solution of the problem.
  • w: a n-vector of doubles which contains the solution of the problem.
  • options: structure used to define the solver(s) and its (their) parameters

int soclcp_driver(SecondOrderConeLinearComplementarityProblem *problem, double *r, double *v, SolverOptions *options)

General interface to solvers for SOCLCP problem.

Return
result (0 if successful otherwise 1).
Parameters
  • problem: the structure which handles the Friction-Contact problem
  • r: global vector (n)
  • v: global vector (n)
  • options: structure used to define the solver(s) and their parameters

int variationalInequality_driver(VariationalInequality *problem, double *x, double *w, SolverOptions *options)

General interface to solvers for friction-contact 3D problem.

Return
result (0 if successful otherwise 1).
Parameters
  • problem: the structure which handles the Friction-Contact problem
  • x: global vector (n)
  • w: global vector (n)
  • options: structure used to define the solver(s) and their parameters