[petsc-users] Matrix Sparsity

domenico.borzacchiello at univ-st-etienne.fr domenico.borzacchiello at univ-st-etienne.fr
Wed Apr 13 04:08:25 CDT 2011


Hi,
I'm using the DMMG interface for my code so I'm not directly calling the
matrix assembly routines.

I tried to retrieve the matrices through the commands

+
.  DMMGGetSNES(dmmg);
.  SNESGetKSP(snes,&ksp);
.  KSPGetOperators(ksp,&Amat,&Pmat,&flag);
+

,saved them (in Matlab format) and I noticed that a large number of zeros
entries were also saved.

If I run with -info i get

[0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 500

How can I make sure that the correct sparsity patter is formed while still
using the DMMG interface? The same thing happens either if I use the FD
approximation of the jacobian or a specific FormJacobianFunction routine.

Thank you,
Domenico.



More information about the petsc-users mailing list