We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76ace2d commit 2363ea2Copy full SHA for 2363ea2
pySDC/implementations/datatype_classes/firedrake_mesh.py
@@ -60,11 +60,11 @@ def __rmul__(self, other):
60
fenics_mesh: copy of original values scaled by factor
61
"""
62
63
- if type(other) in [int, float, complex]:
+ try:
64
me = firedrake_mesh(self)
65
me.functionspace.assign(other * self.functionspace)
66
return me
67
- else:
+ except TypeError:
68
raise DataError("Type error: cannot multiply %s to %s" % (type(other), type(self)))
69
70
def __abs__(self):
0 commit comments