User-defined callback on Solver warning

Discussion in 'Simulation' started by Alex Ray, Feb 20, 2017.

  1. I'm using a custom warning callback for mju_user_warning, and while I can get it to fire for some errors (njmax, nconmax too small, etc), I've not been able to get it to fire for solver warnings.

    Even setting threshold to very small (0, 0.0001) or very large (100, 10000) and absurdly large time (timestep=0.5) and the simulation is doing completely crazy things, but still the warning does not fire.

    What are the conditions under which warnings are raised for solver convergence issues?
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    This is currently only supported in the CG solver. I have to add it to the other solvers. The trigger is that the norm of the residual gradient after "convergence" must be greater than 1.