On Thu, 30 Sep 2010, David Andrs wrote:

Roy Stogner <[email protected]> wrote on 09/30/2010 11:29:39 AM:

> My mistake - only one other function needs it,
> BoundaryInfo::side_with_boundary_id()

I looked at this function, but I cannot use the same approach as for
boundary_id(). This one is using _boundary_side_id mapping of elem
-> (side, bnd_id). However, when I refine the mesh, there are no
additional entries for newly created elements like for nodal ones in
_boudary_node_id (unless I'm supposed to call something in order to
get it, but I doubt that, since add_side has an assert for
elem->level() == 0). With these new entries, side_with_boundary_id()
should work with one little modification. Thus, the fix would have
to change adding and removing sides, where I could use the
above-mentioned approach.

Or is there another way how to achieve this?

This is trickier, yes, but I think the most efficient way to handle it
would be to leave boundary ids defined on top level elements, and just
add some checks before "return e.first->second.first;"  (who says C++
isn't intuitive!)

Something like the attached (untested!) patch.
---
Roy
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to