ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #01916
Re: [DOLFIN-dev] DOLFIN wrapper code
Quoting Anders Logg <logg@xxxxxxxxx>:
> On Wed, Nov 05, 2008 at 03:17:13PM +0000, Garth N. Wells wrote:
> > In the FFC-produced wrapper code for DOLFIN, could will still generate a
> > Form constructor which takes the coefficient functions (or a vector of
> > coefficient functions) as an argument? This is needed when one works
> > with a pointer to a form. Doing
> >
> > Form* a;
> > a = new WeightedPoissonBilinearForm(V, V);
> >
> > it's not possible to attach coefficient functions because a Form doesn't
> > know about them, only WeightedPoissonBilinearForm does.
> >
> > Garth
>
> Is this something that happens in user code (so it needs to look
> nice)?
>
> Otherwise, just do
>
> Form* a;
> static_cast<WeightedPoissonBilinearForm*>(a)->f = f;
In this case, how and when do you set the FunctionSpace of the form?
I don't see a problem in having the old constructor of the type
PoissonLinearForm(dolfin::FunctionSpace& V0, dolfin::Function& v0)
existing alongside the new approach such that the user can avoid doing too much
complicated stuff.
Kristian
> --
> Anders
>
Follow ups
References