On Mon, 16 Jun 2008, John Peterson wrote: > This one isn't too bad b/c there are only && and != but you get the idea. > > mesh_refinement_smoothing.C, line 161 > > if (node0 != childnode0 && node0 != childnode1 > && node1 != childnode0 && node1 != childnode1) > break; > > but the compiler might complain?
Oh, this one just looks confusing because C++ doesn't make it easy to set up a statement like "if (nodes.intersection(childnodes).empty)" There ought to be a comment here explaining *why* we're breaking in that case, though, especially since this code is now a year old and I had forgotten why... How about: // If elem does not share this edge with its ancestor p, // refinement levels of elements sharing p's edge are not // restricted by refinement levels of elem. Furthermore, // elem will not share this edge with any of p's ancestors, // so we can safely break out of the for loop early. if (node0 != childnode0 && node0 != childnode1 && node1 != childnode0 && node1 != childnode1) break; --- Roy ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel