/* Program usage: mpiexec ex1 [-help] [all PETSc options] */ static char help[] = "Demonstrates various vector routines.\n\n"; /*T Concepts: mathematical functions Processors: n T*/ /* Include "petscpf.h" so that we can use pf functions and "petscda.h" so we can use the PETSc distributed arrays */ #include "petscpf.h" #include "petscda.h" #undef __FUNCT__ #define __FUNCT__ "myfunction" PetscErrorCode myfunction(void *ctx,PetscInt n,PetscScalar *xy,PetscScalar *u) { PetscInt i; PetscFunctionBegin; for (i=0; i