Skip to content

Commit c192182

Browse files
committed
Correct JAX icbc update
1 parent 214c7ec commit c192182

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deepxde/icbc/boundary_conditions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ def collocation_points(self, X):
5252
return self.filter(X)
5353

5454
def normal_derivative(self, X, inputs, outputs, beg, end):
55-
dydx = grad.jacobian(outputs, inputs, i=self.component, j=None)[beg:end]
55+
dydx = grad.jacobian(outputs, inputs, i=self.component, j=None)
5656
if backend_name == "jax":
5757
dydx = dydx[0]
5858
n = self.boundary_normal(X, beg, end, None)
59-
return bkd.sum(dydx * n, 1, keepdims=True)
59+
return bkd.sum(dydx[beg:end] * n, 1, keepdims=True)
6060

6161
@abstractmethod
6262
def error(self, X, inputs, outputs, beg, end, aux_var=None):

0 commit comments

Comments
 (0)