changing MatSetUp()

Matthew Knepley knepley at
Tue Oct 23 15:13:01 CDT 2007

I am not sure about this. MatSetFromOptions() is intentionally optional,
and should not be bundled in a method not intended to be optional.


On 10/23/07, Lisandro Dalcin <dalcinl at> wrote:
> After greping, it seems that MatSetUp() is not used in all 'petsc-dev'
> repo. If there is no objections (Barry?), I will change it (by
> reverting inner calls order) to do the following:
> PetscErrorCode MatSetUp(Mat A)
> {
>   MatSetFromOptions(A);
>   MatSetUpPreallocation(A);
> }
> As I mailed some time ago, there is no point of calling
> MatSetUpPreallocation() if the matrix type was not set.
> --
> 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-dev mailing list