petsc-3.9.4 2018-09-11
Report Typos and Errors

VecBoundGradientProjection

Projects vector according to this definition. If XL[i] < X[i] < XU[i], then GP[i] = G[i]; If X[i] <= XL[i], then GP[i] = min(G[i],0); If X[i] >= XU[i], then GP[i] = max(G[i],0);

Synopsis

#include "petscvec.h"  
PetscErrorCode VecBoundGradientProjection(Vec G, Vec X, Vec XL, Vec XU, Vec GP)

Input Parameters

G - current gradient vector
X - current solution vector with XL[i] <= X[i] <= XU[i]
XL - lower bounds
XU - upper bounds

Output Parameter

GP -gradient projection vector

Notes: GP may be the same vector as G

Level

advanced

Location

src/vec/vec/utils/projection.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages