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
4 changes: 4 additions & 0 deletions sumpy/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,10 @@ class DirectionalDerivative(DerivativeBase):
def __init__(self, inner_kernel, dir_vec_name=None):
if dir_vec_name is None:
dir_vec_name = self.directional_kind + "_derivative_dir"
else:
from warnings import warn
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from warnings import warn
# Modifying this variable name leads to redundant code generation,
# with kernels only differing in this name.
from warnings import warn

But what about directional derivatives of directional derivatives?

cc @isuruf

warn("specified the name of the direction vector",
stacklevel=2)

KernelWrapper.__init__(self, inner_kernel)
self.dir_vec_name = dir_vec_name
Expand Down