DirichletBC copy constructor broken in Python interface
Bug #913698 reported by
Patrick Farrell
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Fix Released
|
High
|
Johan Hake |
Bug Description
According to the docstring for DirichletBC.
from dolfin import *
mesh = UnitSquare(4, 4)
V = FunctionSpace(mesh, "CG", 1)
bc = DirichletBC(V, 1.0, "on_boundary")
newbc = DirichletBC(bc)
gives an exception:
Traceback (most recent call last):
File "/tmp/py", line 5, in <module>
newbc = DirichletBC(bc)
File "/usr/lib/
if isinstance(args[1], cpp.Expression):
IndexError: tuple index out of range
instead of copying the boundary condition as expected.
Related branches
Changed in dolfin: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Thanks for reporting. Should be fixed now.
Johan
On Monday January 9 2012 11:19:53 Patrick Farrell wrote: __init_ _, there should be a python2. 7/dist- packages/ dolfin/ fem/bcs. py", line 89, in
> Public bug reported:
>
> According to the docstring for DirichletBC.
> copy constructor for DirichletBC objects. However, the following code:
>
> from dolfin import *
> mesh = UnitSquare(4, 4)
> V = FunctionSpace(mesh, "CG", 1)
> bc = DirichletBC(V, 1.0, "on_boundary")
> newbc = DirichletBC(bc)
>
> gives an exception:
>
> Traceback (most recent call last):
> File "/tmp/py", line 5, in <module>
> newbc = DirichletBC(bc)
> File "/usr/lib/
> __init__ if isinstance(args[1], cpp.Expression):
> IndexError: tuple index out of range
>
> instead of copying the boundary condition as expected.
>
> ** Affects: dolfin
> Importance: Undecided
> Status: New