[petsc-dev] coding style

Jed Brown jed at jedbrown.org
Thu Aug 18 12:46:13 CDT 2016


"Munson, Todd" <tmunson at mcs.anl.gov> writes:

> If the user supplied only a g(x) to a solver meant for 
> quadratic problems, we would call grad[g(0)] [thanks 
> Matt!] to get the linear term and hess[g(0)] to get 
> the Hessian matrix.  So that is possible as well.

Okay.

> Maybe we should just keep things as they exist now
> and not add extra complications.
>
> I do still worry about a user providing a truly nonlinear
> g(x) to a solver meant for quadratic programs.  I could 
> test to see if the Hessian is constant  if I really
> wanted to though.

People are free to use MatShell to create a "matrix" that is actually a
nonlinear operator.  Solvers won't work properly if it's not, but that's
their problem.

That said, we do have people make mistakes in classifying their ODEs.  I
think the most common is forgetting that strongly enforcing Dirichlet
BCs typically leads to a DAE.  I don't know a clean fix for that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160818/347529a9/attachment.sig>


More information about the petsc-dev mailing list