[petsc-dev] PetscObjectStateIncrease in MatMult*
Barry Smith
bsmith at mcs.anl.gov
Sat Oct 17 10:58:39 CDT 2015
> On Oct 17, 2015, at 5:10 AM, Václav Hapla <vaclav.hapla at vsb.cz> wrote:
>
> Hello,
> MatMult(), MatMultTranspose(), MatMultAdd(), MatMultTransposeAdd() and PCApply() belong to most common modifiers of Vec values.
> Maybe it would be nice if these routines called PetscObjectStateIncrease explicitly because of MATSHELL and such stuff.
> Thanks,
> Vaclav
I assume you are suggesting this because users of MATSHELL or PCSHELL may not realize they need to call PetscObjectStateIncrease() on the output vector if they do not use VecGe/RestoretArray() to access the vector entries? (VecRestoreArray() automatically increases the state)
What if we add it to MatMult_Shell(), MatMultTranspose_Shell(), PCApply_Shell() and PCApplyTranspose_Shell()? It looks like those are the only ones where the state won't get increased automatically
Thanks for the suggestion,
Barry
>
> --
>
> Vaclav Hapla
> Junior researcher
> IT4Innovations <http://www.it4i.eu/>
>
>
More information about the petsc-dev
mailing list