Subject: [Viper-dev] [HG viper] Rewrite bin/viper to read arbitrary dolfin data from a given input file. This will break most old code, so keep out if you rely on the viper application. We will make a backwards compability mode in due time...

From: [email-masked]
Date: Tue, 17 Mar 2009 21:23:53 +0100 (CET)

One or more new changesets pushed to the primary Viper repository.
A short summary of the last three changesets is included below.

changeset:   154:fae30aef1e34d34b104661d94c74014acf942ee4
tag:         tip
user:        Ola Skavhaug <[email-masked]>
date:        Tue Mar 17 21:23:51 2009 +0100
files:       src/bin/viper
description:
Rewrite bin/viper to read arbitrary dolfin data from a given input file. This will break most old code, so keep out if you rely on the viper application. We will make a backwards compability mode in due time...

changeset:   153:ffa06b225864db70c203fdfe43f4def3f1124e71
user:        "Ola Skavhaug <[email-masked]>"
date:        Mon Mar 16 10:41:50 2009 +0100
files:       src/viper/viper.py
description:
Added show_scalarbar()

changeset:   152:a51e2d75c4d1160fc31e77e1a6fbb1d374898726
user:        "Ola Skavhaug <[email-masked]>"
date:        Thu Feb 05 10:48:39 2009 +0100
files:       src/viper/viper_dolfin.py
description:
Add support for plotting vector functions at arbitrary points in space

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/viper

---

From: Ola Skavhaug <[email-masked]>
Date: Tue, 17 Mar 2009 21:25:38 +0100

> Rewrite bin/viper to read arbitrary dolfin data from a given input file. This will break most old code, so keep out if you rely on the viper application. We will make a backwards compability mode i…

This only works with scalar and vector FunctionPlotData for now. More
to be done tomorow.

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

-- 
Ola Skavhaug

---

From: Anders Logg <[email-masked]>
Date: Tue, 17 Mar 2009 23:30:25 +0100

> This only works with scalar and vector FunctionPlotData for now. More

It doesn't seem to work for me:

Could not plot function.
Traceback (most recent call last):
  File "/usr/bin/viper", line 193, in <module>
    _newmain()
  File "/usr/bin/viper", line 189, in _newmain
    p.interactive()
AttributeError: 'NoneType' object has no attribute 'interactive'

-- 
Anders

---

From: Ola Skavhaug <[email-masked]>
Date: Wed, 18 Mar 2009 08:31:45 +0100

> AttributeError: 'NoneType' object has no attribute 'interactive'

What are you plotting?
dolfin/demo/pde/poisson/cpp/demo works fine on both my computers.

Ola

>
> --
> Anders
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAknAJIEACgkQTuwUCDsYZdEhGACfUGKq0BpeJsCggdWWlkTyRXJQ
> /EsAoIrMz06NR1dtJmn+l2Eah4yxEbYT
> =NAjm
> -----END PGP SIGNATURE-----
>

-- 
Ola Skavhaug

---

From: Ola Skavhaug <[email-masked]>
Date: Wed, 18 Mar 2009 08:51:11 +0100

Try up pull and install, and see if the checksum changes...

Ola

On Wed, Mar 18, 2009 at 8:35 AM, Anders Logg <[email-masked]> wrote:
> On Wed, Mar 18, 2009 at 08:31:45AM +0100, Ola Skavhaug wrote:
> That's the one I'm using.
>
> Do I have the wrong version?
>
> # md5sum `which viper`
> bbd953cb1f9a61f1e5586b4325ee3498  /usr/bin/viper
>
> --
> Anders
>
> iEYEARECAAYFAknApEkACgkQTuwUCDsYZdEQ6gCgiLASVmtY4mNB2NuaA6qz8PF0
> RqcAn2o+EPE+yuhuyYLxOqgQO1ATSoHp
> =3Vco

-- 
Ola Skavhaug

---

From: Anders Logg <[email-masked]>
Date: Wed, 18 Mar 2009 20:31:12 +0100

> Try up pull and install, and see if the checksum changes...

New checksum:

98c649b0f5c4e7e24b86a01d86025051  /usr/bin/viper

But same problem:

