Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions firedrake/external_operators/abstract_external_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ def assemble(self, assembly_opts=None):
# Will also catch the case where wrong fct space
if not isinstance(result, (Function, Cofunction)):
raise ValueError('External operators with one argument must result in a firedrake.Function or firedrake.Cofunction object!')
if not result.function_space() == self.arguments()[0].function_space().dual():
raise ValueError('External operator assembly result is in the wrong function space.')
elif len(self.arguments()) == 2:
if not isinstance(result, MatrixBase):
raise ValueError('External operators with two arguments must result in a firedrake.MatrixBase object!')
Expand Down
Loading