On Fri, Jul 01, 2011 at 11:07:15AM +0200, Martin Sandve Alnæs wrote: > On 1 July 2011 09:05, Anders Logg <l...@simula.no> wrote: > > They are always generated as it is now, but I assume it would be > > simple to make it so that they are only generated if they are used. > > > > I'm not sure there's a big chance they will be misunderstood. Users > > will not know that the classes ResidualForm and JacobianForm are > > defined if they don't read through the generated code. Users will only > > know about them if they look at a nonlinear example and then it will > > be clear how they should be used. > > Users rarely follow the train of thought they're supposed to :) > > I don't have a strong opinion either, do as you like.
ok. :-) -- Anders > Martin > > > But I don't have a firm opinion on this other than it's a natural > > thing to have so that one can work with F and J for nonlinear problems > > instead of a and L. > > > > > > > > On Fri, Jul 01, 2011 at 08:31:13AM +0200, Martin Sandve Alnæs wrote: > >> Are the typedefs only generated if the forms are named F and J? My worry is > >> that it could easily be misunderstood and misused. > >> Martin > >> Den 30. juni 2011 21.50 skrev "Anders Logg" <l...@simula.no> > >> følgende: > >> > On Thu, Jun 30, 2011 at 06:35:19PM +0200, Anders Logg wrote: > >> >> Could we add the additional form names "F" and "J" > >> >> to > >> UFL to be used > >> >> for nonlinear problems? These would then be mapped (typedeffed) to > >> >> "ResidualForm" and "JacobianForm" by the DOLFIN C++ > >> wrappers. > >> >> > >> >> Then one can use F and J in the .ufl file and then initialize the > >> >> forms in C++ by > >> >> > >> >> NonlinearPoisson::ResidualForm F(V); > >> >> NonlinearPoisson::JacobianForm J(V, V); > >> >> > >> >> instead of using L and a and then initializing by > >> >> > >> >> NonlinearPoisson::LinearForm F(V); > >> >> NonlinearPoisson::BilinearForm J(V, V); > >> >> > >> >> Any objections? > >> > > >> > I didn't hear any objections and it sounded like a good idea so I have > >> > added this now (will merge into main when the buildbot is green). > >> > > >> > In short, I've made a small change to UFL to allow 'F' and 'J' to be > >> > used in form files and a small change in the DOLFIN wrapper code > >> > generators to generate typedef aliases: > >> > > >> > BilinearForm = JacobianForm > >> > LinearForm = ResidualForm > >> > > >> > So nothing should break for old code. One can still use BilinearForm > >> > and LinearForm for nonlinear problems, but no in addition the more > >> > logical ResidualForm and JacobianForm. > >> > > >> > > >> > _______________________________________________ > >> > Mailing list: https://launchpad.net/~dolfin > >> > Post to : dolfin@lists.launchpad.net > >> > Unsubscribe : https://launchpad.net/~dolfin > >> > More help : https://help.launchpad.net/ListHelp > > _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp