File numerics/src/VI/VariationalInequality.h

Go to the source code of this file

Definition of a structure to handle Variational Inequalities (VI).

Typedefs

typedef void*() FVIPtr(void *, double *, double *)
typedef void (*ptrFunctionVI)(void *self, int n, double *x, double *fx)
typedef void (*ptrFunctionVI_nabla)(void *self, int n, double *x, NumericsMatrix *nabla_F)

Functions

void freeVariationalInequalityProblem(VariationalInequality *vi)

free a VariationalInequalityProblem

Parameters
  • vi: the problem to free

VariationalInequality *newVI(void)

new VariationalInequality problem

Return
an empty VI

void variationalInequality_clear(VariationalInequality *vi)

Clear VariationalInequality structure: set all pointeurs to NULL, double and int to 0.

Parameters
  • vi: the problem to clear

void variationalInequality_display(VariationalInequality *vi)

display a VariationalInequalityProblem

Parameters
  • vi: the problem to display

VariationalInequality *variationalInequality_new(int size)

new VariationalInequality problem

Return
a initialized VariationalInequality struct
Parameters
  • size: size of the ambient space for the VI

int variationalInequality_newFromFile(VariationalInequality *vi, FILE *file)

read a VariationalInequalityProblem in a file (numerics .dat format)

Return
ok if successfull
Parameters
  • vi: the problem to read
  • file: the target file

int variationalInequality_printInFile(VariationalInequality *vi, FILE *file)

print a VariationalInequalityProblem in a file (numerics .dat format)

Return
ok if successfull
Parameters
  • vi: the problem to print out
  • file: the dest file

static void *VI_get_env(void *vi)

get the environment from the struct

Return
the environment from the struct
Parameters
  • vi: a VariationalInequality problem

struct VariationalInequality

Public Members

ptrFunctionVI_nabla compute_nabla_F

Function to compute the jacobian of F.

void *env

pointer onto env object (which is self is the simplest case)

ptrFunctionVI F

Function of the VI.

int istheNormVIset

Boolean to know if the norm is set If not (istheNormVIset=0) it will be computed in the first call of variationalInequality_computeError By default, set istheNormVIset =0.

NumericsMatrix *nabla_F

storage for \(\nabla_x F\)

double normVI

Norm of the VI problem to compute relative solution.

void (*ProjectionOnX)(void *self, double *x, double *PX)

Projection on X of the VI.

void *set

opaque struct that represent the set K (possibly empty)

int size

size of the VI \( n \)