So... I added a function to BoundaryInfo about a week ago to build the node list from the side list. It works really well... but I just ran into a snag that I think others might hit and I wanted some input on the proper fix. What I'm doing is looping over that generated node list in order to set Dirichlet BCs. The problem comes in parallel... for me that node list contained nodes that weren't owned by the local processor. This led to setting the same entry in a parallel vector from more than one processor... which really didn't work out well (I'm still not sure if one of the entries was garbage... or if it was just random as to which entry was ultimately chosen... but it was bad). It took me all afternoon yesterday to figure this out...
One fix for this is just for me to verify that the nodes I'm using from that node list are owned by the local processor before I try to do anything with them (indeed this was my initial fix). But after thinking about this a bit... I'm worried that other people might run into the same issue... Another option is to only add nodes to the nodelist if they are owned by the local processor. Indeed, this works well... but I'm worried about what happens with repartitioning. If the ownership of a node suddenly changes... the node list is now out of date. What's really bad is that another call to build_node_list_from_side_list() _won't_ fix it... because it just _adds_ nodes to the list. One fix for that issue is to clear the node list before adding them... that way you can guarantee that no off-processor nodes are in the list after a call to the function. Unfortunately... this has the side effect of removing any nodes from the list that you've manually added (that aren't associated with the side list). I don't expect that to be too much of an issue... if you're trying to automatically generate the node list... then you probably aren't manually adding things to it... but I can see instances in my own applications where it might happen. Yet another option is to make a completely different list for the autogenerated node list. This has the downside that you can't write cool generic code to deal with the nodes in BoundaryInfo... as you have to essentially special case the ones that get automatically generated versus the ones that you add manually. Finally.... I could just leave it as is... and put a big warning in the documentation for the function saying that nodes owned by other processors might get added to the list... so make sure that you are careful about how you use the nodes in the list. What do you guys think? Can you see another (possibly better) option? Derek
------------------------------------------------------------------------------
_______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel