libadjoint team mailing list archive
-
libadjoint team
-
Mailing list archive
-
Message #00031
Re: A Functional that does pointwise evaluation
On 06/13/2012 12:29 PM, Patrick Farrell wrote:
Hi all (Marie in particular!)
Sorry about the near infinite lag here, I just have one further comment
on the PointSource below.
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 --
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.
PointSource is a "hack". It is not used as a Function, but as something
you apply to a vector cf:
http://fenicsproject.org/documentation/dolfin/1.0.0/cpp/programmers-reference/fem/PointSource.html#pointsource-h
--
Marie
Am I missing something obvious?
Patrick
References