Operator interface #175
Labels
design decisions
Anything related to overhauling or redesigning code
documentation
Improvements or additions to documentation
question
Further information is requested
@alexfikl brought up a great point about the current operator interface: #172 (comment)
As already pointed out, grudge operators typically have a function signature like:
operator(dcoll, *args)
, such as:grudge/grudge/op.py
Line 437 in 2af3528
The issue here is that we're not quite enforcing anything on
*args
. So, for example, if a user passes in(vec, dd)
(instead of the expected(dd, vec)
ordering), the code will break without actually catching this problem. Currently, we have the docstrings elaborate on*args
, such as:grudge/grudge/op.py
Lines 438 to 441 in 2af3528
We could strengthen the checks inside each function. However, I can see this becoming a bit unwieldy. We could also revamp the interface and impose a fixed signature for each function (meaning we always require args:
dcoll, dd, vec
--- no more*args
).I thought I'd raise this issue so we can discuss this. I don't think this is a huge problem right now, but definitely worth noting.
The text was updated successfully, but these errors were encountered: