dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #06176
Re: Evaluating the FEM solution at an arbitrary point
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.
--
Anders
> On Feb 13, 2008 8:42 PM, Anders Logg <logg@xxxxxxxxx> wrote:
>
> On Wed, Feb 13, 2008 at 08:28:03PM +0100, Dag Lindbo wrote:
> > > Shilpa Khatri wrote:
> > >> I would also like to know how this is done (We are using the c++
> > >> interface).
> > >> Thanks,
> > >> Shilpa
> > >>
> > >> On Feb 13, 2008 4:09 PM, Kristen Kaasbjerg <cosby@xxxxxxxxx
> > >> <mailto:cosby@xxxxxxxxx>> wrote:
> > >>
> > >> Hi,
> > >>
> > >> I have a rather simple question - having obtained a FEM
> > >> solution "u" of a given PDE, how does one get the
> > >> function value at an arbitrary point "x" (I'm using the
> > >> python interface) ?
> > >>
> > >>
> > > This functionality existed in DOLFIN a while ago, but it needs updating
> > > to new interfaces. Take a look at the old implementation:
> > >
> > > http://www.fenics.org/hg/dolfin?f=50aee5576fed;file=src/kernel/function
> /DiscreteFunction.cpp
> > >
> > > The point evaluation function is:
> > >
> > > real DiscreteFunction::operator()(const Point& p, uint i)
> > >
> > > The significant change that needs to be done is how to compute basis
> > > functions. This functionality now exists for general finite elements in
> > > the UFC interface (evaluate_basis()).
> > >
> > > Johan
> >
> > This is good news. As far as I can tell, the search is handled by a
> > IntersectionDetector which is mainly a wrapper for GTS. Has the
> _idetector
> > member been removed from the DiscreteFunction, or does it come from some
> > base class?
> >
> > Dag
>
> Why do you need to evaluate functions at arbitrary points?
>
> I can understand it's nice to be able to do this, but in many cases
> there are other solutions (which are much more efficient).
>
>
>
>
>
> _______________________________________________
> 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: Anders Logg, 2008-02-11
-
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: 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