File numerics/src/SOCP/soclcp_projection.h

Go to the source code of this file

Typedef and functions declarations related to projection solver for SOCLCP.

Each solver must have 4 functions in its interface:

  • initialize: link global static variables to the considered problem (M,q,…)
  • update: link/fill the local variables corresponding to sub-blocks of the full problem, for a specific contact
  • solve: solve the local problem
  • free We consider a “global” (ie for several contacts) problem, used to initialize the static global variables. Then a “local” (ie for one contact => size = 3) problem is built (update function) and solved (solve function).

Two different storages are available for M: dense and sparse block.

Functions

void soclcp_projection_free(SecondOrderConeLinearComplementarityProblem *problem, SecondOrderConeLinearComplementarityProblem *localproblem, SolverOptions *localsolver_options)

free memory for friction contact 3D projection solver

Parameters
  • problem: : the problem to free
  • localproblem: : the problem to free
  • localsolver_options:

void soclcp_projection_initialize(SecondOrderConeLinearComplementarityProblem *problem, SecondOrderConeLinearComplementarityProblem *localproblem, SolverOptions *options)

Initialize SOCLCP projection.

Parameters
  • problem: : the global problem to solve
  • localproblem: : the local problem to initialize
  • options:

void soclcp_projection_initialize_with_regularization(SecondOrderConeLinearComplementarityProblem *problem, SecondOrderConeLinearComplementarityProblem *localproblem)

Initialize SOCLCP projection with regularization.

Parameters
  • problem: : the global problem to solve
  • localproblem: : the local problem to initialize

int soclcp_projection_setDefaultSolverOptions(SolverOptions *options)
void soclcp_projection_update(int number, SecondOrderConeLinearComplementarityProblem *problem, SecondOrderConeLinearComplementarityProblem *localproblem, double *r, SolverOptions *options)

Update SOCLCP Projection solver: formalize local problem for one contact.

Parameters
  • number: (position in global matrix) of the considered contact
  • problem: : the global problem to solve
  • localproblem: : the local problem to initialize
  • r: (only the block corresponding to the current contact will be modified, the rest is used to formalize the local problem)
  • options:

void soclcp_projection_update_with_regularization(int number, SecondOrderConeLinearComplementarityProblem *problem, SecondOrderConeLinearComplementarityProblem *localproblem, double *r, SolverOptions *options)

Update SOCLCP projection solver: formalize local problem for one contact.

Parameters
  • number: (position in global matrix) of the considered contact
  • problem: : the global problem to solve
  • localproblem: : the local problem to initialize
  • r: (only the block corresponding to the current contact will be modified, the rest is used to formalize the local problem)
  • options:

void soclcp_projection_with_regularization_free(SecondOrderConeLinearComplementarityProblem *problem, SecondOrderConeLinearComplementarityProblem *localproblem, SolverOptions *localsolver_options)

free memory for friction contact 3D projection solver

Parameters
  • problem: : the problem to free
  • localproblem: : the problem to free
  • localsolver_options:

int soclcp_projectionOnCone_solve(SecondOrderConeLinearComplementarityProblem *localproblem, double *r, SolverOptions *options)

solve SOCLCP problem with projection on the Cone

Return
0 if successfull
Parameters
  • localproblem: : the local problem to initialize
  • r:
  • options:

int soclcp_projectionOnCone_v_solve(SecondOrderConeLinearComplementarityProblem *localproblem, double *r, SolverOptions *options)

solve SOCLCP problem with projection on the Cone

Return
0 if successfull
Parameters
  • localproblem: : the local problem to initialize
  • r:
  • options:

void soclcp_projectionOnConeWithLocalIteration_free(SecondOrderConeLinearComplementarityProblem *problem, SecondOrderConeLinearComplementarityProblem *localproblem, SolverOptions *localsolver_options)
void soclcp_projectionOnConeWithLocalIteration_initialize(SecondOrderConeLinearComplementarityProblem *problem, SecondOrderConeLinearComplementarityProblem *localproblem, SolverOptions *localsolver_options)
int soclcp_projectionOnConeWithLocalIteration_solve(SecondOrderConeLinearComplementarityProblem *localproblem, double *r, SolverOptions *options)

solve SOCLCP problem with projection on the Cone with local iteration up to convergence of the local problem

Return
0 if successfull
Parameters
  • localproblem: : the local problem to initialize
  • r:
  • options:

int soclcp_projectionOnCylinder_solve(SecondOrderConeLinearComplementarityProblem *localproblem, double *r, SolverOptions *options)

solve SOCLCP problem with projection on the (Tresca Cylinder)

Return
0 if successfull
Parameters
  • localproblem: : the local problem to initialize
  • r:
  • options: