← Back to team overview

dolfin team mailing list archive

Re: MeshDomain

 

Because of the circular depencency and reference counts not becoming zero?
It could be a weak pointer:
http://www.boost.org/doc/libs/1_53_0/libs/smart_ptr/weak_ptr.htm

Martin


On 11 February 2013 13:02, Anders Logg <logg@xxxxxxxxx> wrote:

> On Mon, Feb 11, 2013 at 09:00:20AM +0100, Johan Hake wrote:
> > I am adding some functionality to MeshDomains, (actually to SubMesh,
> > which soon also propagates MeshDomains to the new mesh), and wonder if
> > there where any good reasons why a MeshDomain does not have a pointer to
> > the parent mesh?
> > If such was provided during construction we could skip the annoying mesh
> > argument in:
> >  facets_domains = mesh.domains().facet_domains(mesh)
>
> Feel free to add it if it is useful. At the time of implementation, I
> wanted to avoid a pointer to the parent to keep the number of pointers
> floating around at a minimum (especially in this case since it can't
> be a shared pointer).
>
> --
> Anders
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References