← Back to team overview

dolfin team mailing list archive

Re: vertex values

 

On Wed, Oct 07, 2009 at 10:09:07AM +0100, Garth N. Wells wrote:
>
>
> Anders Logg wrote:
> > On Wed, Oct 07, 2009 at 12:48:00AM +0200, Anders Logg wrote:
> >> On Tue, Oct 06, 2009 at 11:45:48PM +0100, Garth N. Wells wrote:
> >>> Any thoughts on adding
> >>>
> >>>    virtual void compute_vertex_values(double* vertex_values) const = 0;
> >>>
> >>> to GenericFunction? It would make it simple to plot both Functions and
> >>> Expressions.
> >>>
> >>> Garth
> >> Yes, that would be ok.
> >
> > I'm working on this.
> >
>
> OK. I had a quick look last night but it wasn't as straightforward as I
> had anticipated since the mesh is not easily accessible.
>
> Would it make sense to have
>
>     void compute_vertex_values(const Mesh& mesh, double* vertex_values)
> const;
>
> ?

Yes, or rather:

  void compute_vertex_values(double* vertex_values, const Mesh& mesh);

This is what I have implemented now.

> One could then use a mesh which is different to the one associated with
> a Function. This is useful when visualising higher-order functions.

I have not implemented this part. We could add it but then we need two
different implementations in the Function class, one that works
through ufc::finite_elemement::interpolate_vertex_values and one that
works through eval.

There is an assertion now that checks that the mesh is the same.

--
Anders

Attachment: signature.asc
Description: Digital signature


References