** Changed in: dolfin
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
https://bugs.launchpad.net/bugs/771259

Title:
  Viper fails to plot one-dim time dependent functions

Status in DOLFIN:
  Fix Released

Bug description:
  I try to solve a time-dependent problem, however the plotting does not show 
the change of the function over time. The plot window always shows the function 
in that timestep in which the plot command was first called. What am I doing 
wrong? The time-dependent example look similar, but they work.
  Here is the simplest example that goes wrong:

  from dolfin import *

  T_initial = Constant(293.0)

  dt = 1.0
  t = dt

  mesh = Interval(200, 0, 20.0)

  V = FunctionSpace(mesh, "CG", 1)

  T = TrialFunction(V)
  v = TestFunction(V)

  def inflow(x, on_boundary):
      return on_boundary and x[0] < 1.0
      
  BC = DirichletBC(V, 800.0, inflow)
  T_prev = interpolate(T_initial, V)

  a = (T*v + dt*T.dx(0)*v.dx(0))*dx
  L = T_prev*v*dx

  f = Function(V)

  
  while t < 1000:
      A = assemble(a)
      l = assemble(L)
      BC.apply(A,l)
      solve(A,f.vector(), l)
      plot(f)
      T_prev.assign(f)
      t += dt

  Using mesh = Rectangle(0,0,20,1, 200, 1) instead works fine.

_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to     : dolfin@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dolfin
More help   : https://help.launchpad.net/ListHelp

Reply via email to