dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #16372
Re: [HG DOLFIN] Allow simple specification of subdomains in Python without needing to subclass SubDomain.
On Thu, Oct 22, 2009 at 06:55:04PM +0200, DOLFIN wrote:
> One or more new changesets pushed to the primary dolfin repository.
> A short summary of the last three changesets is included below.
>
> changeset: 7399:ce910223d8a0
> tag: tip
> user: Anders Logg <logg@xxxxxxxxx>
> date: Thu Oct 22 18:53:41 2009 +0200
> files: ChangeLog demo/pde/poisson/python/demo.py dolfin/mesh/SubDomain.h site-packages/dolfin/__init__.py site-packages/dolfin/bcs.py site-packages/dolfin/utils.py
> description:
> Allow simple specification of subdomains in Python without needing to subclass SubDomain.
> Feature request from the president (of SIAM) and HPL. Thanks to Johan Hake for some help
> with the Python magic.
>
> One may now specify a SubDomain for a DirichletBC as follows:
>
> def my_boundary(x):
> return x[0] == 0.0
>
> or optionally
>
> def my_boundary(x):
> return x[0] == 0.0 and on_boundary
Should be
def my_boundary(x, on_boundary):
return x[0] == 0.0 and on_boundary
--
Anders
Attachment:
signature.asc
Description: Digital signature
References