← Back to team overview

dolfin team mailing list archive

Re: SubDomain::mark in python

 

On Fri, Apr 25, 2008 at 07:05:09PM +0200, Martin Sandve Alnæs wrote:
> 2008/4/25, Anders Logg <logg@xxxxxxxxx>:
> > On Fri, Apr 25, 2008 at 06:07:54PM +0200, Martin Sandve Alnæs wrote:
> >  > I have this code:
> >  >
> >  > boundary_domains = MeshFunction("int", mesh)
> >
> >                                   ~~~~
> >  Should be "uint".
> >
> >  And probably also
> >
> >   boundary_domains = MeshFunction("uint", mesh, mesh.topology().dim() - 1)
> 
> Thanks. It seemed to work fine without that last argument though...

Strange that it works. You should need to specify the dimension of the
MeshFunction.

What dimension do you get when doing

  boundary_domains.dim()?

> I've implemented a linear elasticity demo using SFC/PyDOLFIN, with a
> combination of Dirichlet conditions on all vector components,
> Dirichlet conditions on a single vector component, homogeneous Neumann
> conditions, homogeneous Neumann conditions, non-homogeneous Neumann
> conditions including both prescribed traction (dot(t,v)*ds) and
> prescribed pressure (dot(p*n,v)*ds), plus body forces. It all seems to
> work nicely, although I haven't verified it rigorously.

Nice!

-- 
Anders


References