[petsc-dev] coding style

Munson, Todd tmunson at mcs.anl.gov
Thu Aug 18 13:02:50 CDT 2016


> 
> 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.

The quadratic programming solvers in our case will happily go and tell
you it solved the problem...however, the problem it solved uses

  c = grad[g(0)]
  H = hess[g(0)]

I'd be happier if the solver barfed and told the user to select a method 
appropriate for their real problem -- it it truly is nonlinear -- rather 
than going off and solving the wrong problem, which is what is done 
today.

Todd.




More information about the petsc-dev mailing list