V. EL PESO DE LAS ACTIVIDADES DE SERVICIOS
2. Servicios a la población residente
The main goal of this work is to design space-adaptive variational integrators. We fo- cused our attention on the analysis of the geometric aspects of such integrators, and their conservation and convergence properties. We were less concerned about the efficiency of our computations, and in fact we made little effort to optimize our codes. However, for completeness, in this section we present a preliminary analysis of the computational cost of our algorithms. We caution the reader that we implemented our algorithms in Math- ematica 8.0.4.0. Nevertheless, each of our implementations used a very similar level of optimization, so we believe that our comparative cost analysis below is instructive.
We performed a cost analysis of the computations presented in Section 6.3. We inves- tigated the average CPU time needed to perform one time step of the control-theoretic and Lagrange multiplier strategies, and the uniform mesh simulations. For concreteness we focused on the computations that used 4-th order integration in time. In the case of the Lagrange multiplier strategy, the most computationally expensive operation at each time step is solving the nonlinear system (2.5.11) corresponding to the augmented semi-discrete Lagrangian (4.2.60). For the control-theoretic strategy, at each time step one needs to solve the nonlinear system (4.1.18). Finally, in the case of the computations on a uniform mesh, the most expensive step is solving the nonlinear system (2.4.17). The average CPU times needed to perform those operations are depicted in Figure 6.5.1. We see that the computa- tional time scales linearly with the number of mesh points N, as expected. The deviation from linearity for larger N is likely caused by Mathematica’s memory management.
Even this simple analysis leads to interesting conclusions. The Lagrange multiplier strategy introduces additional variables and additional internal stages. As a consequence, the resulting nonlinear equations one needs to solve at each time step are much more com- plicated than in the case of uniform mesh computations. One could expect that this would make this approach too costly and inefficient. However, it turns out that the Lagrange multiplier strategy outperforms both the control-theoretic strategy and uniform mesh com- putations. The Lagrange multiplier strategy with N =15 yields a similar level of accuracy as computations on a uniform mesh with N =180 (cf. Figure 6.3.8). However, one step of the Lagrange multiplier strategy takes on average 0.5241s, whereas the uniform mesh sim- ulation requires 1.1965s when the 4-th order Gauss method is used, and 1.6584s when the
15 22 31 44 63 90 127 180 255 361 10−2 10−1 100 101 102
N
CPU time per step [s]
Lagrange multiplier, 4th order Lobatto IIIA−IIIB Control−theoretic, 4th order Gauss
Control−theoretic, 4th order Lobatto IIIA−IIIB Uniform mesh, 4th order Gauss
Uniform mesh, 4th order Lobatto IIIA−IIIB
~N ~N2
Figure 6.5.1: The average CPU time (in seconds) required to perform one time step of the computations.
4-th order Lobatto IIIA-IIIB method is used. Similarly, the Lagrange multiplier strategy with N =31 yields a comparable level of accuracy as the control-theoretic strategy with
N =90. However, one step of the Lagrange multiplier strategy takes 1.3447s, whereas one step of the control-theoretic strategy requires 1.418s when the 4-th order Gauss method is used, and 2.2247s when the 4-th order Lobatto IIIA-IIIB method is used. The Lagrange multiplier strategy has the added benefit of nearly preserving energy. Let us also note that the control-theoretic strategy itself outperforms uniform mesh computations. For instance, for N = 22 the control theoretic strategy gives a more accurate solution than a uniform mesh simulation for N = 90, but one step of the control-theoretic strategy takes 0.2542s (4-th order Gauss) and 0.3417s (4-th order Lobatto IIIA-IIIB), whereas the uniform mesh simulation requires 0.4975s and 0.6333s, respectively.
We used Newton’s method (by means of Mathematica’s FindRoot function) to solve the aforementioned nonlinear systems of equations. The efficiency of the nonlinear solve can be greatly improved by using the simplified Newton iterations appropriate for implicit Runge-Kutta methods (see [26]) and by taking advantage of the banded structure of the Jacobians for the systems in question.
Chapter 7
Lagrangians linear in velocities
In Chapter 4 we proposed two general ways to constructr-adaptive variational integrators for Lagrangian field theories, but we specialized our considerations to Lagrangian densities of the form (4.2.6). As a result, the corresponding semi-discrete Lagrangian (4.2.8) was quadratic in velocities and non-degenerate almost everywhere, and consequently we were able to apply standard techniques of variational integration. There are, however, many inter- esting degenerate field theories whose Lagrangian densities are linear inφt, for instance the
nonlinear Schrödinger, KdV, or Camassa-Holm equations. The semi-discrete Lagrangians for these theories will be linear in velocities, and little is known about variational integration of such systems (see [56], [65]). This is our main motivation for constructing higher-order variational integrators for Lagrangians linear in velocities. However, this topic is also in- teresting on its own, as there are many situations in which such Lagrangians arise—see Chapter 1. Therefore, even though related to the previous parts of the thesis, this chapter is independent and stands on its own.
Outline of the chapter
This chapter is organized as follows. In Section 7.1 we introduce a proper geometric setup and discuss the properties of systems linear in velocities which are important for further analysis of numerical integrators. In Section 7.2 we analyze the general properties of vari- ational integrators and point out how the relevant theory differs from the non-degenerate case. In Section 7.3 we introduce variational partitioned Runge-Kutta methods and discuss their relation to numerical integration of differential-algebraic systems. In Section 7.4 we present the results of our numerical experiments for Kepler’s problem, a system of two interacting vortices, and the Lotka-Volterra model.