MADNESS  0.10.1
Evolve in time 3D heat equation with a linear term

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

\[ \frac{\partial u(x,t)}{\partial t} = c \nabla^2 u(x,t) + V_p(x,t) u(x,t) \]

If $ V_p = 0 $ time evolution operator is

\[ G_0(x,t) = \frac{1}{\sqrt{4 \pi c t}} \exp \frac{-x^2}{4 c t} \]

For non-zero $ V_p $ the time evolution is performed using the Trotter splitting

\[ G(x,t) = G_0(x,t/2) * \exp(V_p t) * G_0(x,t/2) + O(t^3) \]

In order to form an exact solution for testing, we choose $ V_p(x,t)=\mbox{constant} $ but the solution method is not limited to this choice.