Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
unalmis committed Nov 25, 2024
1 parent 8fe40d0 commit 8d9bbef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
11 changes: 1 addition & 10 deletions desc/integrals/singularities.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,14 +1117,7 @@ def LHS(Phi_mn):
return Phi_mn, Phi_transform

Check warning on line 1117 in desc/integrals/singularities.py

View check run for this annotation

Codecov / codecov/patch

desc/integrals/singularities.py#L1117

Added line #L1117 was not covered by tests


def compute_grad_Phi(
eq,
eval_grid,
source_grid,
Phi_mn,
basis,
return_data=False,
):
def compute_grad_Phi(eq, eval_grid, source_grid, Phi_mn, basis):
"""Computes vacuum field ∇Φ on ∂D.
Let D, D^∁ denote the interior, exterior of a toroidal region with
Expand Down Expand Up @@ -1206,8 +1199,6 @@ def compute_grad_Phi(
loop=True,
)
)
if return_data:
return grad_Phi, evl_data
return grad_Phi

Check warning on line 1202 in desc/integrals/singularities.py

View check run for this annotation

Codecov / codecov/patch

desc/integrals/singularities.py#L1202

Added line #L1202 was not covered by tests


Expand Down
5 changes: 3 additions & 2 deletions tests/test_integrals.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,15 +743,16 @@ def test(G):
eq=eq, B0n=B0n, source_grid=src_grid, Phi_N=max(eq.N, 1)
)
evl_grid = Phi_transform.grid
grad_Phi, evl_data = compute_grad_Phi(
grad_Phi = compute_grad_Phi(
eq=eq,
eval_grid=evl_grid,
source_grid=src_grid,
Phi_mn=Phi_mn,
basis=Phi_transform.basis,
return_data=True,
)
dPhi_dn = dot(grad_Phi, evl_data["n_rho"])
n_rho = eq.compute("n_rho", grid=evl_grid)["n_rho"]
dPhi_dn = dot(grad_Phi, n_rho)
B0n, _ = B0.compute_Bnormal(
eq.surface, eval_grid=evl_grid, source_grid=src_grid
)
Expand Down

0 comments on commit 8d9bbef

Please sign in to comment.