Examples

ex21f90.F90:
ex16.c: Demonstrates VecStrideScatter() and VecStrideGather() with subvectors that are also strided.
ex43.c:
ex16f.F90:
ex21.c:
ex6.c: Writes an array to a file, then reads an array from a file, then forms a vector.
ex1f90.F90:
ex6f.F90:
ex7.c: Demonstrates calling a Fortran computational routine from C.
ex9f.F90:
ex19.c: Parallel HDF5 Vec Viewing.
ex1f.F90:
ex13.c: Demonstrates VecStrideSum().
ex4f.F90:
ex11f.F90:
ex5.c: Tests binary I/O of vectors and illustrates the use of user-defined event logging.
performance.c: Time vector operations on GPU
ex3.c: Parallel vector layout.
ex42a.c: Sends a PETSc vector to a socket connection, receives it back, within a loop. Must be run with ex42.c.
ex2.c: Builds a parallel vector with 1 component on the first processor, 2 on the second, etc.
ex7f.F90:
ex4f90.F90:
ex3f.F90:
ex42.c: Reads a PETSc vector from a socket connection, then sends it back within a loop 1000 times. Works with ex42.m or ex42a.c
ex10.c: Tests I/O of vectors for different data formats (binary,HDF5) and illustrates the use of user-defined event logging
ex11f90.F90:
ex12.c: Demonstrates VecStrideScatter() and VecStrideGather().
ex43f.F90:
ex8f.F90:
ex1.c: Basic vector routines.
ex14f.F90:
ex20f90.F90:
ex12f.F90:
ex11.c: Demonstrates VecStrideNorm().
ex8.c: Demonstrates using a local ordering to set values into a parallel vector.
ex2f.F90:
ex18.c: Computes the integral of 2*x/(1+x^2) from x=0..1
ex9.c: Demonstrates use of VecCreateGhost().
ex5f.F90:
ex31.c: Demonstrates PetscMatlabEngineXXX()
ex15.c: Tests Mathematica I/O of vectors and illustrates the use of user-defined event logging.
ex44.c: Test VecConcatenate both in serial and parallel.
ex18f.F90: