← Back to team overview

ffc team mailing list archive

Re: [DOLFIN-dev] DOLFIN wrapper code generated by FFC

 

On Thu, Oct 23, 2008 at 12:40:29PM +0100, Garth N. Wells wrote:
> 
> 
> Anders Logg wrote:
> > On Thu, Oct 23, 2008 at 10:59:53AM +0100, Garth N. Wells wrote:
> >> Anders, Could you modify the wrapper code generated by FFC to include 
> >> FunctionSpaces as arguments? I modified the code in 
> >> dolfin/ale/Poisson*.h by hand.
> > 
> > Yes, I'm just about to.
> > 
> >> It would reduce the number of Form constructors if the FFC generated 
> >> wrapper code would create a vector of FunctionSpaces.
> > 
> > Yes, we can assume that the Form constructor takes a vector of
> > FunctionSpace pointers (or shared pointers). The generated code will
> > add the appropriate constructors:
> > 
> >   class Form
> >   {
> >     Form(Array<FunctionSpace*> function_spaces);
> 
> I changed the above to
> 
>       Form(Array<FunctionSpace&> function_spaces);
> 
> to keep away from plain pointers so ownership is unambiguous.
> 
> Garth

ok. I've pushed some more adjustments to the Form class (which breaks
compilation) but will try to push some changes to the code generation
soon.

-- 
Anders


> >     Form(Array<std::tr1::shared_ptr<FunctionSpace> > function_spaces);
> >   };
> > 
> >   class PoissonBilinearForm : public Form
> >   {
> >     PoissonBilinearForm(FunctionSpace& V0, FunctionSpace& V1);
> >     PoissonBilinearForm(std::tr1::shared_ptr<FunctionSpace> V0, std::tr1::shared_ptr<FunctionSpace>);
> > 
> >     PoissonBilinearForm(Array<FunctionSpace*> function_spaces);
> >     PoissonBilinearForm(Array<std::tr1::shared_ptr<FunctionSpace> > function_spaces);
> >   };
> > 
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/dolfin-dev
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev

Attachment: signature.asc
Description: Digital signature


References