<a name="Results"></a> <h1>Results</h1>
-The explicit Euler time stepping scheme ($\theta=0$) performs adequately for the problems we wish to solve. Unfortunately, a rather small time step has to be chosen due to stability issues --- $k\sim h/10$ appears to work for most the simulations we performed. On the other hand, the Crank-Nicolson scheme ($\theta=\frac{1}{2}$) is unconditionally stable, and (at least for the case of the 1D breather) we can pick the time step to be as large as $25h$ without any ill effects on the solution. The impicit Euler scheme ($\theta=1$) is "exponentially damped," so it is not a good choice for solving the sine-Gordon equation, which is conservative. However, some of the damped schemes in the continuum that is offered by the $\theta$-method were useful for eliminating spurious oscillations due to boundary effects.
+The explicit Euler time stepping scheme ($\theta=0$) performs adequately for the problems we wish to solve. Unfortunately, a rather small time step has to be chosen due to stability issues --- $k\sim h/10$ appears to work for most the simulations we performed. On the other hand, the Crank-Nicolson scheme ($\theta=\frac{1}{2}$) is unconditionally stable, and (at least for the case of the 1D breather) we can pick the time step to be as large as $25h$ without any ill effects on the solution. The implicit Euler scheme ($\theta=1$) is "exponentially damped," so it is not a good choice for solving the sine-Gordon equation, which is conservative. However, some of the damped schemes in the continuum that is offered by the $\theta$-method were useful for eliminating spurious oscillations due to boundary effects.
-In the simulations below, we solve the sine-Gordon on the interval $\Omega = [-10,10]$ in 1D and on the square $\Omega = [-10,10]\times [-10,10]$ in 2D. In each case, the respective grid is refined uniformly 6 times ($\Rightarrow h\sim 2^{-6}$).
+In the simulations below, we solve the sine-Gordon on the interval $\Omega =
+[-10,10]$ in 1D and on the square $\Omega = [-10,10]\times [-10,10]$ in 2D. In
+each case, the respective grid is refined uniformly 6 times, i.e. with $h\sim
+2^{-6}$.
-<h3>An (1+1)D Solution</h3>
-The first example we discuss is the so-called 1D (stationary) breather solution of the sine-Gordon equation. The breather has the following closed-form expression:
+<h3>An (1+1)-d Solution</h3>
+The first example we discuss is the so-called 1D (stationary) breather
+solution of the sine-Gordon equation. The breather has the following
+closed-form expression, as mentioned in the Introduction:
\f[
u_{\mathrm{breather}}(x,t) = -4\arctan \left(\frac{m}{\sqrt{1-m^2}} \frac{\sin\left(\sqrt{1-m^2}t +c_2\right)}{\cosh(mx+c_1)} \right),
\f]
\image html step-25.1d-breather.gif "Animation of the 1D stationary breather." width=5cm
-Another way to visualize the (1+1)D solution is to use the output from the DataOutStack object to produce the space-time plot below instead of the animation above.
+Though not shown how to do this in the program, another way to visualize the
+(1+1)-d solution is to use output generated by the DataOutStack class; it
+allows to "stack" the solutions of individual time steps, so that we get
+2-dimensional space-time graphs from 1-dimensional time dependent
+solutions. This produces the space-time plot below instead of the animation
+above.
\image html step-25.1d-breather_stp.png "A space-time plot of the 1D stationary breather." width=5cm
-Furthermore, since the breather is an analytical solution of the sine-Gordon equation, we can use it to validate our code, at least in 1D. For the simulation shown in the two images above, the $L^2$ norm of the error in the finite element solution at each time step remained on the order of $10^{-2}$. Hence, we can conclude that the numerical method has been implemented correctly in the program.
-
-<h3>A few (2+1)D Solutions</h3>
-The only analytical solution to the sine-Gordon equation in (2+1)D that can be found in the literature is the so-called kink solitary wave. It has the following closed-form expression:
-\f[
-u_{\mathrm{kink}}(x,t) = -4\arctan \left\{a_0\left[x\cos\vartheta+\sin\vartheta\left(y\cosh\lambda + t\sinh\lambda\right) \right]\right\},
-\f]
-where $a_0$, $\vartheta$ and $\lambda$ are constants. In the simulation below we have chosen $a_0=\lambda=1$. Notice that if $\vartheta=\pi$ the kink is stationary, hence it would make a good solution against which we can validate the program in 2D because no reflections off the boundary of the domain occur.
+Furthermore, since the breather is an analytical solution of the sine-Gordon
+equation, we can use it to validate our code, although we have to assume that
+the error introduced by our choice of Neumann boundary conditions is small
+compared to the numerical error. Under this assumption, one could use the
+VectorTools::integrate_difference function to compute the difference between
+the numerical solution and the function described by the
+<code>ExactSolution</code> class of this program. For the
+simulation shown in the two images above, the $L^2$ norm of the error in the
+finite element solution at each time step remained on the order of
+$10^{-2}$. Hence, we can conclude that the numerical method has been
+implemented correctly in the program.
+
+
+<h3>A few (2+1)-d Solutions</h3>
+
+The only analytical solution to the sine-Gordon equation in (2+1)-d that can be found in the literature is the so-called kink solitary wave. It has the following closed-form expression:
+ @f[
+ u(x,y,t) = 4 \arctan \left[a_0 e^{s\xi}\right]
+ @f]
+with
+ @f[
+ \xi = x \cos\vartheta + \sin(\vartheta) (y\cosh\lambda + t\sinh \lambda)
+ @f]
+where $a_0$, $\vartheta$ and $\lambda$ are constants. In the simulation below
+we have chosen $a_0=\lambda=1$. Notice that if $\vartheta=\pi$ the kink is
+stationary, hence it would make a good solution against which we can
+validate the program in 2D because no reflections off the boundary of the
+domain occur.
The simulation shown below was performed with $u_0(x) = u_{\mathrm{kink}}(x,t_0)$, $\theta=\frac{1}{2}$, $k=20h$, $t_0=1$ and $t_f=500$. The $L^2$ norm of the error of the finite element solution at each time step remained on the order of $10^{-2}$, showing that the program is working correctly in 2D, as well as 1D. Unfortunately, the solution is not very interesting, nonetheless we have included a snapshot of it below for completeness.
\frac{m}{\sqrt{1-m^2}}
\frac{\sin\left(\sqrt{1-m^2}t_0\right)}{\cosh(mx_2)} \right),
\f]
-where $x=(x_1,x_2)\in{R}^2$, $m=0.5(<1)$ as in the 1D case we discussed
+where $x=(x_1,x_2)\in{R}^2$, $m=0.5<1$ as in the 1D case we discussed
above. For the simulation shown below, we have chosen $\theta=\frac{1}{2}$,
$k=10h$, $t_0=-5.4414$ and $t_f=2.7207$. The solution is pretty interesting
--- it acts like a breather (as far as the pictures are concerned); however,
-it appears to break up and reassemble, rather than just oscillate. Naturally,
-the are things in the animation that can not be explained in a few words due
-to the fact that this initial condition is not an analytical solution to the
-sine-Gordon equation.
+it appears to break up and reassemble, rather than just oscillate.
\image html step-25.2d-pseudobreather.gif "Animation of a 2D pseudobreather." width=5cm
-<h3>Future work</h3>
-Time-adaptive grids would likely be useful when solving a problem like this one (especially in the case of a traveling wave). However, due to the complexity of their implementation they are better left for another day.
-
-
<a name="extensions"></a>
<h3>Possibilities for extensions</h3>
u_0(x,y) = \cos\left(\frac x2\right)\cos\left(\frac y2\right)
@f]
if $|x|,|y|\le \frac\pi 2$, and $u_0(x,y)=0$ outside this region.
+
+Beyond this, clearly adaptivity (i.e. time-adaptive grids) would be of
+interest to problems like these. Their complexity leads us to leave this out
+of this program again, though the general comments in the introduction of @ref
+step_23 "step-23" remain true.
+
+
+