[petsc-users] Solving with SNES

behzad baghapour behzad.baghapour at gmail.com
Sat Nov 12 10:20:00 CST 2011


The state of my problem is set and saved in elements and faces. So I should
pass and update them for residual and Jacobian calculations in each Newton
step. It is better for me to use them since the element and face
connectivities required in residual and jacobian matrix are saved there.
How would be my best choice then???


On Sat, Nov 12, 2011 at 6:04 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Sat, Nov 12, 2011 at 02:08, behzad baghapour <
> behzad.baghapour at gmail.com> wrote:
>
>> I should pass a user-defined context, containing element and face local
>> data obtained from PDE solution, to RHS and Jacobian evaluation of SNES
>> process. Here I need to update my context each Newton Iteration. I may pass
>> my context into a monitor function set by SNESMonitorSet. In the monitor
>> function, I cast into my context and update my field (elements and faces)
>> for next evaluations in RHS and Jacobian routines in Newton process.
>
>
> Are you updating external forcing information? The state vector is passed
> in to the residual and Jacobian routines, you should just use it.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111112/b90ed394/attachment.htm>


More information about the petsc-users mailing list