(Deleted) name 'Rectangle' is not defined,why?


42
views
0
3 months ago by
Here's the testing code, the circel and rectangle are both not defined
I installed the fenics by
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install --no-install-recommends fenics
sudo apt-get dist-upgrade

from dolfin import *
from mshr import *

xmin = 0.0
xmax = 2.2
ymin = 0.0
ymax = 0.41

xcenter = 0.2
ycenter = 0.2
radius = 0.05
domain = Rectangle(Point(xmin,ymin),Point(xmax,ymax)) \
- Circle(Point(xcenter,ycenter),radius,12)

mesh = generate_mesh(domain,20)
plot(mesh,interactive = True)


Community: FEniCS Project
Please login to add an answer/comment or follow this question.
The thread is closed. No new answer/comment may be added.

Similar posts:
Search »
  • Nothing matches yet.