fc2d_Solvers (functions)


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

cpg (conjugated projected gradient) solver for global contact problems with friction (2D)

Parameters:
  • problem – the friction-contact problem
  • reaction – vector
  • velocity – vector
  • info – termination value
  • options – structure for options

siconos.numerics.fc2d_cpg_setDefaultSolverOptions(SolverOptions *options) → int[source]

set the default solver parameters and perform memory allocation for CPG

Parameters:options – SolverOptions * the pointer to the options to set

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

fc2d_enum solver for frictionContact2D problems.

Parameters:
  • problem – structure that represents the fc2d (M, q…)
  • reaction – a n-vector of doubles which contains the initial solution and returns the solution of the problem.
  • velocity – a n-vector of doubles which returns the solution of the problem.
  • options
  • info – an integer which returns the termination value: 0 = convergence, 1 = no convergence, 2 = Null diagonal term

siconos.numerics.fc2d_enum_setDefaultSolverOptions(SolverOptions *options) → int[source]

set the default solver parameters and perform memory allocation for enum solver

Parameters:options – the pointer to options to set

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

latin solver for global contact problem with friction in the 2D case.

Parameters:
  • problem – the friction-contact problem
  • reaction – global vector
  • velocity – global vector
  • info – termination value
  • options – SolverOptions structure

siconos.numerics.fc2d_latin_setDefaultSolverOptions(SolverOptions *options) → int[source]

set the default solver parameters and perform memory allocation for LATIN

Parameters:options – the pointer to the options to set

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

fc2d_lexicolemke is a Lemke solver for frictionContact2D problems.

Parameters:
  • problem – structure that represents the fc2d (M, q…)
  • reaction – a n-vector of doubles which contains the initial solution and returns the solution of the problem.
  • velocity – a n-vector of doubles which returns the solution of the problem.
  • options
  • info – an integer which returns the termination value: 0 = convergence, 1 = no convergence, 2 = Null diagonal term

siconos.numerics.fc2d_lexicolemke_setDefaultSolverOptions(SolverOptions *options) → int[source]

set the default solver parameters and perform memory allocation for Lemke

Parameters:options – the pointer to options to set

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

Non Linear Gauss Seidel solver for global contact problem with friction in 2D case.

Parameters:
  • problem – the friction-contact problem
  • reaction – vector
  • velocity – vector
  • info – termination value
  • options – structure

siconos.numerics.fc2d_nsgs_setDefaultSolverOptions(SolverOptions *options) → int[source]

set the default solver parameters and perform memory allocation for LATIN

Parameters:options – the pointer to the options to set

siconos.numerics.fc2d_projc(double xi[], int *n, int statusi[], double p[], double fric[], array_like (np.float64, 1D)reaction, int *status) → None[source]

fc2d_projc is a specific projection operator related to CPG (conjugated projected gradient) algorithm for global contact problem with friction.

Parameters:
  • xi – the intermediate iterate which goes to be projected (projc1).
  • n – the dimension of the system.
  • statusi – a vector which contains the initial status.
  • p – a vector which contains the components of the descent direction.
  • fric – a vector which contains the friction coefficient.
  • reaction – the corrected iterate.
  • status – the new status.

siconos.numerics.fc2d_projf(int etat[], int *n, double y[], double fric[], double projf1[]) → None[source]

fc2d_projf is a specific projection operator related to CPG (conjugated projected gradient) algorithm for global contact problem with friction.

Parameters:
  • etat – parameter which represents the status vector.
  • n – parameter which represents the dimension of the system.
  • y – parameter which contains the components of the residue or descent direction vector.
  • fric – parameter which contains the friction coefficient.
  • projf1 – parameter which contains the projected residue or descent direction.

siconos.numerics.fc2d_setDefaultSolverOptions(SolverOptions *options, int solverId) → int[source]

set the default solver parameters and perform memory allocation for fc3d

Parameters:
  • options – the pointer to the options to set
  • solverId – the identifier of the solver

siconos.numerics.fc2d_sparse_nsgs(FrictionContactProblem *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)w, int *info, SolverOptions *options) → None[source]

siconos.numerics.fc2d_sparse_nsgs_setDefaultSolverOptions(SolverOptions *options) → int[source]

set the default solver parameters and perform memory allocation for NSGS

Parameters:options – the pointer to the options to set

siconos.numerics.fc2d_tolcp(FrictionContactProblem *problem, LinearComplementarityProblem *lcp_problem) → int[source]

This function transform a FrictionContactProblem (2D) into a LinearComplementarityProblem.

Parameters:
  • problem – A pointer to a FrictionContactProblem to transform
  • lcp_problem – A pointer to a LinearComplementarity_problem resulting from the reformulation