Skip to content

Commit

Permalink
use a better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf committed Nov 23, 2022
1 parent 9a620ce commit 106816f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pytential/symbolic/pde/system_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,9 @@ def _get_base_kernel_matrix(base_kernel: ExpressionKernel,
order = pde.order

if order > pde.order:
raise RuntimeError(f"order ({order}) cannot be greater than the order"
f"of the PDE ({pde.order}) yet.")
raise NotImplementedError("Computing derivative relation when "
"the base kernel's derivatives are linearly dependent has not"
"been implemented yet.")

mis = sorted(gnitstam(order, dim), key=sum)
# (-1, -1, -1) represent a constant
Expand Down Expand Up @@ -476,7 +477,12 @@ def _get_base_kernel_matrix(base_kernel: ExpressionKernel,

if failed:
if retries == 0:
raise RuntimeError("Failed to find a base kernel")
# The derivatives of the base kernel are not linearly
# independent.
# TODO: Extract a linearly independent set and return them
raise NotImplementedError("Computing derivative relation when "
"the base kernel's derivatives are linearly dependent has not "
"been implemented yet.")
return _get_base_kernel_matrix(
base_kernel=base_kernel,
hashable_kernel_arguments=hashable_kernel_arguments,
Expand Down

0 comments on commit 106816f

Please sign in to comment.