On Sat, Nov 12, 2011 at 11:50, behzad baghapour <behzad.baghapour at gmail.com>wrote:
> The nonlinear residual and Jacobian matrix are evaluated with a face-based > method. Two integrals are involved (the effect of element internal > connections and face flux connections). All of my calculations of flow > states are solved and stored in arrays of objects called elements. Are you talking about intermediate quantities like Roe averages on face quadrature points? The state X at which the residual is evaluated is different each time, so you would be using old values if you stashed them. The residual might be evaluated multiple times before a Jacobian is requested. Normally the residual is much less expensive than the Jacobian, so it's not worth stashing the intermediate quantities. See also this FAQ: http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#functionjacobian -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111112/641557d5/attachment.htm>
