Matrices
See the matrices manual pages as well as the detailed discussion of the matrices in the PETSc users manual for details.
${PETSC_DIR}/src/ksp/examples/tutorials/ex3.c
Objective: Demonstrate different ways of getting information about matrices
Runtime commands:
% mpiexec -np 1 ex3 -mat_view_info
% mpiexec -np 2 ex3 -mat_view_info_detailed
% mpiexec -np 2 ex3 -mat_view
and
% mpiexec -np 2 ex3 -mat_view_draw -draw_pause -1
where
-mat_view : print matrix elements to screen
-mat_view_draw : draw the matrix sparsity structure
Comments:
Note that this matrix assembly is done by 4x4 blocks,
with each process contributing its own local parts; see
calls to MatSetValues().
In this example, you may need to move one of the windows that
pops up aside so that you can right-click the one underneath
to continue the program's execution.