next up previous contents index
Next: Classical Wave Equation; Up: Numerical Methods Previous: Finite Difference Approximation

Klein-Gordon Equation; Numerical Method

  The nonlinear Klein-Gordon equation

 

is a good place to start our discussion, since the classical wave equation and the linear Klein-Gordon equation can both be treated as special cases of the function . Notice that the phase velocity is missing from the equation; this corresponds to a choice of units for which which v=1. Substituting eq:Der2E into eq:nonlinKGE, setting , and rearranging terms, we obtain the following equation for the row of the U matrix in terms of the and rows:

  Ablowitz, Kruskal and Ladik showed that this equation can be stabilized by setting r=1 and using an average of the spatial coordinates for the function, [1]

 

This choice of and not only reduces the number of computations, it also separates the U matrix into two non-interacting grids: and , i.e., n and j have the same parity or opposite parity. This reduces the number of calculations by a factor of two since only the even-even and odd-odd grid points need to be calculated. The numerical values for the current wavefunction and the previous wavefunction are stored in two global CUPS DVectors named yVec and yPrevVec , respectively. The corresponding x-values are stored in another DVector, xVec .


Wolfgang Christian
Fri Apr 14 08:22:30 EDT 1995