This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Function Interval() (or other deprecated functions) not included?

0 votes

Hi,

I have installed fenics on my Ubuntu 13.10 with the instructions on this site:
http://fenicsproject.org/download/ubuntu_details.html
To be precise I copied the following commands in terminal:

sudo add-apt-repository ppa:fenics-packages/fenics 
sudo apt-get update 
sudo apt-get install fenics 
sudo apt-get dist-upgrade

After that I wanted to learn how to use fenics with the fenics tutorial to find at: http://fenicsproject.org/documentation/tutorial/index.html
I was very interested in the example on pages 66-71 (the complete code I found at http://fenicsproject.org/pub/book/chapters/01/transient/diffusion/sin_daD.py, but there the function "Interval()" is used and when I try to run this I get:

    mesh = Interval()
NameError: name 'Interval' is not defined

Minimal example code to produce this error is:

from dolfin import *
mesh = Interval()

So what is the problem here?
I tried to rename Interval in IntervalMesh, and the same for Rectangle and Box because I found out that Interval p.e. is deprecated, this worked partially but the function "line_plot" didn't the right job then. What is the error here?
But shouldn't functions work even if they are deprecated with p.e. a warning?

Cheers,

Tom

asked Mar 21, 2014 by Tom FEniCS Novice (130 points)

1 Answer

+1 vote

But shouldn't functions work even if they are deprecated with p.e. a warning?

No if they're deprecated for too long.

Instead tutorial which is not maintained, refer rather to demos supplied within DOLFIN tree/installation. Plenty of them are documented.

answered Mar 24, 2014 by Jan Blechta FEniCS Expert (51,420 points)

Ok, thank you very much. Then next time I choose demos from there.
Does this mean that the function Interval is really no longer included and everything is fine with my installation?

Yes.$\phantom{}$

...