Nov-23-2023, 12:23 PM
I added at line 16
print(sigma, n)and I ran the code with
python -W error
. The output shows where the warning occursOutput:...
-0.7000000000000153 -0.6000000000000156
-0.7000000000000153 -0.500000000000016
-0.7000000000000153 -0.40000000000001634
-0.7000000000000153 -0.3000000000000167
-0.7000000000000153 -0.20000000000001705
-0.7000000000000153 -0.10000000000001741
-0.7000000000000153 -1.7763568394002505e-14
Traceback (most recent call last):
File "/home/eric/Projets/Scratch/2023-01/paillasse/pf/sophiaphys.py", line 31, in <module>
sol=odeint(dSdx, S_0, x)
File "/usr/lib/python3/dist-packages/scipy/integrate/_odepack_py.py", line 247, in odeint
warnings.warn(warning_msg, ODEintWarning)
scipy.integrate._odepack_py.ODEintWarning: Excess work done on this call (perhaps wrong Dfun type). Run with full_output = 1 to get quantitative information.
λ
So the error occurs at some point where n is almost equal to 0. This may help find why the solver fails at this point.