dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #06199
Re: Evaluating the FEM solution at an arbitrary point
On Thu, Feb 14, 2008 at 10:06:43AM +0100, Kristen Kaasbjerg wrote:
> Anders Logg wrote:
> > On Wed, Feb 13, 2008 at 10:50:23PM +0100, cosby@xxxxxxxxx wrote:
> >
> >>>> On Wed, Feb 13, 2008 at 08:49:09PM +0100, Shilpa Khatri wrote:
> >>>>
> >>>>> We (Dag and I) are doing this because we would like to have Dolfin
> >>>>> solve
> >>>>> the
> >>>>> Stokes/Navier-Stokes equations as one part of a timestep in our code
> >>>>> where we
> >>>>> are moving interfaces that are defined as a random set of points in the
> >>>>> domain.
> >>>>>
> >>>>> Thanks,
> >>>>> Shilpa
> >>>>>
> >>>> 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.
> >>>>
> >>>> We can implement a suitable interface for this at some point but
> >>>> until then, you can do it manually.
> >>>>
> >>> Sounds good. Is the GTS_Interface still in place for searching?
> >>>
> >>> /Dag
> >>>
> >> I'm a little lost here. How is the ufc module used to get hold
> >> of the basis functions ?
> >>
> >> Kristen
> >>
> >
> > You need to get hold of a ufc::finite_element and then call
> > evaluate_basis_function (see UFC manual). If you have a ufc::form,
> > then you can create a ufc::finite_element by calling
> > create_finite_element. If you have a dolfin::Form, then first get the
> > ufc::form by calling form().
> >
> >
> Ok, so this is doable via the python interface ?
> In case yes, where is the dolfin::Form then hidden ?
>
> Kristen
Yes, you can use it from the Python interface by calling the JIT
compiler:
(compiled_form, compiled_module, form_data) = jit(a)
You can then call compiled_form.create_finite_element(i) etc
since this will be a Python wrapper for a ufc::form.
BUT: If you are using the Python interface, then everything is already
available through the Python interface, so if you have a
FiniteElement, you can tabulate it's values at any point by calling
element.tabulate(). Note that this gives you values on the reference
element so you need to map the values to the physical element.
Another comment is that things like this are better (more efficiently)
implemented as C++ components in DOLFIN and then wrapped back to
Python for general use.
--
Anders
Follow ups
References
-
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-13
-
Re: Evaluating the FEM solution at an arbitrary point
From: cosby, 2008-02-13
-
Re: Evaluating the FEM solution at an arbitrary point
From: Anders Logg, 2008-02-14
-
Re: Evaluating the FEM solution at an arbitrary point
From: Kristen Kaasbjerg, 2008-02-14