Hi everyone,
<div><br></div><div>I&#39;m using SNES but I would like to update my data after each successful step computation within the nonlinear solver using a different function. I mean, after the solution of each linear system I would like to get \Delta x_k to update x_{k+1} which is stored somewhere in my application class (C++ code). Looking at the documentation I found this function:</div>
<div><span class="Apple-style-span" style="font-family:monospace;font-size:medium;white-space:pre"><br></span></div><div><span class="Apple-style-span" style="font-family:monospace;font-size:medium;white-space:pre">PetscErrorCode  SNESSetUpdate(SNES snes, PetscErrorCode (*func)(SNES, PetscInt))</span></div>
<div><span class="Apple-style-span" style="font-family:monospace;font-size:medium;white-space:pre"><br></span></div><div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space:pre;font-size:medium"><span class="Apple-style-span" style="font-family:arial;white-space:normal;font-size:small">but </span><span class="Apple-style-span" style="white-space:normal;font-size:small"><font class="Apple-style-span" face="&#39;times new roman&#39;, serif">func</font></span><span class="Apple-style-span" style="font-family:arial;white-space:normal;font-size:small"> does not take an application context &quot;object&quot; like</span><span class="Apple-style-span" style="white-space:normal;font-size:small"><font class="Apple-style-span" face="&#39;times new roman&#39;, serif"> void *ctx</font></span><span class="Apple-style-span" style="font-family:arial;white-space:normal;font-size:small">, that I could use to get my data and finally update it. Is there another function that would allow me to do this? </span></span></font></div>
<div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space:pre;font-size:medium"><span class="Apple-style-span" style="font-family:arial;white-space:normal;font-size:small"><br>
</span></span></font></div><div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space:pre;font-size:medium"><span class="Apple-style-span" style="font-family:arial;white-space:normal;font-size:small">Thanks in advance,</span></span></font></div>
<div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space:pre;font-size:medium"><span class="Apple-style-span" style="font-family:arial;white-space:normal;font-size:small">Best regards,</span></span></font></div>
<div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space:pre;font-size:medium"><span class="Apple-style-span" style="font-family:arial;white-space:normal;font-size:small">Bernardo M. Rocha</span></span></font></div>
<div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space:pre;font-size:medium"><span class="Apple-style-span" style="font-family:arial;white-space:normal;font-size:small"><br>
</span></span></font></div><div><span class="Apple-style-span" style="font-family:monospace;font-size:medium;white-space:pre"><br></span></div>