Repository navigation
Applying an external operator to a TestFunction produces an error #5035
Answered
by
dham
marazzaf
asked this question in
Firedrake support
|
Hi all, I am trying to write the lifting operators from [Di Pietro and Ern, 2010] by using the ExternalOperator framework. I have coded the following: It works fine when applied to a Function. But I get the following error when I apply it to a TestFunction: Does anybody have an idea what I am doing wrong? Thanks for your help. |
Answered by
dham
Apr 22, 2026
Replies: 1 comment 5 replies
|
I am not really familiar with external operators but my guess would be that if you're encountering two test functions then one of them should probably be a trial function. It's possible that some of our test suite may be a useful reference. I'd recommend asking this on our Slack as things tend to be answered more promptly there. |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
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: