The source is here.
- Points of interest
- application of a function of a function to exponentiate the potential
- use of a functor to compute the solution at an arbitrary future time
- convolution with the Green's function
- Background
This adds to the complexity of the other heat equation example by including a linear term. Specifically, we solve
If
time evolution operator is
For non-zero
the time evolution is performed using the Trotter splitting
In order to form an exact solution for testing, we choose
but the solution method is not limited to this choice.