On Sat, Nov 12, 2011 at 5:50 PM, behzad baghapour < behzad.baghapour at gmail.com> wrote:
> So, I am solving the Euler equations (inviscid compressible flow) using > discontinuous Galerkin method: > > M (dQ/dt) = R, > > R = nonlinear residual, > M = mass matrix, > > Implicit procedure: > F = M*(Q^(n+1)-Q^n)/DT - R, > dF/dQ=J=M/DT-dR/dQ, > Newton => Q^(n+1) = Q^n - (dF/dQ)^(-1) F ( with proper preconditioning ) > > 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.So my > residual and Derivative of residual routines are developed based on the > element (and face) objects. Then it is better for me to keep them when > using petsc as a nonlinear solver. > Pass your mesh data structure in using the ctx argument for your residual and Jacobian evaluation routines. Matt > Hope these make any help. > Thanks, > Behzad > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111112/e33b3806/attachment.htm>
