This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Bug in the "plot" function?

0 votes

It seems to me that something is strange about the plot function. The following code doesn't work properly:

from dolfin import *
mesh1 = Mesh("pokus.xml")
mesh = refine(mesh1)
plot(mesh, title="mesh")
V = VectorFunctionSpace(mesh, "CG", 2)
velocity=Function(V)
file=File('vel.xml')
file >> velocity
plot(velocity, title="velocity")

whereas it works properly, if I move the plot(mesh) command 4 lines below. In the first case, the plot(velocity) command plots some nonsense -- when I move the plot(mesh) command below (or remove it), it works ok. The input xml files are here: http://www.cs.cas.cz/~franek/file.tar.gz

asked Oct 29, 2013 by franp9am FEniCS Novice (590 points)
edited Oct 29, 2013 by johanhake
...