From: Raimar S. <rai...@ui...> - 2012-04-23 11:49:50
|
Dear András, thank you for adjusting and merging the fix. On Saturday 21 April 2012 10:28:58 you wrote: > Great! Thanks a lot for tracking this down. But this means that the first > timestep after a continuation was always erroneous so far (that is, if the > system time development had *Exact* part)? And this eventually produced an > overflow when the trajectory was continued after long enough a time? The stack when psi first gets corrupted is something like (left out some indirections): quantumtrajectory::evolve -> MCWF_Trajectory<RANK>::step -> MCWF_Trajectory<RANK>::coherentTimeDevelopment -> Evolved<A>::step -> evolved::details::apply -> gsl_odeiv_evolve_apply -> MCWF_Trajectory<RANK>::derivs -> Hamiltonian::addContribution -> BinarySystem::addContribution -> Hamiltonian<2,ONE_TIME>::addContribution Here, after the call to addContribution of the binary Hamiltonian (the frees are ok in the first step, why?), the maximum absolute value in dpsidt is 3.5e+130. I would think this is because the transformed non-hermitian Hamiltonian has some huge elements as we evaluate U(t) for large t. These large values carry on to psi as the odeiv stepper takes the huge derivatives and updates the state (max is 4e+126). The next time derivs is called, the maximum absolute value of dpsidt is already on the order of 3e+257 and psi gets updated to something on the order of 3e+257. Then first dpsidt and afterwards psi overflows. What I don't understand is why derivs gets called three times with different values of t (t=30, t=30.00014 and t=30.00021) before dpsidt overflows, but each time tIntPic0_=0. Shouldn't tIntPic0_ get updated? And the question remains if continuation always was erroneous. I would argue that as long as the stepper makes it to the first update of tIntPic0_ without overflow, everything should be fine except if rounding errors skew the results. Physically large values of t should be legal, the problems arise if we cannot represent the transformation numerically accurate. Best regards Raimar |