SNESVIComputeMeritFunction — PETSc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# SNESVIComputeMeritFunction

Evaluates the merit function for the mixed complementarity problem.

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESVIComputeMeritFunction(Vec phi, PetscReal *merit, PetscReal *phinorm)

## Input Parameter

- phi - the `Vec` holding the evaluation of the semismooth function

## Output Parameters

- merit - the merit function 1/2 ||phi||^2

- phinorm - the two-norm of the vector, ||phi||

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESVINEWTONSSLS`, `SNESVIComputeFunction()`

## Level

developer

## Location

src/snes/impls/vi/ss/viss.c

Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages