dropping columns/rows from matrix?

Peter Schröder ps at cs.caltech.edu
Fri Nov 23 20:13:20 CST 2007


Barry Smith wrote:
>    We use MatGetSubMatrix() to do this. Rather than dropping/adding 
> rows and columns just grab the
> part you want and use it then destroy it and grab another part you 
> want. We've done this with active set
> methods and the time to do the MatGetSubMatrix() has been surprisingly 
> small percentage of the time.
Aaaah. Ok. Even if the submatrix is everyone but one column/row? Very well.

The one other way I had thought might be to fix one of the variables 
(some entry of the x vector is forced to zero) and ignore the 
corresponding part of the residual. But this may be too hacky an 
approach given the overall structure of Petsc.

I'll use MatGetSubMatrix() for now.

peter




More information about the petsc-users mailing list