On 14/06/16 14:00, Anna Kalogirou wrote:
Dear all,
How can I name the components of a function in a mixed function space,
so that I can then easily visualize the results based on their names?
For example, say that I have
V = FunctionSpace(mesh, "CG", 1)
W = V*V
w = Function(W)
w1, w2 = split(w)
w1.rename("foo")
w2.rename("bar")
If you don't do this, we give you names like:
w_name[cmpt-0], c_name[cmpt-1] which is not very helpful.
When you first make a function you can do:
w = Function(W, name="some_name")
we could extend the API to allow you to pass a list of names that
apply to the components. This would be easy to do if you'd like to try.
output_file = File('results.pvd')
output_file.write(w1, w2, time=t)
I would like to give names to w1 and w2.
Lawrence
_______________________________________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake