> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Anders Logg
> Sent: Monday, October 13, 2008 8:37 AM
> To: [email protected]
> Subject: Re: [DOLFIN-dev] BC specification in PyDOLFIN
>
> On Mon, Oct 13, 2008 at 08:10:35AM -0600, Ostien, Jakob T wrote:
> > Hi,
> >
> > Is it currently possible to set the boundary condition
> search specification in PyDOLFIN?
> >
> > in cpp
> > DirichletBC bc(function, mesh, subdomain, geometric);
> >
> > in PyDOLFIN
> > bc = DirichletBC(function, mesh, subdomain, geometric)
> >
> > this gives
> > NameError: name 'geometric' is not defined
> >
> > (same for pointwise)
> >
> > Jake
>
> Does it work if you instead write dolfin.geometric?

Yes (see below).

>
> In that case, it's a simple fix to include it in the
> __init__.py file for DOLFIN (site-packages/dolfin/__init__.py).


Adding the following to __init__.py got rid of the NameError.

# BC specification
from dolfin import topological, geometric, pointwise

However a simple 2D DG elasticity script uncovers other problems.  Namely, 
trying to use the pointwise specification gives the following error:

        TypeError: 'PySwigObject' object is unscriptable Swig director method 
error. Error detected when calling 'SubDomain.inside'

(I have absolutely no idea what that even means, I don't know python/swig very 
well)

Also, trying to use a LinearPDE gives a seg fault for the geometric 
specification.  (or some other nasty glibc error)

Other than that, assembling and solving using the geometric specification for 
the BCs gives me the answer I expect.

Thanks.  I'll attach the script if anyone is interested.

Jake




>
> --
> Anders
>

Attachment: 2D_dg_demo.py
Description: 2D_dg_demo.py

_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev

Reply via email to