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

Frederik Treue frtr at fysik.dtu.dk
Fri Jun 1 13:21:38 CDT 2012


On 2012-06-01 16:52, Jed Brown wrote:
> On Fri, Jun 1, 2012 at 9:47 AM, Frederik Treue <frtr at risoe.dtu.dk 
> <mailto: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.
nevermind, it turned out to be a trivial error on my part.

/Frederik Treue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120601/9e467e9f/attachment.html>


More information about the petsc-users mailing list