← Back to team overview

dolfin team mailing list archive

Re: [FFC-dev] DOLFIN wrapper code

 



Anders Logg wrote:
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.


Could you take a look at the wrapper code for Functional too while you're at it? Presently, two identical constructors are being produced by FFC.

Garth



------------------------------------------------------------------------

_______________________________________________
FFC-dev mailing list
FFC-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/ffc-dev




Follow ups

References