We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff167b3 commit 49b9b7cCopy full SHA for 49b9b7c
grudge/tools.py
@@ -76,6 +76,7 @@ def build_jacobian(
76
supported by *actx*.
77
:returns: a two-dimensional :class:`numpy.ndarray`.
78
"""
79
+ base_state = actx.freeze_thaw(base_state)
80
from arraycontext import flatten, unflatten
81
flat_base_state = flatten(base_state, actx)
82
@@ -89,8 +90,8 @@ def build_jacobian(
89
90
unit_i_flat = np.zeros(n, dtype=mat.dtype)
91
unit_i_flat[i] = stepsize
92
- f_unit_i = f(base_state + unflatten(
93
- base_state, actx.from_numpy(unit_i_flat), actx))
+ f_unit_i = f(actx.freeze_thaw(base_state + unflatten(
94
+ base_state, actx.from_numpy(unit_i_flat), actx)))
95
96
mat[:, i] = actx.to_numpy(flatten((
97
f_unit_i - f_base
0 commit comments