← Back to team overview

dolfin team mailing list archive

Re: bc.domain

 

On Thursday June 3 2010 08:09:03 Anders Logg wrote:
> On Thu, Jun 03, 2010 at 07:59:30AM -0700, Johan Hake wrote:
> > On Thursday June 3 2010 04:28:19 Anders Logg wrote:
> > > On Thu, Jun 03, 2010 at 01:24:30PM +0200, Marie Rognes wrote:
> > > > On 03. juni 2010 13:22, Anders Logg wrote:
> > > > > On Thu, Jun 03, 2010 at 01:16:27PM +0200, Marie Rognes wrote:
> > > > >> What happened to the member variable 'domain' in DirichletBC in
> > > > >> bcs.py ?
> > > > > 
> > > > > It was replaced by 'domain_args' to handle MeshFunctions in
> > > > > homogenize().
> > > > 
> > > > So, domain == domain_args[0] ?
> > > 
> > > Yes, if len(domain_args) == 1. Otherwise, it will be of length 2 and
> > > contain the MeshFunction and the domain number.
> > 
> > I think I have said this before...
> > 
> > Where is the docstring?
> > 
> > :)
> > 
> > Johan
> 
> I'm not sure this should be documented in the docstring since this is
> really an internal trick of the Python DirichletBC class. So the
> problem might really be the variable name (missing underscore).

Well, something is better than nothing. Now it looks like:

class DirichletBC(cpp.DirichletBC):

    def __init__(self, *args):
        "Create Dirichlet boundary condition."

Which is really nothing. A user need to look in a demo to understand how to 
use it. Especially with the magical AutoSubDomain feature...

Johan



Follow ups

References