PETSc jacobian

Jianing Shi jianings at gmail.com
Tue Mar 6 14:04:39 CST 2007


Hi PETSc designers,

I have a non-trivial extension to a diffusion problem, that involves
talking between neighboring (neighboring band) points.  I have a
question about the data structures in PETSc, since I am fantasized
about elegant designs.

I have two options: 1) use structured grid (DA)   2) in some
applications, my grid can be unstructured, in fact a directed graph.
I am considering the first option now (since I still need to read up
onto the PETSc mesh/graph).

Suppose I need to represent the connectivity of a point to its
neighboring points, I need a weight matrix.  I guess I can
(A) use a DA structure, setting DOF = total number of points connected
to a point (assuming the connectivity range for each point is the
same).
or
(B) use a Jacobian matrix data structure to store these weights.  In
this case, I guess I will use MATMPIAIJ or MATMPIBAIJ.

- What is the difference between these two types of Jacobian matrix?
- For distributed sparse matrix like MATMPIAIJ, MATMPIBAIJ, how
efficient is it to extract one column of the matrix M(i,:) ?  Does
PETSc have routines to do this?
- How is such a distributed sparse matrix stored on different
processors, how is it divided up, and collected?

I want to understand this, because if a distributed sparse matrix is
an efficient representation of my sparse weight matrix, I will go for
this option (B).  Otherwise, I will opt for option (A).

Thanks!

Jianing




More information about the petsc-users mailing list