something gets optimised away
Description
Details
Status | Assigned | Task | ||
---|---|---|---|---|
Open | junge | T1843 µSpectre Release 0.9 β | ||
Resolved | junge | T1835 BUG: Test for small strain fails in release gcc, but not in gcc with RelWithDebInfo, nor with gcc-debug nor clang |
Event Timeline
Can't reproduce this on other computers. have to recheck whether this problem even exists.
Figured it out:
In the case of linear problems, at the end of the cg solv step, we are at the final solution, but the simple convergence test (checking the increment in strain) is not yet triggered.
The second time around, the cg is called with an approximately zero right-hand side. This has a hard time converging, because were checking for |r|/|b| < tol, and |b| is close to zero. In the case of gcc on one of my computers, |b| was exacly zero and boom.
The correct way of handling it is to check convergence on the strain increment, yes, but more importantly we can directly compare the stress divergence to a tolerance.
Now the solvers also take a parameter equl_tol short for equilibrium tolerance, and as a result, the linear cases now converge in one step. Fixed in commit 7058c3ceeeab129d23d1da5b9f48a71e3a2ffe92