Subject: [Viper-dev] Specifying coordinates for function evaluation

From: Evan Lezar <[email-masked]>
Date: Wed, 4 Feb 2009 21:55:32 +0200

Hi

I am currently trying to plot a vector function using viper, but would like
to specify the coordinates where the function is to be evaluated.  At the
moment it seems as if the function is simply evaluated at the coordinates of
the mesh - this is not sufficient in my case.

Would someone be able to provide an example as to how this can be achieved?

Thanks
Evan

---

From: Ola Skavhaug <[email-masked]>
Date: Thu, 5 Feb 2009 10:52:59 +0100

> Would someone be able to provide an example as to how this can be achieved?

As DOLFIN works, a function has an associated mesh through the FunctionSpace
the Function belongs to. In Viper, the method Function::interpolate() is
called to get point values for rendering. I've now added the functionality
to evaluate at arbitrary points by calling
some_function.function_space().eval(v, pt, some_function)

Note that the evaluation point needs to be inside your computational domain.

See demo/plot/python/demo.py example 3 for a simple example.

Everything in the development repositories, of course.

Ola

>
>
> Thanks
> Evan
>
> _______________________________________________
> Viper-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/viper-dev<https://fenics.org/mailman/listinfo/viper-dev>
>
>

-- 
Ola Skavhaug

---

From: Evan Lezar <[email-masked]>
Date: Thu, 5 Feb 2009 11:59:44 +0200

Thanks

I just saw the notification of the changes and will check it out.

Evan

On Thu, Feb 5, 2009 at 11:52 AM, Ola Skavhaug <[email-masked]> wrote:

>> I am currently trying to plot a vector function using viper, but would
>> like to specify the coordinates where the function is to be evaluated.  At
>> the moment it seems as if the function is simply evaluated at the
>> coordinates of the mesh - this is not sufficient in my case.
>>
> As DOLFIN works, a function has an associated mesh through the
> FunctionSpace the Function belongs to. In Viper, the method
> Function::interpolate() is called to get point values for rendering. I've
> now added the functionality to evaluate at arbitrary points by calling