petsc-3.7.1 2016-05-15
Report Typos and Errors

VecSetOperation

Allows user to set a vector operation.

Synopsis

#include "petscvec.h"   
PetscErrorCode VecSetOperation(Vec vec,VecOperation op, void (*f)(void))
Logically Collective on Vec Many br

Input Parameters

vec - the vector Many br
op - the name of the operation Many br
f - the function that provides the operation. Many br

Many br

Usage

     PetscErrorCode userview(Vec,PetscViewer);
     ierr = VecCreateMPI(comm,m,M,&x);
     ierr = VecSetOperation(x,VECOP_VIEW,(void(*)(void))userview);

Notes

See the file include/petscvec.h for a complete list of matrix Many broperations, which all have the form VECOP_<OPERATION>, where Many br<OPERATION> is the name (in all capital letters) of the Many bruser interface routine (e.g., VecView() -> VECOP_VIEW). Many br

This function is not currently available from Fortran. Many br

Keywords

vector, set, operation

See Also

VecCreate(), MatShellSetOperation()

Level:advanced
Location:
src/vec/vec/interface/vector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages