On Tue, 5 Mar 2013, Robert wrote:

> I am currently catching errors due to element inversion (det F < 0)
> during assembly. If such an error occurs I want to reduce the timestep
> and try again.
> This works well for a single process. When trying to run the whole
> thing in parallel I am running into trouble, because usually just one of
> the processes has an inverted element and the whole thing deadlocks.
> Does anyone know how to handle this situations?

Very very carefully.  ;-)

Basically you need to make sure there's no parallel communication
inside your try block (easy enough for typical loops over elements),
then have your catch block set a "caught_exception" flag from false to
true, then CommWorld.max(caught_exception) before testing it in your
time stepping heuristic.

We do the exact same thing (to handle potentially singular variable
transformations rather than potentially singular element mappings) in
an application code here, but I'm afraid I don't have any open source
examples to share.

Curious: what exception specification are you catching?  In hindsight
I realize that the mapping routines should be throwing a runtime_error
subclass rather than a logic_error subclass, but it's probably too
late to change that without breaking codes like yours.
---
Roy

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to