Dear firedrakers, The following code: from firedrake import * mesh = UnitSquareMesh(3,3,reorder=False) V = FunctionSpace(mesh,"CG",1) bc = DirichletBC(V,0.,"1") print bc.nodes produces: Traceback (most recent call last): File "test.py", line 5, in <module> print bc.nodes File "/home/cjc1/firedrake/firedrake/firedrake/utils.py", line 43, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/cjc1/firedrake/firedrake/firedrake/bcs.py", line 155, in nodes fs._mesh.exterior_facets.subset(self.sub_domain).indices, File "/home/cjc1/firedrake/firedrake/firedrake/mesh.py", line 185, in subset markers = as_tuple(markers, int) File "/home/cjc1/firedrake/PyOP2/pyop2/utils.py", line 62, in as_tuple raise TypeError("Items need to be of type %s" % type) TypeError: Items need to be of type <type 'int'> Is this a known bug? --cjc
doh! thanks. ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Lawrence Mitchell [lawrence.mitchell@imperial.ac.uk] Sent: 17 June 2014 09:00 To: firedrake Subject: Re: [firedrake] bcs
On 17 Jun 2014, at 09:45, "Cotter, Colin J" <colin.cotter@imperial.ac.uk> wrote:
from firedrake import * mesh = UnitSquareMesh(3,3,reorder=False) V = FunctionSpace(mesh,"CG",1) bc = DirichletBC(V,0.,"1")
1 not "1"
print bc.nodes
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
So, what if I want to do the same for an extruded mesh? --cjc ________________________________________ From: Cotter, Colin J Sent: 17 June 2014 09:14 To: firedrake Subject: RE: [firedrake] bcs doh! thanks. ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Lawrence Mitchell [lawrence.mitchell@imperial.ac.uk] Sent: 17 June 2014 09:00 To: firedrake Subject: Re: [firedrake] bcs
On 17 Jun 2014, at 09:45, "Cotter, Colin J" <colin.cotter@imperial.ac.uk> wrote:
from firedrake import * mesh = UnitSquareMesh(3,3,reorder=False) V = FunctionSpace(mesh,"CG",1) bc = DirichletBC(V,0.,"1")
1 not "1"
print bc.nodes
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (2)
- 
                
                Cotter, Colin J
- 
                
                Lawrence Mitchell