On Mon, Jun 16, 2008 at 1:16 PM, Roy Stogner <[EMAIL PROTECTED]> wrote: > >
[crazy if test snipped] > > Adding more parenthesis won't help this, but fixing the parentheses > that are already there might. On first glance it looks to me like > this line isn't just uncommented, it's wrong. I'd say that we can't Huh, so maybe Derek's right and the compiler warnings are actually useful after all ... ;-) > How's this, for both code and comments? > > // If the neighbor will be equally or less refined than > // we are, then we will not become an unrefined island. > // So if we are still considering h refinement: > if (h_flag_me && > // If our neighbor is already at a lower level, > // it can't end up at a higher level even if it > // is flagged for refinement once > ((neighbor->level < my_level) || > // If our neighbor is at the same level but isn't > // flagged for refinement, it won't end up at a > // higher level > ((neighbor->active()) && > (neighbor->refinement_flag() != Elem::REFINE)) || > // If our neighbor is currently more refined but is > // a parent flagged for coarsening, it will end up > // at the same level. > (neighbor->refinement_flag() == Elem::COARSEN_INACTIVE))) > { > // We've proven we won't become an unrefined island, > // so don't h refine to avoid that. > h_flag_me = false; > > // If we've also proven we don't need to p refine, > // we don't need to check more neighbors > if (!p_flag_me) > break; > } Looks good; I'm a big fan of the "in-line" comments for these hairy if() tests. -- John ------------------------------------------------------------------------- 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