Skip to content

Commit b8a8755

Browse files
committed
Delete unnecessary comments
1 parent 68c1daf commit b8a8755

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

fdm-devito-notebooks/04_advec/src-advec/advec1D.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,8 @@ def solver(I, U0, v, L, dt, C, T, user_action=None,
5454

5555
integral = np.zeros(Nt+1)
5656

57-
# class Left(SubDomain):
58-
# name = 'left'
59-
# def define(self, dimensions):
60-
# x = dimensions[0]
61-
# return {x: ('left', Nx-1)}
62-
63-
# left = Left()
6457
grid = Grid(shape=(Nx+1,), extent=(L,), dtype=np.float64)
6558

66-
# grid = Grid(shape=(Nx+1,), extent=(L,), dtype=np.float64, subdomains=(left))
6759
t_s=grid.time_dim
6860

6961
def u(to=1, so=1):
@@ -102,7 +94,6 @@ def u(to=1, so=1):
10294
elif scheme == 'LW':
10395
u = u(so=2)
10496
pde = u.dtr + v*u.dxc - 0.5*dt*v**2*u.dx2
105-
print(pde)
10697

10798
pbc = [Eq(u[t_s+1, 0], u[t_s, 0] - 0.5*C*(u[t_s, 1] - u[t_s, Nx-1]) + \
10899
0.5*C**2*(u[t_s, 1] - 2*u[t_s, 0] + u[t_s, Nx-1]))]
@@ -112,10 +103,7 @@ def u(to=1, so=1):
112103
raise ValueError('scheme="%s" not implemented' % scheme)
113104

114105
stencil = solve(pde, u.forward)
115-
# eq = Eq(u.forward, stencil, subdomain=grid.subdomains['left'])
116106
eq = Eq(u.forward, stencil)
117-
print(eq)
118-
print(v)
119107

120108
bc_init = [Eq(u[t_s+1, 0], U0).subs(t_s, 0)]
121109

@@ -136,9 +124,6 @@ def u(to=1, so=1):
136124
else:
137125
op = Operator(bc_init + (pbc if periodic_bc else []) + [eq] + (bc if not periodic_bc else []))
138126

139-
print(op.arguments(dt=dt, x_m=1, x_M=Nx-1))
140-
print(op.ccode)
141-
142127
op.apply(dt=dt, x_m=1, x_M=Nx if scheme == 'UP' else Nx-1)
143128

144129
for n in range(1, Nt+1):

0 commit comments

Comments
 (0)