[petsc-dev] Reduction in KSPGetVecs via DMCreateGlobalVector
Barry Smith
bsmith at mcs.anl.gov
Wed Mar 26 12:45:50 CDT 2014
On Mar 26, 2014, at 8:05 AM, Jed Brown <jed at jedbrown.org> wrote:
> Barry Smith <bsmith at mcs.anl.gov> writes:
>
>> At one point DMCreateGlobalVector_DA() did a duplicate of a “base” global vector, then in theory it could share the layout but that is all different now.
>>
>> Note that the basic VecDuplicate_MPI() does share the previous layout but then there is a VecDuplicate_MPI_DA() which does not share the layout.
>
> Should DM just reference the PetscLayout the first time it creates a
> Vec, then use it for all subsequent Vecs (VecSetLayout instead of
> VecSetSizes)?
This may be a good way to fix it.
Barry
More information about the petsc-dev
mailing list