Skip to content

Commit

Permalink
Fixed MGPCG (#652)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanming-hu committed Mar 25, 2020
1 parent 76ff830 commit 6fcba96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/mgpcg_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def init(self):
ti.ndrange(*(
(self.N_ext, self.N_tot - self.N_ext), ) * self.dim)):
self.r[0][I] = 1.0
for i in ti.static(range(self.dim)):
self.r[0][I] *= ti.sin(2.0 * np.pi * (i - self.N_ext) * 2.0 /
self.N_tot)
for k in ti.static(range(self.dim)):
self.r[0][I] *= ti.sin(2.0 * np.pi *
(I[k] - self.N_ext) * 2.0 / self.N_tot)
self.z[0][I] = 0.0
self.Ap[I] = 0.0
self.p[I] = 0.0
Expand Down

0 comments on commit 6fcba96

Please sign in to comment.