[petsc-users] How to find a good initial guess for a BVP

Jed Brown jed at 59a2.org
Mon Feb 1 16:26:45 CST 2010


On Mon, 1 Feb 2010 17:14:36 -0500, Ryan Yan <vyan2000 at gmail.com> wrote:
> Hi all,
> I just realized that I do need to work with the implicit form of the  DAE.
> For instance, if I need to add a following tendency term "rho(x)*x' ":
> 
> rho* x' = - f(t,x))
> 
> My question is:
> 
> > In order to solve the above system by dmmg, is it suffice to multiply the
> line p380-384 in snes/examples/tutorials/ex27.c, namely, multiply a "rho(x)"
> term to each of the right hand side of the line  p380-384? Or is there
> invisible barrier that I should beware of.

That looks right.  If you are assembling a Jacobian, remember to
differentiate this term with respect to BOTH x and x'.

Jed


More information about the petsc-users mailing list