← Back to team overview

dolfin team mailing list archive

Evaluate discrete function on cells

 

Hello all,

I saw that there is a convenient way to evaluate a DiscreteFunction at all vertices of its mesh, i.e. u.evaluate( val ). Is there a convenient way to evaluate a function on each cell (e.g. on the mid-point of each triangle)?

If not, I would really appreciate some suggestions how to go about. Is the more general function

interpolate(real* coefficients,const ufc::cell& cell,
	    const ufc::finite_element& finite_element)

the way to go? How do I evaluate the sum of basis functions in a point if I know the coefficients?

Thanks!
/Dag Lindbo


Follow ups