libadjoint team mailing list archive
-
libadjoint team
-
Mailing list archive
-
Message #00028
Re: A Functional that does pointwise evaluation
There is no such operation in ufl because it requires global knowledge of u
to evaluate. The ufc model only makes local values on a cell available to
the generated code. The point source class is a dolfin hack not visible to
ufl.
If added, Evaluate(u, x) would have to be replaced by a preprocessor with a
coefficient containing the evaluated value prior to form compilation.
This type of preprocessing opens up many possibilities and many potential
implementation issues I don't see clearly right now.
Martin
Den 13. juni 2012 12:29 skrev "Patrick Farrell" <
patrick.farrell06@xxxxxxxxxxxxxx> følgende:
> Hi all (Marie in particular!)
>
> I want to have a functional J that evaluates the solution u at a certain
> point coords. I know I can do
>
> u(coords)
>
> to evaluate the number, but I was wondering if there's a /symbolic UFL
> expression/ for that operation? Because I want to use it in a
> Functional, so I need to be able to call derivative on it. If I try
>
> derivative(u(coords), u)
>
> it complains of course, because u(coords) is just a float.
>
> I saw your discussion of making a new measure on
> https://bugs.launchpad.net/**dolfin/+bug/1010850<https://bugs.launchpad.net/dolfin/+bug/1010850>--
> I know there's a PointSource class that creates delta functions; but
> how do you actually use it to do an integration?
>
> delta = PointSource(V, Point(0.5))
> inner(u, delta)*dx
>
> fails.
>
> Am I missing something obvious?
>
> Patrick
>
Follow ups
References