Skip to content

Commit f1a6f6e

Browse files
domfournierCopilot
andauthored
Update simpeg/dask/potential_fields/magnetics/simulation_pde.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1962419 commit f1a6f6e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

simpeg/dask/potential_fields/magnetics/simulation_pde.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66

77
def distance_weights(locations, cell_centers, cell_volumes, exponent=3, threshold=1e-2):
8-
distance_weights = np.zeros(len(cell_centers))
8+
weights = np.zeros(len(cell_centers))
99
for loc in locations:
1010
distance = np.linalg.norm(cell_centers - loc, axis=1)
11-
distance_weights += cell_volumes**2.0 * (distance + threshold) ** (
11+
weights += cell_volumes**2.0 * (distance + threshold) ** (
1212
-2 * exponent
1313
)
1414

15-
return distance_weights
15+
return weights
1616

1717

1818
def dask_getJtJdiag(self, m, W=None, f=None):

0 commit comments

Comments
 (0)