Skip to content

Commit

Permalink
Verbose variable name for direction of finite diff
Browse files Browse the repository at this point in the history
  • Loading branch information
santisoler committed Oct 4, 2024
1 parent d10cf70 commit aaf6f65
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions choclo/tests/test_prism_magnetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ def test_derivatives_of_magnetic_components(
# Get forward functions
mag_func = get_forward_function(i)
mag_grad_func = get_forward_function(i + j)
direction = j # direction along which to apply the finite differences
# Evaluate the mag grad function on the sample grid
mag_grad = evaluate(
mag_grad_func, sample_3d_grid, sample_prism, sample_magnetization
Expand All @@ -898,7 +899,7 @@ def test_derivatives_of_magnetic_components(
sample_3d_grid,
sample_prism,
sample_magnetization,
direction=j,
direction=direction,
forward_func=mag_func,
delta=self.delta,
)
Expand Down Expand Up @@ -963,6 +964,7 @@ def test_derivatives_of_magnetic_components_on_edges(
# Get forward functions
mag_func = get_forward_function(i)
mag_grad_func = get_forward_function(f"{i}{j}")
direction = j # direction along which to apply the finite differences
# Evaluate the mag grad function on the sample grid
mag_grad = evaluate(
mag_grad_func, coordinates, sample_prism, sample_magnetization
Expand All @@ -972,7 +974,7 @@ def test_derivatives_of_magnetic_components_on_edges(
coordinates,
sample_prism,
sample_magnetization,
direction=j,
direction=direction,
forward_func=mag_func,
delta=self.delta,
)
Expand Down

0 comments on commit aaf6f65

Please sign in to comment.