0
$\begingroup$

I have a code I'm working on that involves solving a 1D Schrodinger equation using a Crank-Nicolson time step. The code is written in NumPy/SciPy, and I was doing a bit of profiling and discovered that the bulk of the simulation time is taken up with calls to the linear solver (spsolve in this case). I'm using a simple discretization such that my matrices are symmetric and tridiagonal, and I was wondering if anyone had tried doing things like implementing the Thomas algorithm directly and if this was able to beat spsolve.

$\endgroup$
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.