From: Benjamin Kirk <benjamin.kirk@na...>  20080822 20:09:41

Should the trilinos list get queried? Is that a bug?? > What do you think Ben? Shouldn't be too hard right? After a bit of looking > around it appears that the dof_map can generate the full sparsity pattern > which shouldn't be too hard to translate into the CrsGraph that Epetra wants. Right. You need to overload the SparseMatrix::need_full_sparsity_pattern() to return true, and then implement the SparseMatrix::update_sparsity_pattern() member (like is done in the LaspackMatrix). The idea is as follows... (1) The DofMap constructs the graph of the sparse matrix when assigning the degrees of freedom, but it does not need to keep this around (2) for formats like petsc, the graph is not needed, only an accurate (or bounding) count on the number of nonzeros per row. (3) this thing is about the size of the local matrix, so once it is constructed and no longer needed it can be thrown away. However, before throwing it away, the DofMap gives the SparseMatrix'es the option to use it. In any case, see what you can do with it. It is really simple, the SparsityPattern::Graph is simply a vectorofvectors, with sparsity_pattern.size() = n_local_rows sparsity_pattern[row].size() = # of nonzeros on 'row' sparsity_pattern[row][i] = col (where row,col is the global matrix index for the ith nonzero entry on this row.) Ben 