xref: /petsc/src/mat/tests/ex164.c (revision ffa8c5705e8ab2cf85ee1d14dbe507a6e2eb5283)
1 
2 static char help[] = "Tests MatConvert() from SeqDense to SeqAIJ \n\n";
3 
4 #include <petscmat.h>
5 
6 int main(int argc,char **args)
7 {
8   Mat            A,C;
9   PetscInt       n = 10;
10 
11   PetscCall(PetscInitialize(&argc,&args,(char*)0,help));
12   PetscCall(MatCreateSeqDense(PETSC_COMM_WORLD,n,n,NULL,&A));
13   PetscCall(MatConvert(A,MATSEQDENSE,MAT_INITIAL_MATRIX,&C));
14   PetscCall(MatView(C,NULL));
15   PetscCall(MatDestroy(&A));
16   PetscCall(MatDestroy(&C));
17   PetscCall(PetscFinalize());
18   return 0;
19 }
20 
21 /*TEST
22 
23    test:
24 
25 TEST*/
26