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

How to run fenics commands in Ipython

0 votes

I would like to run set-by-step a fenics problem file within Ipython environment. I started fenics where I can run fenics problem files without a problem. However, when I launch from the fenics terminal Ipython I import fenics module without problem but when I define the mesh with mesh = UnitSquare(32, 32), it does not recognize and produce the output

  ---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-3-f94a851d7950> in <module>()
----> 1 mesh = UnitSquare(32, 32)

NameError: name 'UnitSquare' is not defined

How should I have to proceed? any help please

asked Jul 30, 2014 by merinopm FEniCS Novice (370 points)

1 Answer

+1 vote
 
Best answer

UnitSquare is a deprecated command, use

mesh = UnitSquareMesh(32, 32)

instead.

answered Jul 30, 2014 by cevito FEniCS User (5,550 points)
selected Jul 31, 2014 by merinopm
...