[petsc-users] How to use external vectors in a KSPmonitor

Jed Brown jedbrown at mcs.anl.gov
Fri Jun 1 09:52:38 CDT 2012


On Fri, Jun 1, 2012 at 9:47 AM, Frederik Treue <frtr at risoe.dtu.dk> wrote:

> I need to access a vector from outside the ksp context in my own,
> user-defined KSPmonitor. I have tried using the "context" input variable in
> the KSPMonitor function to pass a pointer to the relevant structure, but I
> get segmentation faults: Can this "context" variable be used for this, and
> if no, how does one do?


This is what the context is for. Send the complete output from the SEGV and
any relevant snippets of code showing how you use it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120601/fe678e1d/attachment.html>


More information about the petsc-users mailing list