Actual source code: ex14.c
2: static char help[] = "Substructuring test of MatFwkAIJ: \
3: a block matrix with an AIJ-like datastructure keeping track of nonzero blocks.\
4: Each block is a matrix of (generally) any type.\n\n";
6: /*
7: Include "petscmat.h" so that we can use matrices.
8: automatically includes:
9: petscsys.h - base PETSc routines petscvec.h - vectors
10: petscmat.h - matrices
11: petscis.h - index sets petscviewer.h - viewers
12: */
13: #include <petscmat.h>
18: PetscErrorCode TestMatIM() {
19: /*
20: o------o-------o-------o------o
21: v0| v3| v6||| v9| v9|
22: | e0 | e2 ||| e4 | e4 |
23: | | ||| | |
24: o------o-------o-------o------o
25: v1| v4| v7||| v10| v10|
26: | e1 | e3 ||| e5 | e5 |
27: | | ||| | |
28: ------ ------- ------- ------
29: o------o-------o-------o------o
30: v2 ----v5 ----v6- -----v7 ----v8
31: | | ||| | |
32: | e0 | e2 ||| e4 | e4 |
33: | | ||| | |
34: o------o-------o-------o------o
35: v1| v4| v7||| v10| v10|
36: | e1 | e3 ||| e5 | e5 |
37: | | ||| | |
38: o------o-------o-------o------o
40: */
41: Mat M; /* Index Map (IM) matrix */
46: return(0);
48: }/* TestMatIM() */
53: int main(int argc,char **args) {
55: PetscInitialize(&argc,&args,(char *)0,help);
57: TestMatFwk1();
59: PetscFinalize();
60: return 0;
61: }