Setting label for Function at creation does not work
I would like to set the name and label of a Function when I create it instead of renaming it afterwards. See the MWE and corresponding output below:
from fenics import * from mshr import * mesh = UnitSquareMesh(10, 10) V = VectorFunctionSpace(mesh, "P", 1) u = Function(V, name="u", label="Velocity field") print(u.name()) print(u.label()) u.rename("u", "Velocity field") print(u.name()) print(u.label())
u a Function u Velocity field
It seems to work for name but not for label. Is this a bug?
note: I am using FEniCS from ppa:fenics-packages/fenics on Ubuntu 16.04.