On 9/4/07, Peter Schr?der <ps at cs.caltech.edu> wrote:
> Why not just construct the matrix without the corresponding columns and
> rows? That preserves the symmetry (as it should of course), gives you a
> smaller matrix, and you don't have the hassle with the zero columns.
The former is far simpler in some contexts, and the size (of the
matrix) is not an issue if the appropriate MatOption is set regarding
sucessive assemblies.
Anyway, you proposed solution, altough more difficult to implement in
practice for general cases, is actually the best; especially in the
context of iterative methods, as you iterate using shorter vectors.
I was discussing on petsc-dev about implementing a general object
PetscMapping. This would enable to set a general mapping on Vec's and
Mat's for using with {Vec|Mat}SetValues in order to 'filter and map'
indices, but this is a non-trivial feature that will require a fair
amount of time to implement.
--
Lisandro Dalc?n
---------------
Centro Internacional de M?todos Computacionales en Ingenier?a (CIMEC)
Instituto de Desarrollo Tecnol?gico para la Industria Qu?mica (INTEC)
Consejo Nacional de Investigaciones Cient?ficas y T?cnicas (CONICET)
PTLC - G?emes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594