Thread Previous • Date Previous • Date Next • Thread Next |
Anders Logg wrote:
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. DoingForm* 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.GarthIs this something that happens in user code (so it needs to look nice)?
Kristian has also run into this issue with the plasticity solver library in fenics-apps.
The problem arises when the Form can only be determined at runtime, e.g. switching between 2D and 3D depending on the supplied mesh.
Garth
Otherwise, just do Form* a; static_cast<WeightedPoissonBilinearForm*>(a)->f = f; ------------------------------------------------------------------------ _______________________________________________ FFC-dev mailing list FFC-dev@xxxxxxxxxx http://www.fenics.org/mailman/listinfo/ffc-dev
Thread Previous • Date Previous • Date Next • Thread Next |