NonSmoothDrivers (functions)


siconos.numerics.avi_driver(AffineVariationalInequalities *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)w, SolverOptions *options) → int[source]

General interface to solvers for Affine Variational Inequalities (AVI)

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
Returns:

  • info termination value
  • * 0 (successful)
  • * >0 (otherwise see each solver for more information about the log info)


siconos.numerics.fc2d_driver(FrictionContactProblem *problem, array_like (np.float64, 1D)reaction, array_like (np.float64, 1D)velocity, SolverOptions *options) → int[source]

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

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
Returns:

result (0 if successful otherwise 1).


siconos.numerics.fc3d_LmgcDriver(array_like (np.float64, 1D)reaction, array_like (np.float64, 1D)velocity, array_like (np.float64, 1D)q, array_like (np.float64, 1D)mu, array_like (np.float64, 1D)W, int *row, int *column, int nc, int nb, int solver_id, double tolerance, int itermax, int verbose, int outputFile, int freq_output, int ndof) → int[source]

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

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.)
Returns:

result (0 if successful otherwise 1).


siconos.numerics.fc3d_driver(FrictionContactProblem *problem, array_like (np.float64, 1D)reaction, array_like (np.float64, 1D)velocity, SolverOptions *options) → int[source]

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

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
Returns:

result (0 if successful otherwise 1).


siconos.numerics.gfc3d_LmgcDriver(array_like (np.float64, 1D)reaction, array_like (np.float64, 1D)velocity, array_like (np.float64, 1D)globalVelocity, array_like (np.float64, 1D)q, array_like (np.float64, 1D)b, array_like (np.float64, 1D)mu, array_like (np.float64, 1D)Mdata, int nzM, int *rowM, int *colM, array_like (np.float64, 1D)Hdata, int nzH, int *rowH, int *colH, int n, int nc, int solver_id, int isize, int *iparam, int dsize, array_like (np.float64, 1D)dparam, int verbose, int outputFile, int freq_output) → int[source]

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

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
Returns:

result (0 if successful otherwise 1).


siconos.numerics.gfc3d_driver(GlobalFrictionContactProblem *problem, array_like (np.float64, 1D)reaction, array_like (np.float64, 1D)velocity, array_like (np.float64, 1D)globalVelocity, SolverOptions *options) → int[source]

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

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
Returns:

result (0 if successful otherwise 1).


siconos.numerics.linearComplementarity_driver(LinearComplementarityProblem *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)w, SolverOptions *options) → int[source]

General interface to solvers for Linear Complementarity Problems.

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
Returns:

  • info termination value
  • * 0 (successful)
  • * >0 (otherwise see each solver for more information about the log info)


siconos.numerics.mcp_driver(MixedComplementarityProblem *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)w, SolverOptions *options) → int[source]

General interface to solver for MCP problems.

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
Returns:

info termination value 0 (successful, else error.)


siconos.numerics.mcp_driver2(MixedComplementarityProblem2 *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)w, SolverOptions *options) → int[source]

General interface to solver for MCP problems – new version.

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
Returns:

info termination value 0 (successful, else error.)


siconos.numerics.mlcp_driver(MixedLinearComplementarityProblem *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)w, SolverOptions *options) → int[source]

General interface to solver for MLCP problems.

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
Returns:

  • info termination value
  • * 0 (successful)
  • * >0 (otherwise see each solver for more information about the log info)


siconos.numerics.ncp_driver(NonlinearComplementarityProblem *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)F, SolverOptions *options) → int[source]

General interface to solver for NCP problems.

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
Returns:

info termination value 0 (successful, else error)


siconos.numerics.relay_driver(RelayProblem *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)w, SolverOptions *options) → int[source]

General interface to solver for relay problems.

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
Returns:

  • info termination value
  • * 0 (successful)
  • * >0 (otherwise see each solver for more information about the log info)


siconos.numerics.soclcp_driver(SecondOrderConeLinearComplementarityProblem *problem, array_like (np.float64, 1D)r, array_like (np.float64, 1D)v, SolverOptions *options) → int[source]

General interface to solvers for SOCLCP problem.

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
Returns:

result (0 if successful otherwise 1).


siconos.numerics.variationalInequality_driver(VariationalInequality *problem, array_like (np.float64, 1D)x, array_like (np.float64, 1D)w, SolverOptions *options) → int[source]

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

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
Returns:

result (0 if successful otherwise 1).