Cyclops¶
This code implements the Asymptotic Parallel in Time (APinT) algorithm for the 1-D rotating shallow water equations, following Haut and Wingate (2014).
Control and parameterisation of the code is through the cyclops_control library.
The structure of the program is based on the Fourier Spectral code Morgawr, by AGP. A significant amount of the numerical code is courtesy of Dr. Terry Haut of LANL.
Algorithm¶
- Set up relevant (Python) objects for computation to progress (spectral_toolbox, control, exponential_integrator)
- Call solver method for timestepping
- Output writing
-
cyclops.APinT_solver(control, st, expInt, u_init)[source]¶ Implements the Asymptotic Parallel in Time algorithm.
This methods proceeds by performing a coarse approximation using the coarse propagator which is then refined (in theory, in parallel) by the fine propagator. It differs from standard parareal methods by the averaging over the fast waves which is performed in the coarse timestep. The fine timestep solves the full equations to the desired level of accuracy.
Implementation follows:
\[U_{n+1}^{k+1} = G(U_{n}^{k+1}) + F(U_{n}^{k}) - G(U_{n}^{k})\]where G refers to the coarse propagator and F to the fine propagator. n is the timestep k is the current iteration number. Converges to the accuracy of the fine propgator.
Parameters
- control : a control object
- st : the spectral toolbox object
- expInt : an exponential integrator object
- u_init : the initial conditions in Fourier space, np.array(3,Nx), (u,v,h)
Returns
- errs : A tuple containing lists of the L_infty and L_2 errors vs iteration, respectively
- U_hat_new : The solution after convergence (np.array(Nt, 3, Nx))
See Also
coarse_propagator, fine_propagator