Skip to content
Discussion options

You must be logged in to vote

OK so what is going on here reflects a lack of clarity in our documentation. ExternalOperators don’t promise to be linear in their operands, so it’s actually not valid to pass an argument to a plain externaloperator (and we should error better in that case). The case that you want here is:

v = Function(V)
op = derivative(LiftJump(v, function_space=W), v)
print(assemble(op))

Now, that will currently fail for your code too, because of a minor bug in the way you’ve used the assemble_method decorator on the Jacobian. Because your operator has a single operand, the derivative multi-index should only have one entry:

@assemble_method((1,), (0, 1))
    def assemble_Jacobian(self, *args, **kwargs…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@connorjward
Comment options

@marazzaf
Comment options

@dham
Comment options

dham Apr 22, 2026
Maintainer

Answer selected by marazzaf
@marazzaf
Comment options

@gobenavides
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants