Remove try-except block in matplotlib plotting code

Issue #659 new
Simon Funke created an issue

At the moment the site-packages/dolfin/common/plotting.py::mplot_function uses a try-except Runtime error to test if a vector of a function can be accessed. This test fails for subfunctionm in which case it performs a projection onto the collapsed function space.

Once has implemented the FunctionView functionality in FEniCS, this try-error block should be replaced with a nicer isinstance(obj, cpp.FunctionView) call. See also discussion here

Comments (2)

  1. Log in to comment