On Wed, 1 Feb 2012, John Peterson wrote:
On Wed, Feb 1, 2012 at 11:56 AM, Kirk, Benjamin (JSC-EG311)
<benjamin.kir...@nasa.gov> wrote:
Perhaps. How about replicating the behavior of libmesh_do_once, but
with a static std::set<Elem*> (and corresponding mutex to avoid
threaded STL problems) rather than with a single static bool? Then
you get one printout per element which had trouble converging. In
AMR/C runs you might get a few false negatives (a newly-refined
distorted child element gets allocated at exactly the same memory
address as a different, previously-coarsened-away distorted child) or
false positives (a previously-coarsened-away distorted child gets
created by re-refining its parent, but gets allocated a new memory
address) but it's still probably a uniformly better solution.
I strongly second that suggestion.
But at a minimum I'd say leave the print as is unless NDEBUG is defined so
that devel mode continues to be noisy. And if the static bool case is
adopted then the error message might read something like
"at least one element failed to converge... rerun without NDEBUG..."
Roy's suggestion seems way over-complicated and potentially buggy to
me just to avoid some print statements!
I could encapsulate it for you easily enough... except that I can't
figure out how to do so without sucking a threads.h dependency into
whatever header does the encapsulation. So, *not* libmesh_common.h...
I prefer Ben's approach but note that these print statements are not
actually about failure of the Newton scheme, just that it took more
than 10 iterations to do so. If Newton actually fails to converge and
secure==true (it is by default) then we error out regardless of
opt/devel/dbg.
Ben's "at least one element" approach works for me.
---
Roy
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel