← Back to team overview

dolfin team mailing list archive

Re: [FFC-dev] DOLFIN wrapper code

 

On Thu, Nov 06, 2008 at 11:21:02AM +0100, Kristian Oelgaard wrote:
> 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

I agree. I'll add it back again.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References