On Thu, Feb 14, 2008 at 12:00:38PM +0100, Dag Lindbo wrote:
> >
> > Then I suggest first finding out which cells those points lie in, then
> > then for each cell with a point get the expansion coefficients within
> > that cell, then multiply those coefficients with the values of the
> > basis functions at the points.
> >
> > The basis functions are available from the ufc::finite_element.
> >
>
> The searching part has been sorted out. How do I get the
> ufc::finite_element from the function and/or the form? E.g.
>
> Function f(mesh, 0.0);
> StokesTHBilinearForm a;
> StokesTHLinearForm L(f);
> LinearPDE pde(a, L, mesh, bcs);
>
> pde.set("PDE linear solver", "direct");
> pde.solve(u, p);
>
> ufc::form frm = a.form(); // form() is virtual
> ufc::finite_element fe = frm.create_finite_element();
You should be able to do this:
// Create element (the '0' means create it for the space used for the
// first argument in the form, '1' for second etc)
ufc::finite_element* element = a.form().create_finite_element(0);
// Use it for a while
element->tabulate_basis(...);
...
// Then delete it
delete element;
--
Anders
> // OR
> ufc::finite_element fe = u.finite_element; // no such member
>
> (...)
>
> Dag
> _______________________________________________
> DOLFIN-dev mailing list
> [email protected]
> http://www.fenics.org/mailman/listinfo/dolfin-dev
_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev