File numerics/src/VI/VariationalInequality_computeError.h

Go to the source code of this file

functions related to error computation for friction-contact problems

Functions

int variationalInequality_compute_error_box(VariationalInequality * problem, double *restrict x, double *restrict F, double tolerance, double *restrict error)

Error computation for a box VI problem, that is \( \Pi_box(x-F(x)) - x\).

Return
0 if ok
Parameters
  • problem: the structure which defines the VI problem
  • x: vector
  • F: vector
  • tolerance: value for error computation
  • error: value

int variationalInequality_computeError(VariationalInequality *problem, double *z, double *w, double tolerance, SolverOptions *options, double *error)

Error computation for a VI problem.

This function requires dWork to point to at least 2*n double of allocated memory or it malloc this memory

Return
0 if ok
Parameters
  • problem: the structure which defines the VI problem
  • z: vector
  • w: vector
  • tolerance: value for error computation
  • options: solver options
  • error: value