Commit 43c1d1e3 by Jigyasa Watwani

small bug

parent cb5f1fc5
Showing with 3 additions and 3 deletions
......@@ -26,7 +26,7 @@ class diffusion(object):
self.c0.interpolate(df.Expression('1 + 0.2 * cos(pi*x[0]/L)', pi=np.pi, L=self.L, degree=1))
else:
self.c0 = df.project(initc, self.function_space)
# print('c0=', self.c0.compute_vertex_values(self.mesh))
print('c0=', self.c0.compute_vertex_values(self.mesh))
def setup_weak_forms(self):
self.form = (df.inner((self.c - self.c0)/self.timestep, self.tc)
......@@ -38,7 +38,7 @@ class diffusion(object):
self.cFile = df.XDMFFile('%s_concentration.xdmf' % self.timestamp)
# time-variables
self.time = round(initTime, 1)
self.time = initTime
# print('time=', self.time)
maxsteps = round(self.maxtime/self.timestep)
......@@ -51,7 +51,7 @@ class diffusion(object):
for steps in progressbar.progressbar(range(1, maxsteps + 1)):
self.time += self.timestep
# print('time=', self.time)
# print('time=' self.time))
df.solve(self.form == 0, self.c)
self.cFile.write_checkpoint(self.c, 'concentration', self.time, append=True)
# print('c=', self.c.compute_vertex_values(self.mesh))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment