nonzeros of a matrix

Satish Balay balay at mcs.anl.gov
Fri Aug 11 11:24:38 CDT 2006


There is a MatGetInfo() - which returns MatInfo object.  You might be
able to do PCGetFactoredMatrix() to get the factor and call
MatGetInfo() on it as well..

With bjacobi - you can call PCBJacobiGetSubKSP() to get all the solver
objects for each sub-block [and extract subpcs, and corresponding
factors etc..]

Satish


On Fri, 11 Aug 2006, Margot Summer wrote:

> Thanks. But can we find out this info inside the code (like the way we get the number of iterations of ksp)?  Also, for many subpc's, e.g. using bjacobi, -ksp_view does not print out every block.  
> 
> Margot
>  
> Satish Balay <balay at mcs.anl.gov> wrote: You can run the code with -mat_view_info [to get the matrix info] and
> -ksp_view - to get the info about the solvers [which include some
> details about the ilu preconditioner]
> 
> Satish
> 
> On Fri, 11 Aug 2006, Margot Summer wrote:
> 
> > Hi,
> > 
> > Is there a simple way to get the number of nonzeros of
> > a matrix? Further, how to find out the information
> > about a matrix object in KSP/PC, e.g., the number of
> > nonzeros of the preconditioner, or the number of
> > nonzeros of the ilu(icc) factor? Thanks,
> > 
> > Margot 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around 
> > http://mail.yahoo.com 
> > 
> > 
> 
> 
> 
>  		
> ---------------------------------
> Stay in the know. Pulse on the new Yahoo.com.  Check it out. 




More information about the petsc-users mailing list