On Wed, 15 May 2013 11:40:25 +0100
"Garth N. Wells" <[email protected]> wrote:
> On 15 May 2013 11:23, Anders Logg <[email protected]> wrote:
> > On Wed, May 15, 2013 at 10:48:31AM +0100, Garth N. Wells wrote:
> >> Chris and I are working on IO (including parallel) via HDF5 for
> >> mesh data structures. An issue that I've run into before and which
> >> is making things complicated now are the circular dependences in
> >> the Mesh class.
> >>
> >> Every Mesh has a MeshDomains object and a MeshData object.
> >> MeshDomains stores a reference to its Mesh, and it stores
> >> MeshFunctions, that hold a shared_ptr to a Mesh (it also has
> >> MeshValueCollections which we'll probably also let store a pointer
> >> to the Mesh).
> >
> > We should strive to avoid this (the owned object having a pointer to
> > the owner), but it often creeps in for convenience.
> >
> >> This all makes memory management complicated because the objects
> >> are constructed with the Mesh '*this' object, and leads to a lot
> >> of 'no deleter' shared pointers. Since MeshDomains are always
> >> associates with a Mesh and a Mesh always has a MeshDomains object,
> >> any objections to just using plain STL vectors to hold the
> >> MeshDomain data?
> >
> > What would the changes be in the interface?
> >
> 
> There will be some internal changes, but I expect very little or
> nothing that the user will see. The only visible changes will be in
> the MeshDomains interface, which I've never used directly from
> application-level code.

What about
  facet_domains = mesh.domains().facet_domains()
to access facet markers stored within mesh?

Jan

> 
> Garth
> 
> > --
> > Anders
> _______________________________________________
> fenics mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics

_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to