dolfin.cpp.la.
as_backend_type
Cast tensor to the given subclass, passing the wrong class is an error.