Isn't the problem here that the MeshFunction cell_domains that is built from the markers info get cached the first time you create it? If you update markers I think you can explicitly destroy it and recreate the Mesh Function.
Johan On May 17, 2013 5:23 PM, "Garth N. Wells" <gn...@cam.ac.uk> wrote: > Is anyone making much use of MeshDomains? I'm looking at the code, and > it's really ropy. The essence of the problem is that it permits two > ways of doing the same thing, and if one does both it's ambiguous what > really happens. For example, the code in > MeshDomains::cell_domains(...) has > > // Create markers if mesh collection present > if (!_markers[D].empty() and !_cell_domains) > { > .... > } > > return _cell_domains; > > Here are two scenarios for which I would expect the same outcome, but > which would in fact differ because of the above code: > > 1. I have a Mesh that has no 'cells domains', and I go and add > markers. Then I get 'A' back from MeshDomains::cell_domains. > > 2. I have a Mesh that has 'cells domains' (which I don't know because > it happened to be embedded in a mesh file that I've read in), and I go > and add markers. Then I get 'B' back from MeshDomains::cell_domains (A > \ne B). > > Garth > _______________________________________________ > fenics mailing list > fenics@fenicsproject.org > http://fenicsproject.org/mailman/listinfo/fenics >
_______________________________________________ fenics mailing list fenics@fenicsproject.org http://fenicsproject.org/mailman/listinfo/fenics