On Mon, Jul 04, 2011 at 04:39:04PM +0100, Garth N. Wells wrote: > I'm not sold on the NonlinearVariationalProblem interface. I would > prefer a constructor takes the Jacobian as an argument. It's much > cleaner to do things at construction and removes the need to later > attach the Jacobian.
The point is that one should be able to define a nonlinear problem with or without a Jacobian. Not all nonlinear solvers need a Jacobian. I agree that it's in general cleaner to require as much data as possible at the time of construction, but think that the handling of the Jacobian data is quite clean: it's a shared pointer that may be null and the nonlinear solver can call has_jacobian to check whether it has been specified. -- Anders _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

