Martin Sandve Alnæs wrote: > 2008/10/30 Johan Hake <[EMAIL PROTECTED]>: >> On Thursday 30 October 2008 19:20:06 Anders Logg wrote: >>> Most things are now in place, finally. At least we can run the Poisson >>> demo again... :-) >>> >>> Anyway, take a look at demo/pde/poisson/main.cpp and see what you >>> think. I think it looks pretty good, but please report if you have any >>> ideas for further improvements of the interface while we're at it. >> It looks nice, but I see some magic which I wish you can shed some light on. >> >> The introduction of PoissionFunctionSpace is not clear for me. Why do we have >> to instantiate the forms with it? > > Such that the Forms can use the same FunctionSpaces as are used in the > rest of the code, while the user stays in control of their allocation. > In particular, DofMaps needs to be shared between different parts of the code. > >> In the form file the two forms L and a are defined. These are then reflected >> in the main.cpp file as before. This is intuitive. But where does the >> PoissonFunctionSpace come from? I as a user has not defined it in the form >> file. >> >> It might help if we introduce the notion of FunctionSpace in FFC/UFL. Then >> some of the magic would disapear I think. > > This could reinforce the problem with circular dependencies I mentioned > earlier. I don't see that anyone has adressed that issue. > >> The talk about a Function always knowing its Space was clear, you can always >> plot it, and so on. But then the introduction of the "magic" dedication of >> FunctionSpace broke that, and also made the actuall function of FunctionSpace >> more blurry. >> >> Intuitively I would prefer: >> >> ... >> PoissonFunctionSpace V(mesh); >> >> Source f(V); >> Flux g(V); >>
The problem here is that f and g may come from a space other than V. The difficulty for a user is that it's hard (and error prone) to create the FunctionSpaces and associate them with the right Functions. Garth >> PoissonBilinearForm a(); >> PoissonLinearForm L(); >> >> L.set_f(f); L.set_g(g); >> ... >> >> If this is not possible or if it is but we do not want it, please inform me. > > We would still need > > PoissonBilinearForm a(V,V); > PoissonLinearForm L(V); > > Which looks, I agree, a bit misleading since you cannot > pass any other function spaces to these forms. > >>> Any help with getting the remaining demos and the Python interface >>> working again appreciated. >> I could probably help with getting the python interface up and going, at >> least >> with the metaclass stuff discussed earlier. >> >> >> Johan > > > -- > Martin > _______________________________________________ > DOLFIN-dev mailing list > [email protected] > http://www.fenics.org/mailman/listinfo/dolfin-dev -- Dr Garth N Wells Department of Engineering University of Cambridge Trumpington Street Cambridge CB2 1PZ United Kingdom tel. +44 1223 3 32743 fax. +44 1223 3 32662 e-mail [EMAIL PROTECTED] _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
