On Wed, Sep 03, 2008 at 08:43:15AM -0600, Ostien, Jakob T wrote: > Hi, > > I have a MeshFunction that I am using to assemble SubDomains, but when I put > it into the constructor of my NonlinearProblem, it trips the assert in > MeshFunction.h line 90 that says > > dolfin_assert(&entity.mesh() == _mesh); > > And this is puzzling because when I add two statements to see what is > different about the locally owned mesh and entity mesh, e.g. > > (&entity.mesh())->disp(); > _mesh->disp(); > > The results _are_ identical. > > Has anyone else seen this and/or know what to do about it? > > Jake
The assertion fails because the meshes are not the same mesh (the pointers are different), but it seems they contain the same data which is why you get the same output when calling disp. The assertion is there to protect users from evaluating a MeshFunction defined on one Mesh on another Mesh. A MeshFunction is always tied to a particular mesh. Maybe you are copying the mesh somewhere in your code? -- Anders
signature.asc
Description: Digital signature
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
