Chapter 1.5: Different materials tutorial
Hi,
I'm trying to implement a model with different materials. I tried the example in Chapter 1.5 of the FeniCS book, but got an error statement.
from dolfin import *
mesh=UnitSquare
V = FunctionSpace(mesh, 'Lagrange', 1)
class Boundary(
def inside(x, on_boundary):
tol = 1E-14
return on_boundary and abs(x[0])<tol
boundary = Boundary()
bc = DirichletBC(V, Constant(0), boundary)
Traceback (most recent call last):
File "chapter_1.5.py", line 13, in <module>
bc = DirichletBC(V, Constant(0), boundary)
File "/usr/lib/
cpp.
File "/usr/lib/
_cpp.
TypeError: inside() takes exactly 2 arguments (3
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Anders Logg
- Solved:
- Last query:
- Last reply: