dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #06198
Re: Evaluating the FEM solution at an arbitrary point
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
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
Follow ups
References
-
Re: How to deal with two subdomains with different PDE parameters
From: Matthew Knepley, 2008-02-11
-
Re: How to deal with two subdomains with different PDE parameters
From: Anders Logg, 2008-02-12
-
Evaluating the FEM solution at an arbitrary point
From: Kristen Kaasbjerg, 2008-02-13
-
Re: Evaluating the FEM solution at an arbitrary point
From: Shilpa Khatri, 2008-02-13
-
Re: Evaluating the FEM solution at an arbitrary point
From: Johan Jansson, 2008-02-13
-
Re: Evaluating the FEM solution at an arbitrary point
From: Dag Lindbo, 2008-02-13
-
Re: Evaluating the FEM solution at an arbitrary point
From: Anders Logg, 2008-02-13
-
Re: Evaluating the FEM solution at an arbitrary point
From: Shilpa Khatri, 2008-02-13
-
Re: Evaluating the FEM solution at an arbitrary point
From: Anders Logg, 2008-02-13
-
Re: Evaluating the FEM solution at an arbitrary point
From: Dag Lindbo, 2008-02-14