dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #24332
Re: [Branch ~dolfin-core/dolfin/logg] Rev 6153: Add set_marker function to both MeshFunction and MeshMarkers to make
On Wednesday August 31 2011 23:39:46 Anders Logg wrote:
> On Wed, Aug 31, 2011 at 11:36:30PM -0700, Johan Hake wrote:
> > On Wednesday August 31 2011 23:16:15 Anders Logg wrote:
> > > On Wed, Aug 31, 2011 at 03:16:23PM -0700, Johan Hake wrote:
> > > > Disclaimer: I have no clue of what you are doing :)
> > > :
> > > :-) I'm trying to get boundary indicators working again (in
> > >
> > > parallel). In the process, I'm making some changes and extensions that
> > > were suggested (not using MeshData as primary storage). The changes
> > > involve the addition of two new classes: MeshDomains and MeshMarkers
> > > (used internally by MeshDomains but also useful in itself). Will
> > > describe this all in more detail once it's working.
> >
> > Ok.
> >
> > > > If you want to expose 'set' to Python you rather choose another
> > > > name...
> > > >
> > > > set_one, set_value?
> > >
> > > I suspected as much but couldn't figure out why. So why?
> >
> > Well, it is probably not that bad after all. I just recall set not beeing
> > used because it is a reserved word in Python in matplotlib. But it looks
> > like it has changed to actually using set (resembles set in matlab),
> > instead of setp which they had previously...
>
> How can something used in matplotlib have any effect on member
> functions in the MeshFunction class?
It just triggered some assosiations of good practice!
> Anyway, I'll change it to set_value. We already have set_all so it's a
> better match.
Ok.
Johan
> --
> Anders
>
> > > The important point is not the set function but the set_marker
> > > function that needs to exist in both MeshFunction and MeshMarkers to
> > > get a template function to run with both so we avoid reimplementation
> > > of that function. Then it felt natural to add a set function as well.
> >
> > Ok.
> >
> > Johan
References