Subject: [Viper-dev] update display

From: "Garth N. Wells" <[email-masked]>
Date: Thu, 14 Jun 2007 10:38:15 +0200

Is it possible to update the viper plot window during a computation? For 
the unsteady advection-diffusion demo, it's necessary to press 'q' after 
each of the 40 time steps.

Garth

---

From: Anders Logg <[email-masked]>
Date: Thu, 14 Jun 2007 10:45:15 +0200

> each of the 40 time steps.

Yes it can, but only from Python (using update()). The C++ plot()
function runs a Python script in each time step to plot the solution
so it is difficult to make this work with update().

It this is a problem, we can remove the plot in each time step in the
demo and just plot the final time solution.

To see how the update() function works, look in the Python plot demo
in DOLFIN.

/Anders

---

From: Ola Skavhaug <[email-masked]>
Date: Thu, 14 Jun 2007 10:56:29 +0200

> each of the 40 time steps.

In Python, this is very simple; simply calling update(u) should do the
trick.

In cpp, however, this cannot be done today. I think I can make it work, but I
have to discuss this with Anders.

Assuming that DOLFIN starts a viper process that does not die, we can
communicate with it through files, right?

Ola
 
> Garth
> _______________________________________________
> Viper-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/viper-dev

---

From: Anders Logg <[email-masked]>
Date: Thu, 14 Jun 2007 11:03:30 +0200

> communicate with it through files, right?

How about a Python process is started and that process simply polls
the file continuously (but not too often) and calls update when the
file is changed? So then there's no communication. DOLFIN just writes
new data to the file and then the Python process will look for new
data.

/Anders

---

From: Ola Skavhaug <[email-masked]>
Date: Thu, 14 Jun 2007 11:09:23 +0200

Anders Logg skrev den 14/06-2007 følgende:

[snip]

> new data to the file and then the Python process will look for new

Something like that. I was thinking of an event loop where a buffer is
searched for a new filename. If so, update the plot, else, continue vtk
event-loop.

Ola

---

From: Anders Logg <[email-masked]>
Date: Thu, 14 Jun 2007 11:11:03 +0200

> searched for a new filename. If so, update the plot, else, continue vtk

But how is the buffer communicated?

/Anders

---

From: Ola Skavhaug <[email-masked]>
Date: Thu, 14 Jun 2007 11:23:37 +0200

> But how is the buffer communicated?

The buffer could be a file or a pipe. If DOLFIN opens a file and appends
filenames to it, viper can watch the file and pull filenames.

Ola

---

From: Anders Logg <[email-masked]>
Date: Thu, 14 Jun 2007 13:09:04 +0200

> filenames to it, viper can watch the file and pull filenames.

ok, let's do this. (But probably after the release.)

We're working hard on the UFC manual and hope to release UFC 1.0
tomorrow (?!). Then FFC will be ready for release and hopefully we can
get DOLFIN ready early next week.

/Anders