Skip to content

Commit

Permalink
use numba cross and dot in newton solver
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc2 committed Sep 18, 2024
1 parent 064a465 commit b6be73d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions uxarray/grid/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

from uxarray.constants import ENABLE_FMA

from uxarray.utils.computing import cross, dot


def _replace_fill_values(grid_var, original_fill, new_fill, new_dtype=None):
"""Replaces all instances of the current fill value (``original_fill``) in
Expand Down Expand Up @@ -188,8 +190,8 @@ def _newton_raphson_solver_for_gca_constLat(
while error > tolerance and _iter < max_iter:
f_vector = np.array(
[
np.dot(
np.cross(w0_cart, w1_cart),
dot(
cross(w0_cart, w1_cart),
np.array([y_guess[0], y_guess[1], constZ]),
),
y_guess[0] * y_guess[0]
Expand Down

0 comments on commit b6be73d

Please sign in to comment.