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).

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?

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

Reply via email to