From 8f0ac40f737a258b1136f99991875c987311783c Mon Sep 17 00:00:00 2001 From: benSepanski Date: Thu, 9 Jul 2020 10:23:58 -0500 Subject: [PATCH] Added type check to from_meshmode --- meshmode/interop/firedrake/connection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meshmode/interop/firedrake/connection.py b/meshmode/interop/firedrake/connection.py index 8ce7a4e2..0d83aeea 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 -- GitLab