Skip to content

Commit 3fb8e4b

Browse files
committed
add initial condition in prev and current time
1 parent 1d5f556 commit 3fb8e4b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

simwave/kernel/frontend/solver.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ def forward(self, initial_grid=None):
151151
z2 = halo + nbl[1]
152152
x1 = halo + nbl[2]
153153
x2 = halo + nbl[3]
154+
155+
u[0, z1:-z2, x1:-x2] = initial_grid
154156
u[1, z1:-z2, x1:-x2] = initial_grid
155157

156158
else:
@@ -162,6 +164,7 @@ def forward(self, initial_grid=None):
162164
y1 = halo + nbl[4]
163165
y2 = halo + nbl[5]
164166

167+
u[0, z1:-z2, x1:-x2, y1:-y2] = initial_grid
165168
u[1, z1:-z2, x1:-x2, y1:-y2] = initial_grid
166169

167170
u_full, recv = self._middleware.exec(

0 commit comments

Comments
 (0)