Cannot plot data in file dolfin_plot_data.xml
Traceback (most recent call last):
  File "/usr/bin/viper", line 182, in <module>
    _newmain()
  File "/usr/bin/viper", line 178, in _newmain
    p.interactive()
AttributeError: 'NoneType' object has no attribute 'interactive'

-- 
Anders

---

From: Ola Skavhaug <[email-masked]>
Date: Wed, 18 Mar 2009 22:13:07 +0000

Did you update dolfin? You need the latest version.

2009/3/18, Anders Logg <[email-masked]>:
>> >> >> > Rewrite bin/viper to read arbitrary dolfin data from a given input
>> >> >> > file. This will break most old code, so keep out if you rely on
>> >> >> > the viper application. We will make a backwards compability mode
>> >> >> > in due time...
>> >> >> >
>> >> >>

-- 
Sendt fra min mobile enhet

Ola Skavhaug

---

From: Anders Logg <[email-masked]>
Date: Wed, 18 Mar 2009 23:25:04 +0100

Yes.

-- 
Anders

---

From: Ola Skavhaug <[email-masked]>
Date: Thu, 19 Mar 2009 08:27:45 +0100

2009/3/18 Anders Logg <[email-masked]>:
> Yes

This is very strange. I've also changed src/viper/viper_dolfin.py. You
sure this file is updated as well?

You could also try to move the statement at line 108 in bin/viper
outside the try/except block and then try to read FunctionPlotData

On my two computers, scalar, vector, and displacement fields and
meshes now work, so the error should be on your side.

Ola

> iEYEARECAAYFAknBdMAACgkQTuwUCDsYZdHAJwCfZXFjrIzIMGzJOBXzmgYWIWU2
> a〉�√ﴈ睶齬㨄�눁�
> =212I

-- 
Ola Skavhaug

---

From: Anders Logg <[email-masked]>
Date: Thu, 19 Mar 2009 08:37:51 +0100

> sure this file is updated as well?

# md5sum /usr/lib/python2.5/site-packages/viper/viper_dolfin.py
07157310a27d3a56b7a1a0a27a778837

# md5sum /usr/bin/viper 
98c649b0f5c4e7e24b86a01d86025051

Is this correct?

> outside the try/except block and then try to read FunctionPlotData

Turns out I didn't have FFC installed. Maybe the except statement
catches to much?

Installing FFC, I get a plot but only of an empty mesh (no function).

-- 
Anders

---

From: Johan Hake <[email-masked]>
Date: Thu, 19 Mar 2009 08:54:51 +0100

> 98c649b0f5c4e7e24b86a01d86025051

The bin script is the one in 
  
  src/bin/viper

> Installing FFC, I get a plot but only of an empty mesh (no function).

Same here.

My md5sum is:
md5sum $(which viper)
3a899a37457f44d3cc6cfa2d86c3e5e8  /home/hake/local/bin/viper

Johan

---

From: Ola Skavhaug <[email-masked]>
Date: Thu, 19 Mar 2009 08:55:46 +0100

> 07157310a27d3a56b7a1a0a27a778837

This is correct

> 98c649b0f5c4e7e24b86a01d86025051

$ md5sum src/bin/viper
3a899a37457f44d3cc6cfa2d86c3e5e8  src/bin/viper

> Turns out I didn't have FFC installed. Maybe the except statement

Yes. I catch everything now.

> Installing FFC, I get a plot but only of an empty mesh (no function).

I'll make the except less greedy, then.

Ola

> iEYEARECAAYFAknB9k8ACgkQTuwUCDsYZdGuPQCfXNIKmS1DGI9ytbO01Bc3P2g+
> BakAnim0Eab9jZ4BrnTFihTzoAN2vEe3
> =jNJ2

-- 
Ola Skavhaug

---

From: Anders Logg <[email-masked]>
Date: Thu, 19 Mar 2009 13:21:36 +0100

> 3a899a37457f44d3cc6cfa2d86c3e5e8  src/bin/viper

It works now after adding the mode=auto option in plot.cpp.

> I'll make the except less greedy, then.

That would be nice. Our old generated plot script also had try/except
that caught everything and reported "Unable to plot, Viper not
available" or similar, which could be anything from missing Viper to
missing FFC or DOLFIN Python module.

-- 
Anders