VecPointwiseSign#

Computes the component-wise sign y[i] = sign(x[i]).

Synopsis#

#include "petscvec.h"   
PetscErrorCode VecPointwiseSign(Vec y, Vec x, VecSignMode sign_type)

Logically Collective

Input Parameters#

  • x - the input vector

  • sign_type - VecSignMode indicating how the function should map zero values.

Output Parameter#

  • y - the sign vector of x

See Also#

Vectors and Parallel Data, Vec, VecSignMode

Level#

beginner

Location#

src/vec/vec/interface/vector.c


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