diff --git a/meshmode/interop/firedrake/connection.py b/meshmode/interop/firedrake/connection.py index 8ce7a4e21f089c313f5c9f0ddbbae501413c4638..0d83aeea4eb778b9cd226ffb063b990b409e6e65 100644 --- a/meshmode/interop/firedrake/connection.py +++ b/meshmode/interop/firedrake/connection.py @@ -378,6 +378,9 @@ class FiredrakeConnection: raise ValueError("Trying to convert to continuous function space " " with :arg:`assert_fdrake_discontinuous` set " " to *True*") + if not isinstance(mm_field, np.ndarray): + raise TypeError(":param:`mm_field` must be of type " + ":class:`np.ndarray`, not %s." % type(mm_field)) # make sure out is a firedrake function in an appropriate # function space from firedrake.function import Function