← Back to team overview

dolfin team mailing list archive

Re: VariationalProblem interface

 

On Tue, Jun 21, 2011 at 10:19:22AM +0200, Marie E. Rognes wrote:
>
>
> On 21. juni 2011, at 09:58, Anders Logg <logg@xxxxxxxxx> wrote:
>
> > Thanks for looking into this. So it looks like this will work out
> > fine. So are there any objections to changing the VariationalProblem
> > (which depends on the order of arguments) to the more explicit
> >
> >  LinearVariationalSolver
> >  NonlinearVariationalSolver
> >
> > *solver* classes (instead of problem classes so that it's consistent
> > with the way we treat la), and adding on top of this the free function
> > solve() as a shortcut:
> >
> >  solve(a == L, ...)
> >  solve(F == 0, ...)
> >
> > If not, I can get started on implementing this.
> >
>
> Very much in favor :)
>
> Where does u enter in the free functions?

Don't know yet. Suggestions are welcome. My suggestion would be to
follow what Mathematica and swiginac and always include it as the argument
following the equation. We would then have this:

  solve(a == L, u, bc)
  solve(F == 0, u, bc, J=J)

The drawback is we can't do

  u = solve(a == L)

but that's similar to how we handle linear systems where we do

  solve(A, x, b)

instead of

  x = solve(A, b)

--
Anders


Follow ups

References