[petsc-users] Sequential VecSetValues and VecAssembly
Stefano Zampini
stefano.zampini at gmail.com
Tue Nov 13 08:45:54 CST 2018
with sequential vectors (ie VECSEQ type), you don't need to call VecAssembly
The VecAssembly calls are designed to communicate any off-process value set
to the owner process (e.g with VECMPI) or to send the values to the GPU
(VECCUDA).
With VECSEQ, VecSetValues just writes the values you have specified into
the raw memory of the vector.
Anyway, it is good practice to add those calls, if in the future you would
like to try a different class (parallel or that uses GPU) for which the
VecAssembly call is needed.
Il giorno mar 13 nov 2018 alle ore 17:15 Timothée Nicolas via petsc-users <
petsc-users at mcs.anl.gov> ha scritto:
> Dear all,
>
> I realized our code has some calls to VecSetValues not followed by calls
> to VecAssemblyBegin/VecAssemblyEnd, and no errors are thrown, although the
> manual says they must be called. The corresponding vectors are sequential
> vectors created with VecCreateSeq. Is this normal behaviour? Do we still
> need to call VecAssemblyBegin/End in this case? And btw what does assembly
> exactly correspond to?
>
> Best regards
>
> Timothee
>
--
Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181113/c7908697/attachment.html>
More information about the petsc-users
mailing list