[petsc-users] Accessing Global Vector Data with

Daniel Mckinnell d_mckinnell at aol.co.uk
Thu Aug 15 09:59:28 CDT 2019


Hi,Attached is a way I came up with to access data in a global vector, is this the best way to do this or are there other ways? It would seem intuitive to use the global PetscSection and VecGetValuesSection but this doesn't seem to work on global vectors.
Instead I have used VecGetValues and VecSetValues, however I also have a problem with these when extracting more than one value, I initialise the output of VecGetValues as PetscScalar *values; and then call VecGetValues(Other stuff... , values). This seems to work some times and not others and I can't find any rhyme or reason to it?

Finally I was wondering if there is a good reference code base on Github including DMPlex that would be helpful in viewing applications of the DMPlex functions?Thanks,Daniel Mckinnell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190815/bab01942/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: for_petsc_forum.cpp
Type: text/x-c++src
Size: 2772 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190815/bab01942/attachment.bin>


More information about the petsc-users mailing list