From 861f1db15140454930640f28d5985dd433fc58ab Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 22 Sep 2021 16:26:45 -0500 Subject: [PATCH] new_transformation -> new_derivative_coeff_dict --- sumpy/tools.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sumpy/tools.py b/sumpy/tools.py index d37ef2aa..616bd824 100644 --- a/sumpy/tools.py +++ b/sumpy/tools.py @@ -437,19 +437,19 @@ def diff_transformation(derivative_transformation, variable_idx, variables): variable given by **variable_idx** and return a new derivative transformation dictionary """ - new_transformation = defaultdict(lambda: 0) + new_derivative_coeff_dict = defaultdict(lambda: 0) for mi, coeff in derivative_transformation.items(): # In the case where we have x * u.diff(x), the result should # be x.diff(x) + x * u.diff(x, x) # Calculate the first term by differentiating the coefficients new_coeff = sym.sympify(coeff).diff(variables[variable_idx]) if new_coeff != 0: - new_transformation[mi] += new_coeff + new_derivative_coeff_dict[mi] += new_coeff # Next calculate the second term by differentitating the derivatives new_mi = list(mi) new_mi[variable_idx] += 1 - new_transformation[tuple(new_mi)] += coeff - return dict(new_transformation) + new_derivative_coeff_dict[tuple(new_mi)] += coeff + return dict(new_derivative_coeff_dict) # }}} -- GitLab