← Back to team overview

dolfin team mailing list archive

Re: MeshFunction.set(double* values)?

 

On Wednesday 15 October 2008 11:07:33 Johan Hake wrote:
> Hello!
>
> Is there a reason that one cannot set the whole _value array in a
> MeshFunction using the same annalogy as GenericVector.set(double* values)?

I found out a way to do it in python:

   mf = MeshFunction("uint",mesh,2)
   mf_values = mf.values()
   mf_values[:] = my_values

where my_values is a numpy array with the values I want mf to have!

Johan


References