Actual source code: ex164.c
petsc-3.13.6 2020-09-29
2: static char help[] = "Tests MatConvert() from SeqDense to SeqAIJ \n\n";
4: #include <petscmat.h>
6: int main(int argc,char **args)
7: {
8: Mat A,C;
10: PetscInt n = 10;
12: PetscInitialize(&argc,&args,(char*)0,help);if (ierr) return ierr;
13: MatCreateSeqDense(PETSC_COMM_WORLD,n,n,NULL,&A);
14: MatConvert(A,MATSEQDENSE,MAT_INITIAL_MATRIX,&C);
15: MatView(C,NULL);
16: MatDestroy(&A);
17: MatDestroy(&C);
18: PetscFinalize();
19: return ierr;
20: }
23: /*TEST
25: test:
27: TEST*/