# Tag Info

0

You may take a look at Peter Gottschling's Discovering Modern C++, especially chapter 7, where Mario Mulansky (one of the authors of odeint) implements a generic ODE Solver (using Runge-Kutta algorithms and C++11/14). To the best of my knowledge, the second version of the book will be published within the next months and covers C++17 and C++20. Another ...

1

If I translate this problem into my language correctly, you have a Hermitian parameter-dependent matrix $A(t)$; you diagonalize various nearby samplings $A(t_1), A(t_2), A(t_3), \dots$ (so that the matrix changes only slightly between one and the next), and you wish to sort eigenvalues and eigenvectors consistently so that they vary 'smoothly' between nearby ...

1

I had the same problem when computing Berry-curvature related quantities within Kubo-formalism. I think the best way to solve your problem is to determine the band index by the eigenvectors. You could pin down your eigenvalues to symmetry properties of the eigenvectors, as these values vary smoothly (or are even constant) with r. If you would jump between ...

1

I won't complain about the formalism - I don't know if it will work. At the moment, however, it definetely does not work because your action is always 0: np.append does not append the element, it returns an array with the element appended. So your tot array is always empty: change the line to: tot=np.append(tot, .... ) or use an array-like formalism (much ...

2

I will point out that in order to solve any functional minimization problem, you need to specify initial conditions. In this case the minimization corresponds to a 2nd order system and so you must specify the initial and end values of the motion, or the initial value and the first derivative (or any other pair of conditions you like really). Without this, it'...

1

You should try using the scale parameter of quiver and play around with that to decrease the arrow length. If you want a picture that resembles the image you linked you could also look into using plt.streamplot() to avoid the clutter that plotting all the vectors individually brings with it.

Top 50 recent answers are included