MatZeroColsIS question.

Matthew Knepley knepley at gmail.com
Tue Sep 4 09:34:34 CDT 2007


However, there is a very simple scheme, which I use. PETSc can ignore
negative indices. I map all degrees of freedom associated to BC to
negative indices when using PETSc Mat and Vec objects.

  Matt

On 9/4/07, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> 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
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener




More information about the petsc-users mailing list