[petsc-dev] ibcgs
Barry Smith
bsmith at mcs.anl.gov
Wed Oct 20 10:26:09 CDT 2010
I've updated the comment in the code
The code below "cheats" from PETSc style
1) VecRestoreArray() is called immediately after VecGetArray() and the array values are still accessed; the reason for the immediate
restore is that Vec operations are done on some of the vectors during the solve and if we did not restore immediately it would
generate two VecGetArray() (the second one inside the Vec operation) calls without a restore between them.
On Oct 20, 2010, at 10:03 AM, Matthew Knepley wrote:
> What is the reason for the fakery with VecGet/RestoreArray()? If there is no chance of
> overwriting, why restore immediately? If there is, why doesn't it happen?
>
> Matt
>
> --
> 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