Open Access
This article is

- freely available
- re-usable

*Geosciences*
**2019**,
*9*(5),
197;
https://doi.org/10.3390/geosciences9050197

Article

Numerical Simulation of Conservation Laws with Moving Grid Nodes: Application to Tsunami Wave Modelling

^{1}

Institute of Computational Technologies of Siberian Branch of the Russian Academy of Sciences, 630090 Novosibirsk, Russia

^{2}

Univ. Grenoble Alpes, Univ. Savoie Mont Blanc, CNRS, LAMA, 73000 Chambéry, France

^{3}

LAMA UMR 5127 CNRS, Université Savoie Mont Blanc, Campus Scientifique, 73376 Le Bourget-du-Lac CEDEX, France

^{4}

School of Mathematics, Statistics and Operations Research, Victoria University of Wellington, P.O. Box 600, Wellington 6140, New Zealand

^{5}

Department of Radiology, Medical Physics, Medical Center, Faculty of Medicine, University of Freiburg, 79106 Freiburg, Germany

^{*}

Author to whom correspondence should be addressed.

Received: 22 March 2019 / Accepted: 24 April 2019 / Published: 30 April 2019

## Abstract

**:**

In the present article, we describe a few simple and efficient finite volume type schemes on moving grids in one spatial dimension combined with an appropriate predictor–corrector method to achieve higher resolutions. The underlying finite volume scheme is conservative, and it is accurate up to the second order in space. The main novelty consists in the motion of the grid. This new dynamic aspect can be used to resolve better the areas with large solution gradients or any other special features. No interpolation procedure is employed; thus, unnecessary solution smearing is avoided, and therefore, our method enjoys excellent conservation properties. The resulting grid is completely redistributed according to the choice of the so-called monitor function. Several more or less universal choices of the monitor function are provided. Finally, the performance of the proposed algorithm is illustrated on several examples stemming from the simple linear advection to the simulation of complex shallow water waves. The exact well-balanced property is proven. We believe that the techniques described in our paper can be beneficially used to model tsunami wave propagation and run-up.

Keywords:

conservation laws; finite volumes; conservative finite differences; moving grids; adaptivity; advection; shallow water equations; wave run-upMSC:

74S10 (primary); 74J15; 74J30 (secondary)## 1. Introduction

The main goal of the present manuscript consists in introducing to the tsunami modelling community some state-of-the-art numerical methods for solving nonlinear hyperbolic equations, which allow the use of the available degrees of freedom in the (nearly-) optimal way. Until the last 15 years, tsunami wave modelling has been done in the framework of Nonlinear Shallow Water Equations (NSWE). The numerical simulations have been performed by practitioners essentially with several well-established community codes. To give a few examples, let us mention the code TUNAMI [1] based on a conservative finite difference leap-frog scheme on staggered grids. This scheme approximates NSWE on real bathymetries. Another widely used code is MOST, which is based on the dimensional splitting method (This technique is also known as the alternating directions) [2,3]. We would like to mention also the software COMCOT, which is based on a modified leap-frog scheme discretizing NSWE in Cartesian and spherical coordinates [4]. Finally, in the Institute of Computational Technologies (SB RAS) an in-house software, MGC, based on the finite difference MacCormack scheme in spherical coordinates was developed as well [5].

A big boost in tsunami research happened after Tsunami Boxing day [6] due to the availability of real world data. After this Sumatra 2004 event, several studies questioned the importance of dispersive effects for transoceanic tsunami propagation [7,8,9]. Their conclusions were supported by comparisons of numerical results with field and DART buoy data. We can only mention that the importance of dispersive effects has been already highlighted in 1982 by Mirchina and Pelinovsky [10]:

The considerations and estimates for actual tsunamis indicate that nonlinearity and dispersion can appreciably affect the tsunami wave propagation at large distances.

One of the first tsunami numerical models including spherical effects and linear dispersive terms was TUNAMI-N2. A sensitivity study was performed in Reference [11] on the example of the Sumatra 2004 event. The reported results were in favor of including dispersive effects. Another Weakly Nonlinear Weakly Dispersive (WNWD) model was presented in Reference [12,13]. It was basically a spherical counterpart of the classical Peregrine system [14]. Let us mention also the study by Glimsdal et al. [15] where the importance of dispersion has been investigated numerically and the use of the Fully Nonlinear Weakly Dispersive (FNWD) model was recommended. Such FNWD spherical equations (with the horizontal velocity defined on a certain surface inside the fluid bulk) have been derived in Reference [16]; however, only WNWD numerical results were presented. In a recent work [17], a systematic derivation of spherical rotating FNWD (and WNWD) models have been performed and the so-called base model was derived, which incorporates many other models as particular cases. The reduction of spherical FNWD to WNWD models was illustrated, and several known models were recovered in this way. Finally, the fully nonlinear numerical results have been presented in Reference [18]. In particular, the importance of sphericity, Coriolis, and dispersion effects was thoroughly discussed. The numerical algorithm employed in Reference [18] is based on the splitting approach: An elliptic equation is solved to determine the non-hydrostatic pressure component, and an evolution system of hyperbolic equations with source terms is solved to advance in time the velocity and water height variables. The algorithm was implemented as an explicit two-step predictor–corrector scheme. The volume of publication [18] did not allow the authors to describe all details of the employed numerical method. Henceforth, if we adopt dispersive models for tsunami simulations (It seems now that future generation tsunami modelling codes will include at least some dispersive effects), there is a clear need in robust numerical methods to solve hyperbolic balance equations. The present manuscript should be considered as a tutorial-style article to introduce moving grid algorithms to the developers of future generation tsunami propagation codes.

The numerical simulation of conservation laws is one of the most dynamic and central parts of modern numerical analysis. The systems of conservation laws appear in many fields ranging from traffic modeling [19] to shallow water modelling [20] and compressible fluid mechanics [21]. The finite volume method was proposed in a pioneering work of S. Godunov [22,23] and developed later by Ph. Roe [24] and many other researchers (see Reference [25] for the current state of the art).

Nowadays, the complexity of the problems which arise in practice is such that we have to think about the optimal usage of available computational resources. In this way, the community came up with the idea of developing numerical methods on adaptive grids in order to have a higher resolution only where it is needed [26]. Historically, $hp$-adaptive methods were first developed for the Finite Element-type (FEM) discretizations [27] (including the newest discontinuous Galerkin discretizations [28]). The main advantage of FEM is that this method is quite flexible with respect to local approximation spaces, thus allowing for a relatively easy p-adaptivity. FEM was applied to hyperbolic problems under the guise of relaxation schemes [29]. Later h-adaptive methods have been adapted for finite volume methods as well [30]. However, the widely used approach nowadays consists in performing local grid refinement (or coarsening) with locally nested grids [31]. For instance, it has been successfully applied to tsunami propagation and run-up problems [32] as well as to more complex two-phase incompressible flows [33].

Adaptive mesh refinement techniques applied to the spatial variable after the computation of an approximate solution of the model equations at each time step usually consist of the following steps:

- Generation of a new spatial mesh according to prescribed adaptivity criteria;
- Reconstruction or interpolation of the numerical solution on the new mesh;
- Integration in time of the numerical solution on the new mesh.

The main disadvantages of this methodology is that the reconstruction of the numerical solution on the new mesh increases the complexity of the method and also reduces the accuracy of the method by adding more dissipation or dispersion to the solution. Moreover, the variable number of nodes represents some difficulties while implementing the algorithm on a computer. The underlying data structures have to be flexible enough to insert or to suppress some elements.

The approach we propose in this study is different and does not require an interpolation or reconstruction of the solution to the new mesh (a conservative interpolation is employed in Reference [34]). Although the proposed method is closer to the redistribution method proposed in References [34,35], it is simpler and more elegant at the level of the implementation details. Namely, it is based on the transformation of the model equations to some new equations of which the solutions are independent of the new mesh. Namely, the method uses the same number of discretization points of the spatial mesh during the simulation, and the adaptivity is achieved by moving the grid nodes to the places indicated by the so-called monitor function. The adapted grid is obtained as a solution of an elliptic (or parabolic) problem, which ensures the smoothness of the obtained grid. The main idea behind the equidistribution principle is to distribute the nodes over the computational domain so that the measure of a cell times the value of the monitor function on it is approximatively constant [36,37]. The heart of the matter in the equidistribution method is the construction of a suitable monitor function. This method was described independently in the seminal paper of Reference [38] and later in Reference [39]. Numerous subsequent developments were published in recent references [40,41,42]. The review of earlier works on the adaptive grid generation can be found in References [43,44]. The “Holy Grail” in choosing the monitor function is to achieve ideally the reduction of the error in orders of magnitude when the discretization step $\mathsf{\Delta}x\phantom{\rule{4pt}{0ex}}\to \phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}}$, as illustrated in Reference [45]. The main advantages of the proposed approach include

- Conservation in space;
- Second-order accuracy (in smooth regions);
- TVD property for scalar problems;
- Well-balanced character;
- Preservation of the discrete conservation law in cell centers and cell interfaces.

The present manuscript sheds also some light on the hyperobolic part of the splitting approach we used earlier to simulate the fully nonlinear and weakly dispersive wave propagations [46].

For simplicity, we focus on one-dimensional cases only, and even in this simple case, some open problems are outlined throughout the manuscript. According to our knowledge, the pioneers in 1-D cases were the authors of References [47] (for nonlinear shallow water equations) and [48] (for gas dynamics). The generation of 2-D curvilinear adaptive grids is a relatively classical topic [49]. A rigorous definition of a curvilinear grid was given in Reference [50]. The generalization of the equidistribution method to two spatial dimensions was performed for the first time in Reference [51]. There are a few studies which report recent modern implementations on moving redistributed two-dimensional grids (see, for example, References [34,52,53,54]) with generalized monitor functions formalized in Reference [41]. Some approaches for the intercomparison of generated grids are described in Reference [55]. We refer also to Reference [56] for a recent review of moving grid techniques. The moving grid methods seem to be unavoidable in the modern numerical analysis. There are some classes of problems, which cannot be solved, in principle, with a fixed grid. To give an example, we can mention the class of problems involving moving boundaries such as free surface flows [57,58,59].

The discretization of the model equations is based on explicit, fully discrete predictor–corrector Finite Volume schemes that are accurate up to the second order in space. Predictor–corrector schemes have been introduced by MacCormack [60] and can be considered as a natural generalization of splitting schemes in higher spatial dimensions.

We have to mention that nonuniform grids can be used also to preserve some Lie symmetry group of the equation at the discrete level (see Section 3.2.2 in Reference [61] for a brief survey and the Burgers–Hopf equation example). Originally, this approach was proposed by Dorodnitsyn [62] and developed later in Reference [63]. In our study, the mesh motion is directed solely by the equidistribution principle as in Reference [34] without taking into account the symmetry considerations for the moment.

The present article is organized as follows. In Section 2, we discuss in all details the implementation of the algorithm for the linear advection equation. Then, we generalize it to the nonlinear case in Section 3 and the systems of conservation laws in Section 4. Some open problems are outlined in Section 5. Finally, the main conclusions and perspectives of our study are given in Section 6.

## 2. Linear Scalar Equation

In order to present the moving grid method, we shall start with the simplest scalar linear advection equation in this section and, then, we shall increase gradually the complexity by adding first the nonlinearities in the following section and moving to the systems by the end of our manuscript.

We pay special attention to the linear case for the following reasons:

- The main properties of the scheme are the most transparent in the linear case;
- The generalization to the nonlinear and vectorial cases will be easier once the linear case is fully understood. Therefore, it will allow us to go faster in the subsequent sections;
- An exhaustive error analysis is possible in the linear (and presumably only in the linear) case.

In order to construct an efficient finite volume scheme on a moving mesh, we have to choose first a robust and an accurate scheme on a fixed grid, which will be generalized later to incorporate the motion of mesh points. Such a scheme retained for our study is described in the next section.

#### 2.1. A Predictor–Corrector Scheme on a Fixed Uniform Mesh

Consider the following linear advection equation with a constant propagation velocity:
The subscripts in this study denote the partial derivatives, i.e., ${u}_{t}=\frac{\partial u}{\partial t}$, ${u}_{x}=\frac{\partial u}{\partial x}$, etc.

$${u}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}a\phantom{\rule{0.277778em}{0ex}}{u}_{x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0,\phantom{\rule{2.em}{0ex}}a\in \mathbb{R}.$$

We introduce a uniform discretization of the real space line $\mathbb{R}$ with nodes ${x}_{j}=j\phantom{\rule{0.166667em}{0ex}}\mathsf{\Delta}x$, where $\mathsf{\Delta}x>0$; $j\in \mathbb{Z}$ is the spatial discretization step, and for simplicity, we do not pay attention to the boundary conditions here. The interval ${C}_{j}=[{x}_{j},{x}_{j+1}]$ will be referred to as the cell ${C}_{j}$. The time step is denoted by $\tau $, and the discrete solution is computed at ${t}^{n}=n\tau $, $n\in {\mathbb{Z}}^{+}$. Equation (1) is discretized in space and time using an explicit fully discrete predictor–corrector scheme.
where $\tau $ is the time step. The intermediate quantities ${u}_{j\pm 1/2}^{*}$ are evaluated in the middle of the cells at ${x}_{j\pm 1/2}=\frac{{x}_{j}+{x}_{j\pm 1}}{2}={x}_{j}\pm {\textstyle \frac{1}{2}}\mathsf{\Delta}x$ and at time instances $t={t}^{n}+{\tau}_{j+1/2}^{*}$. Moreover, the following notations have been introduced in Equation (2):
We underline the fact that the parameter $\theta $ has not been fixed for the moment and that it may vary from one cell and one time layer to another one.

$$\frac{{u}_{j+1/2}^{*}-{u}_{j+1/2}^{n}}{{\tau}_{j+1/2}^{*}}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}a\phantom{\rule{0.277778em}{0ex}}{u}_{x,j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0,\phantom{\rule{2.em}{0ex}}\frac{{u}_{j}^{n+1}-{u}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}a\phantom{\rule{0.277778em}{0ex}}\frac{{u}_{j+1/2}^{*}-{u}_{j-1/2}^{*}}{\mathsf{\Delta}x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0,$$

$${u}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{u}_{j+1}^{n}+{u}_{j}^{n}}{2},\phantom{\rule{1.em}{0ex}}{u}_{x,j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{u}_{j+1}^{n}-{u}_{j}^{n}}{\mathsf{\Delta}x},\phantom{\rule{1.em}{0ex}}{\tau}_{j+1/2}^{*}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{\tau}{2}\phantom{\rule{0.277778em}{0ex}}\left(1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\theta}_{j+1/2}^{n}\right).$$

The predictor–corrector scheme in Euqation (2) can be recast as a one-step scheme by combining two equations together:
The last fully discrete scheme is a canonical form of all two-step explicit schemes for Equation (1), since many well-known schemes can be obtained from Equation (3) by carefully choosing the parameter $\theta $. For example,

$$\frac{{u}_{j}^{n+1}-{u}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}a\phantom{\rule{0.277778em}{0ex}}\frac{{u}_{j+1}^{n}-{u}_{j-1}^{n}}{2\mathsf{\Delta}x}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{\tau {a}^{2}}{2\mathsf{\Delta}x}\phantom{\rule{0.277778em}{0ex}}\left\{{\left((1+\theta ){u}_{x}\right)}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left((1+\theta ){u}_{x}\right)}_{j-1/2}^{n}\right\}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

**Lax–Wendroff scheme**[64] ($\theta =0$)

$$\frac{{u}_{j}^{n+1}-{u}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}a\phantom{\rule{0.277778em}{0ex}}\frac{{u}_{j+1}^{n}-{u}_{j-1}^{n}}{2\mathsf{\Delta}x}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{\tau {a}^{2}}{2\mathsf{\Delta}x}\phantom{\rule{0.277778em}{0ex}}\left\{{u}_{x,j+1/2}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{u}_{x,j-1/2}^{n}\right\}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

**First-order upwind**[65] ($\theta =\frac{1}{C}-1>0$) The number $C\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}a\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{0.277778em}{0ex}}{\displaystyle \frac{\tau}{\mathsf{\Delta}x}}<1$ is the famous Courant–Friedrichs–Lewy number [66], which controls the stability of the upwind scheme.

$$\frac{{u}_{j}^{n+1}-{u}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{a+\left|\phantom{\rule{0.166667em}{0ex}}a\phantom{\rule{0.166667em}{0ex}}\right|}{2}\phantom{\rule{0.277778em}{0ex}}{u}_{x,j-1/2}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{a-\left|\phantom{\rule{0.166667em}{0ex}}a\phantom{\rule{0.166667em}{0ex}}\right|}{2}\phantom{\rule{0.277778em}{0ex}}{u}_{x,j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

**Lax–Friedrichs scheme**[67] ($\theta =\frac{1}{{C}^{2}}-1>0$)

$$\frac{{u}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{1}{2}({u}_{j+1}^{n}+{u}_{j-1}^{n})}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}a\phantom{\rule{0.277778em}{0ex}}\frac{{u}_{j+1}^{n}-{u}_{j-1}^{n}}{2\mathsf{\Delta}x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

However, the schemes listed above are not suitable for accurate simulations, since the first order upwind and Lax–Friedrichs schemes are too diffusive in practice and the Lax–Wendroff scheme is not monotonicity preserving. A good solution consists in choosing the parameter $\theta $ adaptively. In a previous work [68], the following strategy was proposed:
with ${\theta}_{0}:={\displaystyle \frac{1}{C}}-1>0$, $s:=\mathrm{sign}\left(a\right)$, ${\xi}_{j+1/2}^{n}:={\displaystyle \frac{{u}_{x,j+1/2-s}^{n}}{{u}_{x,j+1/2}^{n}}}$. The first case corresponds to the classical Lax–Wendroff scheme, the third case is the classical first order upwind scheme, and the second case is detailed in the following Remark 1. However, the proposed combination of schemes produces a robust TVD-type scheme, which ensures a very good trade-off between the solution accuracy and monotonicity properties. The scheme parameter $\theta $ plays somehow the role of the traditional

$${\theta}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left\{\begin{array}{cc}0,& \left|\phantom{\rule{0.166667em}{0ex}}{u}_{x,j+1/2}^{n}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}{u}_{x,j+1/2-s}^{n}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{1.em}{0ex}}\mathrm{and}\phantom{\rule{1.em}{0ex}}{u}_{x,j+1/2}^{n}\times {u}_{x,j+1/2-s}^{n}\phantom{\rule{4pt}{0ex}}\u2a7e\phantom{\rule{4pt}{0ex}}0,\hfill \\ {\theta}_{0}(1-{\xi}_{j+1/2}^{n}),& \left|\phantom{\rule{0.166667em}{0ex}}{u}_{x,j+1/2}^{n}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}{u}_{x,j+1/2-s}^{n}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{1.em}{0ex}}\mathrm{and}\phantom{\rule{1.em}{0ex}}{u}_{x,j+1/2}^{n}\times {u}_{x,j+1/2-s}^{n}\phantom{\rule{4pt}{0ex}}\u2a7e\phantom{\rule{4pt}{0ex}}0,\hfill \\ {\theta}_{0},& {u}_{x,j+1/2}^{n}\times {u}_{x,j+1/2-s}^{n}\phantom{\rule{4pt}{0ex}}<\phantom{\rule{4pt}{0ex}}0,\hfill \end{array}\right.$$

`minmod`slope limiter in more conventional MUSCL-type finite volume methods [69]. Its performance on fixed and mobile meshes will be illustrated in the numerical sections below. The complete justification and validation of this scheme can be found in Reference [68].**Remark**

**1.**

We note that the canonical form of Equation (3) contains not only three points schemes on a symmetric stencil. For instance, if we assume for simplicity $a>0$, and set
then we shall obtain the following second order upwind scheme on an asymmetric stencil:

$${\theta}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\left(\frac{1}{C}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}1\right)\left(1\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{{u}_{x,j-1/2}^{n}}{{u}_{x,j+1/2}^{n}}\right),$$

$$\frac{{u}_{j}^{n+1}-{u}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}a\phantom{\rule{0.277778em}{0ex}}\frac{3{u}_{x,j-1/2}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{u}_{x,j-3/2}^{n}}{2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{\tau {a}^{2}}{2}\phantom{\rule{0.277778em}{0ex}}\frac{{u}_{j}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}2{u}_{j-1}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{u}_{j-2}^{n}}{\mathsf{\Delta}{x}^{2}}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

Of course, the numerical properties such as the accuracy, stability, and monotonicity depend crucially on the choice of the parameter $\theta $ and have to be studied carefully in each particular situation.

#### 2.2. Predictor–Corrector Schemes on a Moving Grid

In this section, we shall restrict our attention to bounded domains only, since almost all numerical simulations in 1-D are made on finite intervals. To be more specific, we assume that the computational domain is $\mathcal{I}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}[\phantom{\rule{0.166667em}{0ex}}0,\phantom{\rule{0.166667em}{0ex}}\ell \phantom{\rule{0.166667em}{0ex}}]\phantom{\rule{0.166667em}{0ex}}$. Consider also the reference domain $Q\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}[\phantom{\rule{0.166667em}{0ex}}0,\phantom{\rule{0.166667em}{0ex}}1\phantom{\rule{0.166667em}{0ex}}]$ and a smooth bijective time-dependent mapping $x\phantom{\rule{0.166667em}{0ex}}(\xb7,\phantom{\rule{0.166667em}{0ex}}t):\phantom{\rule{4pt}{0ex}}Q\phantom{\rule{0.166667em}{0ex}}\times \phantom{\rule{0.166667em}{0ex}}{\mathbb{R}}^{\phantom{\rule{0.166667em}{0ex}}+}\phantom{\rule{4pt}{0ex}}\mapsto \phantom{\rule{4pt}{0ex}}\mathcal{I}\phantom{\rule{0.166667em}{0ex}}$, which satisfies the following boundary conditions
For our purely numerical purposes, we do not even need to have the complete information about this mapping. Consider a uniform mesh of the reference domain ${Q}_{\phantom{\rule{0.166667em}{0ex}}h}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{\{{q}_{\phantom{\rule{0.166667em}{0ex}}j}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}j\phantom{\rule{0.166667em}{0ex}}\mathsf{\Delta}q\}}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}0}^{\phantom{\rule{0.166667em}{0ex}}N}\phantom{\rule{0.166667em}{0ex}}$, with a constant step $\mathsf{\Delta}q\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\frac{1}{N}\phantom{\rule{0.166667em}{0ex}}$. Strictly speaking, we need to know only the image of nodes ${q}_{\phantom{\rule{0.166667em}{0ex}}j}$ under the map $x\phantom{\rule{0.166667em}{0ex}}(q,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.166667em}{0ex}}$, since they constitute the nodes of the moving mesh:
The linear advection of Equation (1) can be rewritten on domain Q if we introduce the composed function $v\phantom{\rule{0.166667em}{0ex}}(q,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}(u\phantom{\rule{0.166667em}{0ex}}\circ \phantom{\rule{0.166667em}{0ex}}x)\phantom{\rule{0.166667em}{0ex}}(q,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}u\phantom{\rule{0.166667em}{0ex}}\left(x\phantom{\rule{0.166667em}{0ex}}(q,\phantom{\rule{0.166667em}{0ex}}t),\phantom{\rule{0.166667em}{0ex}}t\right)\phantom{\rule{0.166667em}{0ex}}$:
where $\overline{a}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}a\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}t}$ is the advection speed relative to the mesh nodes velocity and $J\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}0$ is the Jacobian of the transformation $x(q,t)$. Equation (5) does possess a conservative form as well
Now, we can write the predictor–corrector scheme for the linear advection equation on a moving mesh:
Note that the first step is based on Equation (5) and that the second one is based on the conservative form of Equation (6). Here, we introduced some new notations:
As before, one can recast Equations (7) and (8) in an equivalent one-stage form:
A stability study using the method of frozen coefficients [70] leads to the following restrictions on the scheme parameters:
where ${C}_{j+1/2}^{n}$ is the local CFL number [66] defined as
In order to ensure the monotonicity of the numerical solution, it was shown in Reference [68] that it is sufficient to use the following choice of the scheme parameter $\theta $:
where $s=\mathrm{sign}\left({\overline{a}}_{j+1/2}^{n}\right)$ and
Using Equation (10), it can be shown that the stability requirements of Equation (9) are fulfilled under the following single restriction on local CFL numbers:
Finally, the global CFL number C is defined as
It is this value which will be reported in the tables below.

$$x\phantom{\rule{0.166667em}{0ex}}(0,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}x\phantom{\rule{0.166667em}{0ex}}(1,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\ell \phantom{\rule{0.166667em}{0ex}}.$$

$$x\phantom{\rule{0.166667em}{0ex}}({q}_{\phantom{\rule{0.166667em}{0ex}}j},\phantom{\rule{0.166667em}{0ex}}{t}^{\phantom{\rule{0.166667em}{0ex}}n})\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}j}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{0.166667em}{0ex}}.$$

$${v}_{\phantom{\rule{0.166667em}{0ex}}t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{\overline{a}}{J}\phantom{\rule{0.277778em}{0ex}}{v}_{q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},$$

$${\left(Jv\right)}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\left(\overline{a}\phantom{\rule{0.166667em}{0ex}}v\right)}_{q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

$$\begin{array}{cc}\hfill \frac{{v}_{j+1/2}^{*}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{v}_{j+1/2}^{n}}{{\tau}_{j+1/2}^{*}}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\left(\frac{\overline{a}}{J}\phantom{\rule{0.166667em}{0ex}}{v}_{q}\right)}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}& =\phantom{\rule{4pt}{0ex}}0,\hfill \end{array}$$

$$\begin{array}{cc}\hfill \frac{{\left(Jv\right)}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left(Jv\right)}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{{\left({\overline{a}}^{n}\phantom{\rule{0.166667em}{0ex}}{v}^{*}\right)}_{j+1/2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left({\overline{a}}^{n}\phantom{\rule{0.166667em}{0ex}}{v}^{*}\right)}_{j-1/2}}{\mathsf{\Delta}q}\phantom{\rule{4pt}{0ex}}& =\phantom{\rule{4pt}{0ex}}0.\hfill \end{array}$$

$${x}_{t,j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{x}_{t,j}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{x}_{t,j+1}^{n}}{2},\phantom{\rule{2.em}{0ex}}{x}_{t,j}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{x}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{j}^{n}}{\tau},$$

$${J}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}{x}_{q,j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{x}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{j}^{n}}{\mathsf{\Delta}q},\phantom{\rule{2.em}{0ex}}{J}_{j}^{n}\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}{x}_{q,j}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{J}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{J}_{j-1/2}^{n}}{2}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{x}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{j-1}^{n}}{2\mathsf{\Delta}q}.$$

$$\frac{{\left(Jv\right)}_{j}^{n+1}-{\left(Jv\right)}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{{\left(\overline{a}v\right)}_{j+1/2}^{n}-{\left(\overline{a}v\right)}_{j-1/2}^{n}}{\mathsf{\Delta}q}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{\tau}{2\mathsf{\Delta}q}\left\{{\left((1+\theta )\frac{{\overline{a}}^{2}}{J}{v}_{q}\right)}_{j+1/2}^{n}-{\left((1+\theta )\frac{{\overline{a}}^{2}}{J}{v}_{q}\right)}_{j-1/2}^{n}\right\}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

$${\theta}_{j+1/2}^{n}\u2a7e0,\phantom{\rule{2.em}{0ex}}\underset{j\in \{0,\dots ,N-1\}}{max}{\left(\sqrt{1+\theta}\phantom{\rule{0.277778em}{0ex}}C\right)}_{j+1/2}^{n}\u2a7d1,$$

$${C}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{\tau}{\mathsf{\Delta}q}\phantom{\rule{0.277778em}{0ex}}{\left(\frac{\left|\phantom{\rule{0.166667em}{0ex}}\overline{a}\phantom{\rule{0.166667em}{0ex}}\right|}{J}\right)}_{j+1/2}^{n}.$$

$${\theta}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left\{\begin{array}{cc}0,& \left|\phantom{\rule{0.166667em}{0ex}}{\tilde{g}}_{j+1/2}^{n}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}{\tilde{g}}_{j+1/2-s}^{n}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{1.em}{0ex}}\mathrm{and}\phantom{\rule{1.em}{0ex}}{\tilde{g}}_{j+1/2}^{n}\times {\tilde{g}}_{j+1/2-s}^{n}\phantom{\rule{4pt}{0ex}}\u2a7e\phantom{\rule{4pt}{0ex}}0,\hfill \\ {\left({\theta}_{0}(1-\xi )\right)}_{j+1/2}^{n},& \left|\phantom{\rule{0.166667em}{0ex}}{\tilde{g}}_{j+1/2}^{n}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}{\tilde{g}}_{j+1/2-s}^{n}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{1.em}{0ex}}\mathrm{and}\phantom{\rule{1.em}{0ex}}{\tilde{g}}_{j+1/2}^{n}\times {\tilde{g}}_{j+1/2-s}^{n}\phantom{\rule{4pt}{0ex}}\u2a7e\phantom{\rule{4pt}{0ex}}0,\hfill \\ {\theta}_{0,j+1/2}^{n},& {\tilde{g}}_{j+1/2}^{n}\times {\tilde{g}}_{j+1/2-s}^{n}\phantom{\rule{4pt}{0ex}}<\phantom{\rule{4pt}{0ex}}0,\hfill \end{array}\right.$$

$${\theta}_{0,j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{1}{{C}_{j+1/2}^{n}}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}1,\phantom{\rule{2.em}{0ex}}{\tilde{g}}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{\left(\left|\phantom{\rule{0.166667em}{0ex}}\overline{a}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{0.277778em}{0ex}}(1-C)\phantom{\rule{0.277778em}{0ex}}{v}_{q}\right)}_{j+1/2}^{n},\phantom{\rule{2.em}{0ex}}{\xi}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{\tilde{g}}_{j+1/2-s}^{n}}{{\tilde{g}}_{j+1/2}^{n}}.$$

$${C}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}1.$$

$$C\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\underset{j}{max}\left\{{C}_{j+1/2}^{n}\right\}.$$

There is an additional relation which is called the geometric conservation law. In the 1-D case, it takes a very simple form
since it translates a trivial fact that ${x}_{\phantom{\rule{0.166667em}{0ex}}q\phantom{\rule{0.166667em}{0ex}}t}\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{0.166667em}{0ex}}$. However, it was demonstrated in Reference [71] that it is absolutely crucial to respect the geometric conservation law at the discrete level as well in order to have a consistent fully discrete scheme which preserves all constant solutions exactly. It can be shown that the scheme proposed above satisfies the discrete counterpart of the geometric conservation law in integer and half-integer nodes:

$${J}_{\phantom{\rule{0.166667em}{0ex}}t}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left({x}_{\phantom{\rule{0.166667em}{0ex}}t}\right)}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},$$

$$\begin{array}{cc}\hfill \frac{{J}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{J}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{{x}_{t,j+1/2}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t,j-1/2}^{n}}{\mathsf{\Delta}q}\phantom{\rule{4pt}{0ex}}& =\phantom{\rule{4pt}{0ex}}0,\hfill \\ \hfill \frac{{J}_{j+1/2}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{J}_{j+1/2}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{{x}_{t,j+1}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t,j}^{n}}{\mathsf{\Delta}q}\phantom{\rule{4pt}{0ex}}& =\phantom{\rule{4pt}{0ex}}0.\hfill \end{array}$$

#### 2.3. Construction and Motion of the Grid

In the previous sections, we explained in some detail the predictor–corrector schemes on fixed and moving meshes. We saw that the mesh motion is parametrized by a bijective mapping $x(q,t):Q\times {\mathbb{R}}^{+}\mapsto \mathcal{I}$. Now, we explain how this map is effectively constructed, since so far, it was quite general. Moreover, the predictor–corrector schemes presented above are valid for other constructions of the mesh motion.

The first step consists in choosing a positive valued function $w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.166667em}{0ex}}:\phantom{\rule{4pt}{0ex}}\mathcal{I}\phantom{\rule{0.166667em}{0ex}}\times \phantom{\rule{0.166667em}{0ex}}{\mathbb{R}}^{\phantom{\rule{0.166667em}{0ex}}+}\phantom{\rule{4pt}{0ex}}\mapsto \phantom{\rule{4pt}{0ex}}{\mathbb{R}}^{\phantom{\rule{0.166667em}{0ex}}+}\phantom{\rule{0.166667em}{0ex}}$, the so-called monitor function, which controls the distribution of the nodes. Without entering into the details for the moment, we suggest as one choice for a monitor function the following expression:
where $\alpha \phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}0$ is a real parameter. The monitor function of Equation (11) is a particular case of the class of monitor functions considered by Beckett et al. [53]. Other choices of the monitor function are discussed in References [54,72,73]. For instance, to give an example, another popular choice of the monitor function is

$$w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\alpha \phantom{\rule{0.277778em}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}{u}_{\phantom{\rule{0.166667em}{0ex}}x}\phantom{\rule{0.166667em}{0ex}}(x,t)\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{0.166667em}{0ex}},$$

$$w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\sqrt{1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\alpha \phantom{\rule{0.277778em}{0ex}}{\left|\phantom{\rule{0.166667em}{0ex}}{u}_{\phantom{\rule{0.166667em}{0ex}}x}\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.166667em}{0ex}}\right|}^{\phantom{\rule{0.166667em}{0ex}}2}}\phantom{\rule{0.166667em}{0ex}}.$$

In general, the choice of the monitor function and its parameters might be crucial for the accuracy of the scheme. The adaptive grid construction for a simple linear singularly perturbed Sturm–Liouville equation is deeply analysed in Reference [45]. This question seems to be rather open for unsteady nonlinear problems. The current state-of-the-art in this field is described in Reference [41].

It is noted that the monitor function varies in both space and time and takes large (positive) values in areas where the solution has important gradients. The monitor function $w(x,t)$ specified in Equation (11) can be readily discretized.

$${w}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\alpha \phantom{\rule{0.277778em}{0ex}}\frac{\left|\phantom{\rule{0.166667em}{0ex}}{u}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{u}_{\phantom{\rule{0.166667em}{0ex}}j}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{0.166667em}{0ex}}\right|}{{x}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}j}^{\phantom{\rule{0.166667em}{0ex}}n}}\phantom{\rule{0.166667em}{0ex}}.$$

The proposed algorithm is slightly different on the very first step when the initial grid is generated. It is important to obtain a high-quality initial mesh, since the numerical error committed in the beginning cannot be corrected afterwards. Therefore, the first step is explained in detail below and the algorithm for unsteady computations is presented in the following section.

#### 2.3.1. Initial Grid Generation

It is of capital importance to produce a grid adapted to the initial condition as well, since no error committed initially can be corrected during dynamical simulations. At $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0$, we compute the monitor function $w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}0)$ of the initial condition $u\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}0)$ and the mapping $x\phantom{\rule{0.166667em}{0ex}}(q,\phantom{\rule{0.166667em}{0ex}}0)$ is determined as the solution to the following nonlinear elliptic problem, which degenerates to a simple second-order ordinary differential equation
supplemented with Dirichlet boundary conditions (4). This elliptic problem can be readily discretized to produce the following finite difference approximation:
with boundary conditions ${x}_{0}^{0}\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}0$, ${x}_{N}^{0}\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}\ell \phantom{\rule{0.166667em}{0ex}}$. The last nonlinear system of equations is solved iteratively (usually with some fixed point-type iterations). The iterations are initialized with a uniform grid as the first guess. One can notice also that its solution satisfies the equidistribution principle:
where the constant ${C}_{h}$ can be computed as
Therefore, ${C}_{\mathsf{\Delta}q}$ is the discrete version of the monitor function integral. The equidistribution principle gives meaning to the monitor function: In the areas where ${w}_{j+1/2}^{0}$ takes large values, the spacing between two neighboring nodes ${x}_{j+1}^{0}$ and ${x}_{j}^{0}$ has to be inversely proportionally small.

$${\left(\phantom{\rule{0.166667em}{0ex}}w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}0)\phantom{\rule{0.277778em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{0.166667em}{0ex}}\right)}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},$$

$$\frac{1}{\mathsf{\Delta}q}\phantom{\rule{0.277778em}{0ex}}\left\{{w}_{j+1/2}^{0}\phantom{\rule{0.277778em}{0ex}}\frac{{x}_{j+1}^{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{j}^{0}}{\mathsf{\Delta}q}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{w}_{j-1/2}^{0}\phantom{\rule{0.277778em}{0ex}}\frac{{x}_{j}^{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{j-1}^{0}}{\mathsf{\Delta}q}\right\}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0,\phantom{\rule{1.em}{0ex}}j\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1,\dots ,N-1,$$

$${w}_{j+1/2}^{0}\phantom{\rule{0.277778em}{0ex}}\frac{{x}_{j+1}^{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{j}^{0}}{\mathsf{\Delta}q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{C}_{\mathsf{\Delta}q},\phantom{\rule{2.em}{0ex}}j\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0,\dots ,N-1,$$

$${C}_{\mathsf{\Delta}q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\sum _{j=0}^{N-1}{(\mathsf{\Delta}x\times w)}_{j+1/2}^{0},\phantom{\rule{2.em}{0ex}}\mathsf{\Delta}{x}_{j+1/2}^{0}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}{x}_{j+1}^{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{j}^{0}.$$

#### 2.3.2. Unsteady Computations

Assume that the grid ${\left\{{x}_{j}^{n}\right\}}_{j=0}^{N}$ at $t\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}{t}^{n}$ is known, and let us evolve it to the next time layer ${t}^{n+1}$. It is done by solving the following linear fully discrete problem:
with the same boundary conditions ${x}_{0}^{n+1}=0$, ${x}_{N}^{n+1}=\ell $ as above. Here, the real positive parameter $\beta >0$ plays the role of the diffusion coefficient, and it controls the smoothness of the nodes trajectories. The optimal choice of the parameter $\beta $ is currently an open problem, and it has to be done empirically on a case-by-case basis. It can be easily seen that the scheme of Equation (14) is an implicit discretization of this nonlinear parabolic equation:

$$\frac{1}{\mathsf{\Delta}q}\phantom{\rule{0.277778em}{0ex}}\left\{{w}_{j+1/2}^{n}\phantom{\rule{0.277778em}{0ex}}\frac{{x}_{j+1}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{j}^{n+1}}{\mathsf{\Delta}q}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{w}_{j-1/2}^{n}\phantom{\rule{0.277778em}{0ex}}\frac{{x}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{j-1}^{n+1}}{\mathsf{\Delta}q}\right\}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\beta \phantom{\rule{0.277778em}{0ex}}\frac{{x}_{j}^{n+1}-{x}_{j}^{n}}{\tau},\phantom{\rule{1.em}{0ex}}j\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1,\dots ,N-1,$$

$${\left(\phantom{\rule{0.166667em}{0ex}}w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.166667em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{0.166667em}{0ex}}\right)}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\beta \phantom{\rule{0.166667em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}t}\phantom{\rule{0.166667em}{0ex}}.$$

However, it has to be stressed that the fully discrete problem is linear, since the monitor function ${w}_{j\pm 1/2}^{n}$ is taken on the previous time layer. Thus, the overall complexity of the grid motion algorithm at every time step is equal to that of the tridiagonal matrix algorithm [74].

#### 2.3.3. A Lyrical Digression

It is probably not completely clear to the reader why one has to use a different procedure initially, especially since the solution at every time step might be considered as an initial condition to the next time level. This question would be completely legitimate.

The moving grid technique based on the solution of a (nonlinear) parabolic equation as in Equation (15) was specifically designed for the solution of unsteady problems. It was proposed for the first time in Reference [38] to simulate gas dynamics problems, and it ensures the required smoothness of grid points trajectories (see the numerical examples below). The position of grid points on two consecutive time steps are related by a finite-difference analogue of Equation (15). This modification of the equidistribution principle allows an avoidance of any rapid changes in the location of grid nodes. Basically, it was understood in the original work [38] and confirmed later in subsequent developments in late the 1980s and early 1990s [37,75,76,77,78]. Subsequent developments have been done in References [39,41,63]. Some recommendations against using the steady equation of Equation (12) to determine the position of grid nodes on each time step were formulated in References [78,79,80]. Some examples of grid nodes oscillations, and other instabilities were shown there as well. In Appendix A, we provide a few analytical examples to illustrate eventual problems which may arise if one uses the equidistribution principle of Equation (12) on every time step. Indeed, we demonstrate in Appendix A that even infinitesimal perturbations of the monitor function may yield finite perturbations in the solution $x\phantom{\rule{0.166667em}{0ex}}(q,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.166667em}{0ex}}$.

#### 2.3.4. Smoothing Step

In some problems where the solution contains a lot of oscillations (i.e., many local extrema), the monitor function $w(x,\phantom{\rule{0.166667em}{0ex}}t)$ has to be filtered out to ensure the smoothness of the mesh motion. Moreover, a smoothing step allows an enlargement of the set of acceptable values of the parameter $\alpha $ in the definition of Equation (11) of the monitor function. Our numerical experiments show that the following implicit procedure (inspired by implicit discretizations of the heat equation) produces very robust results:
where $\sigma >0$ is an ad hoc smoothing parameter to be set empirically. In our study, we do a smoothing similar to Asselin’s filter proposed earlier for time integration problems [81]. The system of Equation (16) is completed with boundary conditions
The smoothed discrete monitor function ${\left\{{\overline{w}}_{j}\right\}}_{j=0}^{N}$ is obtained by solving the linear system of Equation (16) with any favorite method. In the present study, we used the simplest tridiagonal matrix algorithm [74]. In contrast, the authors of Reference [34] used an explicit smoothing method. We stress that one should apply a smoothing operator to the monitor function and not to the numerical solution.

$${\overline{w}}_{j+1/2}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{w}_{j+1/2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\sigma {\overline{w}}_{j+1/2}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{\sigma}{2}\phantom{\rule{0.277778em}{0ex}}({\overline{w}}_{j-1/2}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\overline{w}}_{j+3/2})\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}j\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1,\dots ,N-2\phantom{\rule{0.166667em}{0ex}},$$

$${\overline{w}}_{1/2}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{w}_{1/2}\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}{\overline{w}}_{N-1/2}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{w}_{N-1/2}\phantom{\rule{0.166667em}{0ex}}.$$

#### 2.3.5. On the Choice of the Monitor Function

In general, when one has a problem (i.e., a system of PDEs) to solve, there is a question of the best possible monitor function choice for the grid adaptation. One has to choose also the pertinent solution component as an input for the monitor function. It is extremely difficult to give some general recommendations which would work in all cases (It is probably as difficult as the general theory of PDEs). However, in choosing the monitor function, one has to take into account the following aspects:

**Physical considerations:**Any a priori knowledge on the solution can be used to underline important physical aspects (e.g., the presence of shock waves or the presence of multiple wave crests, etc.);**Geometrical considerations:**The computational domain geometry (e.g., the presence of angles or fractal shorelines in wave run-up problems) and topology (i.e., the presence of islands or other obstacles);**Mathematical considerations:**The nature of equations (differential, partial differential, integro-differential, singularly perturbed, etc.) but one also has to pick up the most pertinent variable to compute the monitor function on it (the free surface elevation or the vorticity field in Navier–Stokes simulations);**Numerical considerations:**Particularities of the employed discretization scheme may also hint the choice of the monitor function.

Once the monitor function is chosen, one has to determine also the (nearly) optimal values of parameters which depend not only on the problem but also on the solution. Finally, the most important guideline nowadays is the experience in solving practical problems using moving grid techniques. It cannot be replaced by any guidelines. We refer also to the review of Reference [56].

#### 2.4. Numerical Results

In order to illustrate the performance of this algorithm, we choose a notorious test case, which consists in simulating the propagation of a discontinuous profile:
The monitor function employed in this computation is defined in Equation (11). The numerical parameters used in this simulations are given in Table 1. The simulation results at time $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{T}_{\phantom{\rule{0.166667em}{0ex}}f}$ is shown in Figure 1. From the comparison of profiles obtained on fixed and moving meshes, one can see that the moving mesh reduces significantly the “width” of the numerical shock wave profile.

$$u(x,0)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left\{\begin{array}{cc}1,\hfill & x\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}{x}_{*},\hfill \\ 0,\hfill & x\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}{x}_{*},\hfill \end{array}\right.\phantom{\rule{2.em}{0ex}}{x}_{*}\in [\phantom{\rule{0.166667em}{0ex}}0,\ell \phantom{\rule{0.166667em}{0ex}}]\phantom{\rule{0.166667em}{0ex}}.$$

The second test case is a smooth bell-shaped function advected by the dynamics of Equation (1). This test is used to measure the ability of the scheme to preserve the extrema (In other words, we assess the strength of the numerical diffusion on a given mesh). The exact solution is given by
Thus, the initial condition is simply given by $u(x,0)={\mathrm{e}}^{-25{(x-{x}_{0})}^{2}}$. Another particularity of the present test case is that we use the monitor function specifically designed with an emphasis on the fine resolution of the local extrema (those with high positive or high negative values):
It is noted that there is no differentiation operator in the definition of the last monitor function compared to the one defined in Equation (11).

$$u(x,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{\mathrm{e}}^{-25{(x\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}at)}^{2}}.$$

$$w(x,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\alpha \left|\phantom{\rule{0.166667em}{0ex}}u(x,t)\phantom{\rule{0.166667em}{0ex}}\right|.$$

The parameters used in the numerical simulation are provided in Table 2. The numerical results at $t={T}_{f}$ are shown in Figure 2. For the sake of comparison, we show also the numerical solution obtained with the same scheme but on a uniform mesh. The use of a moving grid improves dramatically the preservation of the local maximum. One cannot even distinguish the exact solution from the numerical one up to the graphic resolution.

## 3. Nonlinear Scalar Equation

In this section, we consider a general hyperbolic scalar nonlinear conservation law of the form:
As a chrestomathic example of such equations, we can mention the celebrated Burgers–Hopf equation [82]. As above, we make a change of variables to the fixed reference domain Q
or in the conservative form
where $v:=u\circ x$ and $J:={x}_{q}$, as before.

$${u}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\left[f\left(u\right)\right]}_{x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

$${v}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{1}{J}\phantom{\rule{0.277778em}{0ex}}\left[{f}_{q}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t}\phantom{\rule{0.166667em}{0ex}}{v}_{q}\right]\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0,$$

$${\left(Jv\right)}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\left[f\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t}\phantom{\rule{0.166667em}{0ex}}v\right]}_{q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0,$$

For nonlinear equations, we need an extra transport equation for the flux function:
where $a\left(u\right)={f}_{u}\left(u\right)$. The last equation transforms to the following nonconservative form on the fixed domain Q:
Now, we can write down the predictor–corrector scheme directly on a moving grid (Notice that, in the nonlinear case, three stages are required):
where ${v}_{j+1/2}^{n}$, ${f}_{j+1/2}^{n}$ were defined above. The last scheme has the theoretical second-order approximation in space $\mathcal{O}\left(\mathsf{\Delta}{q}^{2}\right)$ for smooth solutions provided that $\theta =\mathcal{O}\left(\mathsf{\Delta}q\right)$ [68]. The only point which remains to be specified is the computation of the numerical Jacobian ${a}_{j+1/2}^{n}$. In order to ensure good properties of the scheme, one has to ensure the compatibility condition ${f}_{q}=a\phantom{\rule{0.166667em}{0ex}}\left(v\right)\phantom{\rule{0.166667em}{0ex}}{v}_{\phantom{\rule{0.166667em}{0ex}}q}$ at the discrete level ${f}_{q,j+1/2}^{n}={\left(a\phantom{\rule{0.166667em}{0ex}}{v}_{q}\right)}_{j+1/2}^{n}$ for finite differences analogue of the derivatives:
This requirement can be satisfied with the following choice [83]:

$${f}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}a\left(u\right)\phantom{\rule{0.277778em}{0ex}}{f}_{x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0,$$

$${f}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{a\left(v\right)}{J}\phantom{\rule{0.277778em}{0ex}}\left[{f}_{q}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t}\phantom{\rule{0.166667em}{0ex}}{v}_{q}\right]\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

$$\begin{array}{cc}\hfill \frac{{v}_{j+1/2}^{*}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{v}_{j+1/2}^{n}}{{\tau}_{j+1/2}^{*}}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\left(\frac{{f}_{q}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t}\phantom{\rule{0.166667em}{0ex}}{v}_{q}}{J}\right)}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}& =\phantom{\rule{4pt}{0ex}}0,\hfill \\ \hfill \frac{{f}_{j+1/2}^{*}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{f}_{j+1/2}^{n}}{{\tau}_{j+1/2}^{*}}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\left(\frac{a({f}_{q}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t}\phantom{\rule{0.166667em}{0ex}}{v}_{q})}{J}\right)}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}& =\phantom{\rule{4pt}{0ex}}0,\hfill \\ \hfill \frac{{\left(Jv\right)}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left(Jv\right)}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{{({f}^{*}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t}^{n}\phantom{\rule{0.166667em}{0ex}}{v}^{*})}_{j+1/2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{({f}^{*}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t}^{n}\phantom{\rule{0.166667em}{0ex}}{v}^{*})}_{j-1/2}}{\mathsf{\Delta}q}\phantom{\rule{4pt}{0ex}}& =\phantom{\rule{4pt}{0ex}}0,\hfill \end{array}$$

$${f}_{q,j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{f}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{f}_{j}^{n}}{\mathsf{\Delta}q},\phantom{\rule{2.em}{0ex}}{v}_{q,j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{v}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{v}_{j}^{n}}{\mathsf{\Delta}q}.$$

$${a}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left\{\begin{array}{cc}\frac{{f}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{f}_{j}^{n}}{{v}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{v}_{j}^{n}},& {v}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}\ne \phantom{\rule{4pt}{0ex}}{v}_{j}^{n},\hfill \\ a\left({v}_{j}^{n}\right),& {v}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{v}_{j}^{n}.\hfill \end{array}\right.$$

By noticing that the corrector step contains only the combination ${f}^{*}-{x}_{t}^{n}\phantom{\rule{0.166667em}{0ex}}{u}^{*}$, we can write a compact two-stage form of the predictor–corrector scheme:
where $\overline{a}(v,q,t)=a\left(v\right)-{x}_{t}$. The parameter ${\theta}_{j+1/2}^{n}$ is computed according to Equation (10), which ensures the TVD property of the scheme. As a result, we obtain a generalization of the Harten scheme [83] to the case of moving meshes.

$$\begin{array}{cc}\hfill {\left(\frac{\widehat{f}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{f}^{n}}{{\tau}^{*}}\right)}_{j+1/2}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\left(\frac{{\overline{a}}^{2}}{J}\phantom{\rule{0.277778em}{0ex}}{v}_{q}\right)}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}& =\phantom{\rule{4pt}{0ex}}0,\hfill \\ \hfill \frac{{\left(Jv\right)}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left(Jv\right)}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{{\left(\widehat{f}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left({x}_{t}\phantom{\rule{0.166667em}{0ex}}v\right)}^{n}\right)}_{j+1/2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left(\widehat{f}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left({x}_{t}\phantom{\rule{0.166667em}{0ex}}v\right)}^{n}\right)}_{j-1/2}}{\mathsf{\Delta}q}\phantom{\rule{4pt}{0ex}}& =\phantom{\rule{4pt}{0ex}}0,\hfill \end{array}$$

#### Numerical Results

In order to illustrate the performance of the generalized Harten scheme on moving meshes, we take the classical example of the inviscid Burgers–Hopf equation ($f\left(u\right)=\frac{{u}^{2}}{2}$). As the first illustration, let us take the following initial condition on the computational domain $x\in [0,\ell ]$:
All numerical parameters are given in Table 3. The exact weak solution to this problem is given by the following formula:
The gradient catastrophe takes place at $t={t}^{*}$ and $x={x}_{*}$, which can be computed exactly as well.
After $t={t}^{*}$, we obtain a travelling shock-wave profile:

$${u}_{0}\left(x\right)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left\{\begin{array}{cc}{u}_{l},& x\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}{x}_{l},\hfill \\ {\displaystyle \frac{x-{x}_{r}}{{x}_{l}-{x}_{r}}\phantom{\rule{0.277778em}{0ex}}{u}_{l}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{x-{x}_{l}}{{x}_{r}-{x}_{l}}\phantom{\rule{0.277778em}{0ex}}{u}_{r},}& {x}_{l}\phantom{\rule{4pt}{0ex}}<\phantom{\rule{4pt}{0ex}}x\phantom{\rule{4pt}{0ex}}<\phantom{\rule{4pt}{0ex}}{x}_{r},\hfill \\ {u}_{r}& x\phantom{\rule{4pt}{0ex}}\u2a7e\phantom{\rule{4pt}{0ex}}{x}_{r}.\hfill \end{array}\right.$$

$$u(x,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left\{\begin{array}{cc}{u}_{l},& x\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}{x}_{l}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{u}_{l}\phantom{\rule{0.166667em}{0ex}}t,\hfill \\ {\displaystyle \frac{x\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{*}}{t\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{t}_{*}},}& {x}_{l}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{u}_{l}\phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{4pt}{0ex}}<\phantom{\rule{4pt}{0ex}}x\phantom{\rule{4pt}{0ex}}<\phantom{\rule{4pt}{0ex}}{x}_{r}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{u}_{r}\phantom{\rule{0.166667em}{0ex}}t,\hfill \\ {u}_{r},& x\phantom{\rule{4pt}{0ex}}\u2a7e\phantom{\rule{4pt}{0ex}}{x}_{r}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{u}_{r}\phantom{\rule{0.166667em}{0ex}}t,\hfill \end{array}\right.\phantom{\rule{2.em}{0ex}}t\phantom{\rule{4pt}{0ex}}<\phantom{\rule{4pt}{0ex}}{t}_{*}.$$

$${t}^{*}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}-\phantom{\rule{0.277778em}{0ex}}\frac{{x}_{r}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{l}}{{u}_{r}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{u}_{l}},\phantom{\rule{2.em}{0ex}}{x}_{*}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{x}_{l}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{u}_{l}\phantom{\rule{0.166667em}{0ex}}{t}^{*}\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}{x}_{r}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{u}_{r}\phantom{\rule{0.166667em}{0ex}}{t}^{*}.$$

$$u(x,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left\{\begin{array}{cc}{u}_{l},& x\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}{x}_{*}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\left\{u\right\}(t\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{t}^{*}),\hfill \\ {u}_{r},& x\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}{x}_{*}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\left\{u\right\}(t\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{t}^{*}),\hfill \end{array}\right.\phantom{\rule{2.em}{0ex}}\left\{u\right\}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\frac{{u}_{l}+{u}_{r}}{2}.$$

For the parameters chosen in our numerical simulation (see Table 3), the shock wave remains stationary at $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{t}^{*}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}5$ and $x\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{x}_{*}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}15$ since ${u}_{l}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}-{u}_{r}\phantom{\rule{0.166667em}{0ex}}$. The numerical solution and the grid motion are shown in Figure 3. It can be seen that the solution monotonicity is preserved on both fixed and moving meshes. However, on the moving grid, we obtain a solution which cannot be distinguished from the exact one up to the graphical resolution. On the fixed grid, the shock wave has a finite width equal to two control volumes.

As another numerical illustration, we consider the same problem, but we change the value of ${u}_{r}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}0$ instead of $-1$. In this case, the gradient catastrophe takes place at $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{t}^{*}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}10$ and $x\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{x}_{*}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}20$. The shock wave profile is not steady anymore since $\left\{u\right\}=\frac{{u}_{l}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{u}_{r}}{2}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{1}{2}\phantom{\rule{4pt}{0ex}}\ne \phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}}$. Therefore, it will move in the rightward direction with a constant speed equal to $\frac{1}{2}\phantom{\rule{0.166667em}{0ex}}$. The results of the numerical simulations are shown in Figure 4. It can be seen again that the adaptive solution is excellent while the fixed grid produces a shock wave smeared out on four cells only.

## 4. Nonlinear System of Equations

The predictor–corrector scheme for nonlinear systems on moving meshes will be presented on a practically important case of the Nonlinear Shallow Water Equations (NSWE) [84]. This choice reflects also the scientific interests of the authors of the present article. Moving grid techniques have been applied to other systems of conservation laws such as the Euler equations in Reference [73], pressureless gas dynamics [85] and magnetohydrodynamics [86].

Therefore, consider one-dimensional nonlinear shallow water equations written in a vectorial form:
where $\mathbf{u}$ is the vector of conservative variables, $\mathit{f}\left(\mathbf{u}\right)$ is the flux function, and $G\phantom{\rule{0.166667em}{0ex}}(\mathbf{u},\phantom{\rule{0.166667em}{0ex}}x)$ contains the source terms:

$${\mathbf{u}}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\left[\phantom{\rule{0.166667em}{0ex}}\mathit{f}\left(\mathbf{u}\right)\phantom{\rule{0.166667em}{0ex}}\right]}_{x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}G(\mathbf{u},x)\phantom{\rule{0.166667em}{0ex}},$$

$$\mathbf{u}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{c}H\\ Hu\end{array}\right),\phantom{\rule{2.em}{0ex}}\mathit{f}\left(\mathbf{u}\right)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{c}H\phantom{\rule{3.33333pt}{0ex}}u\\ H{u}^{2}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{g}{2}{H}^{2}\end{array}\right),\phantom{\rule{2.em}{0ex}}\mathbf{G}(\mathbf{u},x)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{c}0\\ gH{h}_{x}\end{array}\right)\phantom{\rule{0.166667em}{0ex}}.$$

Here, $u(x,t)$ is the depth-averaged velocity and $H(x,t)=\eta (x,t)+h\left(x\right)$ is the total water depth defined as the sum of the bathymetry function $h\left(x\right)$ and the free surface elevation $\eta (x,t)$ over the mean water level. The sketch of the physical domain with all these definitions is shown in Figure 5. The system of Equation (18) is considered on a finite segment $\mathcal{I}=[0,\ell ]$ with appropriate boundary conditions. As before, we consider a smooth bijective time-dependent transformation $x=x(q,t)$ from the reference domain $Q=[0,1]$ into $\mathcal{I}$. The NSWE on the reference domain are written in the form [87]:
where $\mathit{v}(q,t)=\mathbf{u}\circ x=\mathbf{u}\left(x(q,t),t\right)$ and the source term contains a derivative with respect to $q\phantom{\rule{0.166667em}{0ex}}$:
It is noted that the bathymetry becomes time-dependent under this change of variables, even if initially the bottom was fixed. There exists also a conservative form NSWE on the reference domain:
Finally, the flux vector satisfies the following equation:
where $\mathcal{A}$ is the advective flux’s Jacobian matrix, which can be easily computed:
Since the system of NSWE (18) is hyperbolic, the Jacobian $\mathcal{A}$ can be decomposed into the product of left $\mathcal{L}$ and right $\mathcal{R}$ eigenvectors:
where the matrices $\mathcal{L}$, $\mathcal{R}$, and $\mathcal{D}$ are defined as
Here, ${\lambda}_{1,2}=v\mp c$ ($c=\sqrt{gH}$ being the speed of gravity waves) are eigenvalues of the Jacobian $\mathcal{A}\phantom{\rule{0.166667em}{0ex}}\left(\mathit{v}\right)\phantom{\rule{0.166667em}{0ex}}$. They are real and distinct provided that $H(q,t)>0$. Mathematically, it implies the strict hyperbolicity property for the system of Equation (18).

$${\mathit{v}}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{1}{J}\phantom{\rule{0.277778em}{0ex}}[{\mathit{f}}_{q}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t}\phantom{\rule{0.166667em}{0ex}}{\mathit{v}}_{q}]\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{1}{J}\phantom{\rule{0.277778em}{0ex}}\mathbf{G}(\mathit{v},q),$$

$$\mathbf{G}(\mathit{v},q)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{c}0\\ gH{h}_{q}\end{array}\right),\phantom{\rule{2.em}{0ex}}h(q,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}h\left(x(q,t)\right).$$

$${\left(J\mathit{v}\right)}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{[\mathit{f}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t}\phantom{\rule{0.166667em}{0ex}}\mathit{v}]}_{q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\mathbf{G}(\mathit{v},q),\phantom{\rule{2.em}{0ex}}J\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}{x}_{q}\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}0.$$

$${\mathit{f}}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{1}{J}\phantom{\rule{0.277778em}{0ex}}\mathcal{A}[{\mathit{f}}_{q}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t}{\mathit{v}}_{q}]\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{1}{J}\phantom{\rule{0.277778em}{0ex}}\mathcal{A}\mathbf{G}(\mathit{v},q),$$

$$\mathcal{A}\left(\mathit{v}\right)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{\mathrm{D}\mathit{f}\left(\mathit{v}\right)}{\mathrm{D}\mathit{v}}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{cc}0& 1\\ -{v}^{2}+gH& 2v\end{array}\right).$$

$$\mathcal{A}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\mathcal{R}\xb7\mathcal{D}\xb7\mathcal{L},$$

$$\mathcal{L}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{1}{{c}^{2}}\phantom{\rule{0.277778em}{0ex}}\left(\begin{array}{cc}-{\lambda}_{2}& 1\\ -{\lambda}_{1}& 1\end{array}\right),\phantom{\rule{2.em}{0ex}}\mathcal{R}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{c}{2}\phantom{\rule{0.277778em}{0ex}}\left(\begin{array}{cc}-1& 1\\ -{\lambda}_{1}& {\lambda}_{2}\end{array}\right),\phantom{\rule{2.em}{0ex}}\mathcal{D}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{cc}{\lambda}_{1}& 0\\ 0& {\lambda}_{2}\end{array}\right).$$

#### 4.1. Finite Volume Discretization

The reference domain Q is discretized into N equal control volumes $\left[\phantom{\rule{0.166667em}{0ex}}{q}_{\phantom{\rule{0.166667em}{0ex}}j},\phantom{\rule{0.166667em}{0ex}}{q}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1}\phantom{\rule{0.166667em}{0ex}}\right]$ of the width $\mathsf{\Delta}q\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}\frac{1}{N}\phantom{\rule{0.166667em}{0ex}}$. The nodes ${x}_{\phantom{\rule{0.166667em}{0ex}}j}^{\phantom{\rule{0.166667em}{0ex}}n}$ are obtained as images of uniform nodes under the mapping $x\phantom{\rule{0.166667em}{0ex}}(q,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.166667em}{0ex}}$:
In the predictor–corrector scheme on the first step, we evaluate the flux vector in the cell centers:

$${x}_{\phantom{\rule{0.166667em}{0ex}}j}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}x\phantom{\rule{0.166667em}{0ex}}({q}_{\phantom{\rule{0.166667em}{0ex}}j},\phantom{\rule{0.166667em}{0ex}}{t}^{\phantom{\rule{0.166667em}{0ex}}n})\phantom{\rule{0.166667em}{0ex}}.$$

$${\widehat{\mathit{f}}}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{\mathit{f}}_{j}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\mathit{f}}_{j+1}^{n}}{2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{\tau}{2}\phantom{\rule{0.277778em}{0ex}}{\left[\frac{1}{J}\phantom{\rule{0.166667em}{0ex}}\mathcal{R}\xb7\mathcal{D}\xb7\overline{\mathcal{D}}\xb7(\overline{\mathcal{D}}\xb7\mathcal{P}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\mathcal{L}\xb7\mathbf{G})\right]}_{j+1/2}^{n},\phantom{\rule{1.em}{0ex}}\mathcal{P}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\mathcal{L}\xb7{\mathit{v}}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{0.166667em}{0ex}}.$$

Vector $\mathcal{P}$ is an analogue (The analogy is understood in the following sense: If we linearize our problem, the components of vector $\mathcal{P}$ will provide exactly two Riemann’s invariants) of the Riemann’s invariants in the nonlinear case. The corrector step is based on the conservative form of the equation:
where $\tau $ is the time step and the following discretizations are used
The total water depth H and local depth gradient ${h}_{\phantom{\rule{0.166667em}{0ex}}q}$ have to be computed in the following way:
Despite the fact that ${H}_{j\pm 1}^{n+1}$ is present in the formulas above, the scheme remains explicit, since we compute first ${\left\{{H}_{j}^{n+1}\right\}}_{j=1}^{N-1}$ from the mass conservation and, then, this value is used in the correction of the momentum conservation equation.

$$\frac{{\left(J\phantom{\rule{0.166667em}{0ex}}\mathit{v}\right)}_{\phantom{\rule{0.166667em}{0ex}}j}^{\phantom{\rule{0.166667em}{0ex}}n\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left(J\phantom{\rule{0.166667em}{0ex}}\mathit{v}\right)}_{\phantom{\rule{0.166667em}{0ex}}j}^{\phantom{\rule{0.166667em}{0ex}}n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{{\left(\widehat{\mathit{f}}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left({x}_{\phantom{\rule{0.166667em}{0ex}}t}\phantom{\rule{0.166667em}{0ex}}\mathit{v}\right)}^{\phantom{\rule{0.166667em}{0ex}}n}\right)}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left(\widehat{\mathit{f}}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left({x}_{\phantom{\rule{0.166667em}{0ex}}t}\phantom{\rule{0.166667em}{0ex}}\mathit{v}\right)}^{\phantom{\rule{0.166667em}{0ex}}n}\right)}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}-\phantom{\rule{0.166667em}{0ex}}1/2}}{\mathsf{\Delta}q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{\mathbf{G}}_{\phantom{\rule{0.166667em}{0ex}}j}^{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}},$$

$${\mathbf{G}}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{c}0\\ g\phantom{\rule{0.166667em}{0ex}}{\left(H\phantom{\rule{0.166667em}{0ex}}{h}_{\phantom{\rule{0.166667em}{0ex}}q}\right)}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}\end{array}\right),\phantom{\rule{1.em}{0ex}}{\mathbf{G}}_{j}^{*}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{c}0\\ g{\left(H{h}_{q}\right)}_{j}^{n+1/2}\end{array}\right)\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{1.em}{0ex}}{\mathcal{D}}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{cc}1+{\theta}_{j+1/2}^{1,n}& 0\\ 0& 1+{\theta}_{j+1/2}^{2,n}\end{array}\right)\phantom{\rule{0.166667em}{0ex}}.$$

$${H}_{j}^{n+1/2}=\frac{{H}_{j+1}^{n+1}+{H}_{j-1}^{n+1}+{H}_{j+1}^{n}+{H}_{j-1}^{n}}{4},\phantom{\rule{4pt}{0ex}}{h}_{q,j}^{n+1/2}=\frac{{h}_{j+1}^{n+1}-{h}_{j-1}^{n+1}+{h}_{j+1}^{n}-{h}_{j-1}^{n}}{4\mathsf{\Delta}q},\phantom{\rule{4pt}{0ex}}{h}_{q,\phantom{\rule{0.166667em}{0ex}}j+1/2}^{n}=\frac{{h}_{j+1}^{n}-{h}_{j}^{n}}{\mathsf{\Delta}q}.$$

The matrix $\overline{\mathcal{D}}$ plays the role of $\overline{a}$ (the wave speed relative to the grid nodes) in the scalar case:
Here, ${\lambda}_{k,\phantom{\rule{0.277778em}{0ex}}j+1/2}^{n}$, $k=1,2$ are eigenvalues of the Jacobian matrix ${\mathcal{A}}_{j+1/2}^{n}$:
The local gravity wave speed ${c}_{j+1/2}^{n}$ can be computed analytically:
This choice of the Jacobian $\mathcal{A}$ discretization is dictated by the requirement to preserve the compatibility condition ${\mathit{f}}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\mathcal{A}\phantom{\rule{0.166667em}{0ex}}\left(\mathit{v}\right)\phantom{\rule{0.166667em}{0ex}}{\mathit{v}}_{\phantom{\rule{0.166667em}{0ex}}q}$ at the discrete level as well. It is analogous to a similar algebraic condition on the Jacobian in the Roe scheme [24] but substantially different in details.

$$\overline{\mathcal{D}}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}{\mathcal{D}}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t,\phantom{\rule{0.277778em}{0ex}}j+1/2}^{n}\xb7\mathbb{I},\phantom{\rule{2.em}{0ex}}{\mathcal{D}}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{cc}{\lambda}_{1,\phantom{\rule{0.277778em}{0ex}}j+1/2}^{n}& 0\\ 0& {\lambda}_{2,\phantom{\rule{0.277778em}{0ex}}j+1/2}^{n}\end{array}\right),\phantom{\rule{2.em}{0ex}}\mathbb{I}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{cc}1& 0\\ 0& 1\end{array}\right).$$

$${\mathcal{A}}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{cc}0& 1\\ -{v}_{j}^{n}{v}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}g{H}_{j+1/2}^{n}& 2{v}_{j+1/2}^{n}\end{array}\right),\phantom{\rule{2.em}{0ex}}{\left({\lambda}_{1,2}\right)}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{(v\mp c)}_{j+1/2}^{n}\phantom{\rule{0.166667em}{0ex}},$$

$${c}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\sqrt{{\left({v}_{j+1/2}^{n}\right)}^{2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{v}_{j}^{n}{v}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}g{H}_{j+1/2}^{n}}\phantom{\rule{4pt}{0ex}}\u2a7e\phantom{\rule{4pt}{0ex}}\sqrt{g{H}_{j+1/2}^{n}}\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}}.$$

Finally, the scheme parameter ${\theta}_{j+1/2}^{k}$ is computed according to the same strategy as above, with the only difference being that it is computed separately for each component $k=1,\phantom{\rule{0.166667em}{0ex}}2\phantom{\rule{0.166667em}{0ex}}$:
where ${\xi}_{j+1/2}^{k}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\frac{{\tilde{g}}_{j+1/2-{s}_{k}}^{k}}{{\tilde{g}}_{j+1/2}^{k}}$, ${s}_{k}\equiv {s}_{k,j+1/2}^{n}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\mathrm{sign}\left({\overline{\lambda}}_{k,j+1/2}^{n}\right)$. Here, ${\overline{\lambda}}_{k,j+1/2}^{n}={({\lambda}_{k}-{x}_{t})}_{j+1/2}^{n}$ is simply the diagonal elements of the matrix $\overline{\mathcal{D}}$. The coefficient ${\theta}_{0,j+1/2}^{k}$ is related to the local CFL number as
Finally, we have to specify how to compute the indicators
where ${\tilde{p}}^{\phantom{\rule{0.166667em}{0ex}}k}\phantom{\rule{0.166667em}{0ex}}$, $k\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1,\phantom{\rule{0.166667em}{0ex}}2$ are components of the following vector:
The fully discrete scheme is stable under the following CFL-type restriction [66] on the time step $\tau $:

$${\theta}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}k}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left\{\begin{array}{cc}0,& \left|\phantom{\rule{0.166667em}{0ex}}{\tilde{g}}_{j+1/2}^{k}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}{\tilde{g}}_{j+1/2-{s}_{k}}^{k}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{1.em}{0ex}}\mathrm{and}\phantom{\rule{1.em}{0ex}}{\tilde{g}}_{j+1/2}^{k}\times {\tilde{g}}_{j+1/2-{s}_{k}}^{k}\phantom{\rule{4pt}{0ex}}\u2a7e\phantom{\rule{4pt}{0ex}}0,\hfill \\ {\theta}_{0,j+1/2}^{k}(1\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\xi}_{j+1/2}^{k}),& \left|\phantom{\rule{0.166667em}{0ex}}{\tilde{g}}_{j+1/2}^{k}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}{\tilde{g}}_{j+1/2-{s}_{k}}^{k}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{1.em}{0ex}}\mathrm{and}\phantom{\rule{1.em}{0ex}}{\tilde{g}}_{j+1/2}^{k}\times {\tilde{g}}_{j+1/2-{s}_{k}}^{k}\phantom{\rule{4pt}{0ex}}\u2a7e\phantom{\rule{4pt}{0ex}}0,\hfill \\ {\theta}_{0,j+1/2}^{k},& {\tilde{g}}_{j+1/2}^{k}\times {\tilde{g}}_{j+1/2-{s}_{k}}^{k}\phantom{\rule{4pt}{0ex}}<\phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},\hfill \end{array}\right.$$

$${\theta}_{0,j+1/2}^{k}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\frac{1}{{C}_{k,\phantom{\rule{0.277778em}{0ex}}j+1/2}^{\phantom{\rule{0.277778em}{0ex}}n}}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}1,\phantom{\rule{2.em}{0ex}}{C}_{k,\phantom{\rule{0.277778em}{0ex}}j+1/2}^{\phantom{\rule{0.277778em}{0ex}}n}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\frac{\tau}{\mathsf{\Delta}q}\phantom{\rule{0.277778em}{0ex}}{\left(\frac{\left|\phantom{\rule{0.166667em}{0ex}}{\overline{\lambda}}_{k}\phantom{\rule{0.166667em}{0ex}}\right|}{J}\phantom{\rule{0.277778em}{0ex}}\right)}_{j+1/2}^{n}\phantom{\rule{0.166667em}{0ex}}.$$

$${\tilde{g}}_{j+1/2}^{k}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}{\left(\left|\phantom{\rule{0.166667em}{0ex}}{\overline{\lambda}}_{k}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{0.277778em}{0ex}}(1\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{C}_{k})\phantom{\rule{0.277778em}{0ex}}{\tilde{p}}^{k}\right)}_{j+1/2}^{n},$$

$${\tilde{\mathcal{P}}}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\frac{1}{{\left({c}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}\right)}^{\phantom{\rule{0.166667em}{0ex}}2}}\phantom{\rule{0.277778em}{0ex}}{\left(\begin{array}{c}-\phantom{\rule{0.166667em}{0ex}}c\phantom{\rule{0.166667em}{0ex}}{\eta}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}H\phantom{\rule{0.166667em}{0ex}}{v}_{\phantom{\rule{0.166667em}{0ex}}q}\\ c\phantom{\rule{0.166667em}{0ex}}{\eta}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}H\phantom{\rule{0.166667em}{0ex}}{v}_{\phantom{\rule{0.166667em}{0ex}}q}\end{array}\right)}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{0.166667em}{0ex}}.$$

$$\underset{k,\phantom{\rule{0.277778em}{0ex}}j}{max}\phantom{\rule{4pt}{0ex}}\left\{\phantom{\rule{0.166667em}{0ex}}{C}_{k,\phantom{\rule{0.277778em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{0.166667em}{0ex}}\right\}\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}1\phantom{\rule{0.166667em}{0ex}}.$$

**Remark**

**2.**

We would like to explain better the motivation behind the choice of the vector $\tilde{\mathcal{P}}$ (cf. Equation (21)) in our scheme. This vector appears in the choice of the scheme parameter of Equation (20), of which the role consists in ensuring the monotonicity of the Riemann’s invariants. First of all, let us have a look at the components of vector $\mathcal{P}\phantom{\rule{0.166667em}{0ex}}$:
We can see that vector $\mathcal{P}$ is a sum of two vectors: The first addend depends on the solution gradient $({\eta}_{\phantom{\rule{0.166667em}{0ex}}q},\phantom{\rule{0.166667em}{0ex}}{v}_{\phantom{\rule{0.166667em}{0ex}}q})\phantom{\rule{0.166667em}{0ex}}$, and the second one depends on the bathymetry gradient ${h}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{0.166667em}{0ex}}$. We would like that the scheme parameters ${\theta}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}k}$ depend on the solution and not on the bathymetry. Thus, we made a choice to include only the first addend in the vector $\tilde{\mathcal{P}}\phantom{\rule{0.166667em}{0ex}}$.

$${\mathcal{P}}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{\left(\mathcal{L}\xb7{\mathit{v}}_{\phantom{\rule{0.166667em}{0ex}}q}\right)}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\underset{\equiv \phantom{\rule{4pt}{0ex}}{\tilde{\mathcal{P}}}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}}{\underbrace{\frac{1}{{\left({c}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}\right)}^{\phantom{\rule{0.166667em}{0ex}}2}}\phantom{\rule{0.277778em}{0ex}}{\left(\begin{array}{c}-\phantom{\rule{0.166667em}{0ex}}c\phantom{\rule{0.166667em}{0ex}}{\eta}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}H\phantom{\rule{0.166667em}{0ex}}{v}_{\phantom{\rule{0.166667em}{0ex}}q}\\ c\phantom{\rule{0.166667em}{0ex}}{\eta}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}H\phantom{\rule{0.166667em}{0ex}}{v}_{\phantom{\rule{0.166667em}{0ex}}q}\end{array}\right)}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}}}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\left(\phantom{\rule{0.166667em}{0ex}}\frac{{h}_{\phantom{\rule{0.166667em}{0ex}}q}}{c}\phantom{\rule{0.166667em}{0ex}}\right)}_{\phantom{\rule{0.166667em}{0ex}}j\phantom{\rule{0.166667em}{0ex}}+\phantom{\rule{0.166667em}{0ex}}1/2}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{0.277778em}{0ex}}\left(\begin{array}{c}-\phantom{\rule{0.166667em}{0ex}}1\\ 1\end{array}\right)\phantom{\rule{0.166667em}{0ex}}.$$

#### 4.1.1. Well-Balanced Property

The following property can be shown for the scheme presented above:

**Theorem**

**1.**

Assume that we have a fixed but possibly nonuniform grid $\left\{{x}_{j}^{n}\right\}$. If on the n
then the predictor–corrector scheme described above will preserve this state at the $(n+1)$

^{th}time layer we have the lake at rest state, i.e.,
$${\eta}_{j}^{n}\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}{v}_{j}^{n}\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},$$

^{th}time layer.**Proof.**

Since ${x}_{t,j}\equiv 0$, $\forall j$ and taking into account the definition of Equation (22) of the lake at rest state, we have
Consequently, the predictor step leads to
Then, from the obvious identities ${h}_{j}^{n+1}\equiv {h}_{j}^{n}$ and ${J}_{j}^{n+1}\equiv {J}_{j}^{n}$ and the way we compute ${\mathbf{G}}_{j}^{*}$, it follows that ${\eta}_{j}^{n+1}\equiv 0$, ${v}_{j}^{n+1}\equiv 0$. Thus, the lake at the rest state is preserved at the next time layer as well. □

$${\left(\overline{\mathcal{D}}\times \mathcal{P}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\mathcal{L}\times \mathbf{G}\right)}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}0.$$

$${\widehat{\mathit{f}}}_{j+1/2}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{{\mathit{f}}_{j}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\mathit{f}}_{j+1}^{n}}{2}.$$

The well-balanced property is absolutely crucial to compute qualitatively correct numerical solutions to conservation (balance) laws [88]. Theorem 1 shows that the discretization proposed above does possess this property regardless of some complications coming from the grid motion.

#### 4.1.2. Conservation Property on Moving Grids

For conservation laws with source terms (the so-called balance laws), the conservation property of a numerical scheme is understood in the sense that the fully discrete solution verifies some thoroughly chosen finite difference analogues of continuous balance laws. For the NSWE, we have the conservation of mass and the balance of a horizontal (depth-averaged) momentum. Please note that, on a flat bottom, the balance of momentum becomes a conservation law as well. The conservation property is crucial as well to compute qualitatively correct numerical solutions [88].

On moving grids, we have an additional difficulty: The computation of the speeds of mesh nodes has to be consistent with the calculation of the cell volumes. If it is done in the right way, the discrete geometric conservation law will be verified as well [71]. In 1-D, it can be written as

$${J}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{J}_{j}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\tau \phantom{\rule{0.166667em}{0ex}}{x}_{tq,j}^{n}.$$

We shall show below that other schemes can be put into the conservative form similar to Equation (19). The peculiarity here consists in the fact that the Jacobian matrix $\mathcal{A}$ is nonconstant in contrast to the linear advection equation for which any reasonable scheme is conservative (see also Remark 3 below about a nonlinear scalar equation). Moreover, the moving mesh is another complication, which makes this task rather nontrivial. For example, the scheme parameter ${\theta}_{j\pm 1/2}^{k}$ can be chosen as
This choice corresponds to the first0order upwind scheme (as it was discussed above in Section 2.1). So, the scheme of Equation (19) can be rewritten as
where ${\overline{\mathcal{A}}}^{\pm}=\mathcal{R}{\overline{\mathsf{\Lambda}}}^{\pm}\mathcal{L}$, ${\overline{\lambda}}_{k}^{\pm}={\textstyle \frac{1}{2}}({\overline{\lambda}}_{k}\pm \left|\phantom{\rule{0.166667em}{0ex}}{\overline{\lambda}}_{k}\phantom{\rule{0.166667em}{0ex}}\right|)$ and
One can see also that the following identities hold:
By using these identities and the discrete geometric conservation law of Equation (23), one can derive also the following equivalent form of the scheme from Equation (19):

$${\theta}_{j\pm 1/2}^{k}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{\theta}_{0,j\pm 1/2}^{k},\phantom{\rule{2.em}{0ex}}k\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1,2.$$

$$\begin{array}{c}\frac{{\left(J\mathit{v}\right)}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left(J\mathit{v}\right)}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\hfill \\ \frac{1}{h}\phantom{\rule{0.277778em}{0ex}}[\left(\frac{{\mathit{f}}_{j+1}^{n}+{\mathit{f}}_{j}^{n}}{2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{{\left({\overline{\mathcal{A}}}^{+}-{\overline{\mathcal{A}}}^{-}\right)}_{j+1/2}^{n}}{2}({\mathit{v}}_{j+1}^{n}-{\mathit{v}}_{j}^{n})\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left({x}_{t}\phantom{\rule{0.166667em}{0ex}}\mathit{v}\right)}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{h}{2}{\left(\mathcal{R}\mathcal{S}\mathcal{L}\mathbf{G}\right)}_{j+1/2}^{n}\right)\phantom{\rule{4pt}{0ex}}-\\ \hfill (\frac{{\mathit{f}}_{j}^{n}+{\mathit{f}}_{j-1}^{n}}{2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{{\left({\overline{\mathcal{A}}}^{+}-{\overline{\mathcal{A}}}^{-}\right)}_{j-1/2}^{n}}{2}({\mathit{v}}_{j}^{n}-{\mathit{v}}_{j-1}^{n})\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left({x}_{t}\phantom{\rule{0.166667em}{0ex}}\mathit{v}\right)}_{j-1/2}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{h}{2}{\left(\mathcal{R}\mathcal{S}\mathcal{L}\mathbf{G}\right)}_{j-1/2}^{n})]={\mathbf{G}}_{j}^{*},\end{array}$$

$$\mathcal{S}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{cc}\mathrm{sign}\left({\lambda}_{1}\right)& 0\\ 0& \mathrm{sign}\left({\lambda}_{2}\right)\end{array}\right),\phantom{\rule{2.em}{0ex}}{\overline{\mathsf{\Lambda}}}^{\pm}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left(\begin{array}{cc}{\overline{\lambda}}_{1}^{\pm}& 0\\ 0& {\overline{\lambda}}_{2}^{\pm}\end{array}\right).$$

$$\overline{\mathsf{\Lambda}}\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}{\overline{\mathsf{\Lambda}}}^{+}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\overline{\mathsf{\Lambda}}}^{-},\phantom{\rule{2.em}{0ex}}{\overline{\mathcal{A}}}^{+}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\overline{\mathcal{A}}}^{-}\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}\overline{\mathcal{A}}\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}\mathcal{A}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{t}\phantom{\rule{0.166667em}{0ex}}\mathbb{I}.$$

$$\begin{array}{cc}\frac{{\mathit{v}}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\mathit{v}}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{1}{{J}_{j}^{n+1}}\phantom{\rule{0.277778em}{0ex}}\left[{\left({\mathcal{A}}^{+}{\mathit{v}}_{q}\right)}_{j-1/2}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\left({\mathcal{A}}^{-}{\mathit{v}}_{q}\right)}_{j+1/2}^{n}\right]\phantom{\rule{4pt}{0ex}}=\hfill & \\ & \hfill \frac{1}{{J}_{j}^{n+1}}\phantom{\rule{0.277778em}{0ex}}\left[{\mathbf{G}}_{j}^{*}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\textstyle \frac{1}{2}}\left({\left(\mathcal{R}\mathcal{S}\mathcal{L}\mathbf{G}\right)}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\left(\mathcal{R}\mathcal{S}\mathcal{L}\mathbf{G}\right)}_{j-1/2}^{n}\right)\right].\end{array}$$

The choice of Equation (20) of the scheme parameter ${\theta}_{j\pm 1/2}^{k}$ leads to a conservative scheme as well, but the underlying computations (to show it) are less elegant.

**Remark**

**3.**

In order to illustrate even better the interplay between conservative and nonconservative forms, let us take again the inviscid Burgers–Hopf equation [69]:
For the sake of simplicity, let us discretize this equation on a uniform grid using the following nonconservative scheme:
It is not difficult to see that this nonconservative scheme is equivalent to the following conservative upwind scheme:
However, if one takes a different nonconservative scheme (The difference is in the estimation of propagation speed, cf. ${u}_{j}^{n}$ vs. $\frac{1}{2}}({u}_{j}^{n}+{u}_{j-1}^{n})$)
it is straightforward to see that one cannot transform it into a conservative form. Moreover, one can even show that the scheme of Equation (24) is not converging. Therefore, the conservation and convergence properties are intrinsically related.

$${u}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\left(\frac{{u}^{2}}{2}\right)}_{x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

$$\frac{{u}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{u}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{{u}_{j}^{n}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{u}_{j-1}^{n}}{2}\times \frac{{u}_{j}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{u}_{j-1}^{n}}{\mathsf{\Delta}x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

$$\frac{{u}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{u}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{1}{\mathsf{\Delta}x}\phantom{\rule{0.277778em}{0ex}}\left(\phantom{\rule{0.166667em}{0ex}}\frac{{\left({u}_{j}^{n}\right)}^{2}}{2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}\frac{{\left({u}_{j-1}^{n}\right)}^{2}}{2}\phantom{\rule{0.166667em}{0ex}}\right)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

$$\frac{{u}_{j}^{n+1}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{u}_{j}^{n}}{\tau}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{u}_{j}^{n}\times \frac{{u}_{j}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{u}_{j-1}^{n}}{\mathsf{\Delta}x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0,$$

#### 4.2. Numerical Results

In this section, we present two test cases of complex wave propagation in shallow water equations. The first test case is a validation against an implicit analytic solution, derived below specifically for this purpose, while the second test case is related to real-world applications.

#### 4.2.1. Exact Solution Derivation

In order to validate the numerical scheme, we derive an exact solution to nonlinear shallow water equations which will serve as a reference solution. We already saw this particular solution in the literature [89]; however, the derivation procedure is published for the first time to our knowledge.

First of all, we assume that the bottom is flat, i.e., $h\left(x\right)={h}_{0}=\mathrm{const}>0$, and we consider an initial value problem on the real line:
The nonlinear shallow water equations are rewritten using the Riemann invariants [90]:
where
We seek for a particular solution in the form of an r-wave propagating in the leftward direction. In other words, we assume $s={s}_{0}=\mathrm{const}$. Assuming that, at infinity, the water is at rest, we deduce that ${s}_{0}=2{c}_{0}=2\sqrt{g{h}_{0}}$. Then, from the formula $u+2c={s}_{0}$, we deduce that the speed $u(x,t)$ is related to the total depth:
Consequently, taking the limit $t\to 0$, we have a similar relation between the initial conditions:
If we introduce a new variable
the governing equation for the r-invariant becomes simply the Burgers–Hopf equation:
The solution can be obtained using the method of characteristics by the following implicit formula [21,70]:
where ${p}_{0}\left(x\right)$ is the initial condition
Consequently, the solution $p(x,t)$ can be obtained at any space location x and time instance t by solving the following implicit equation
Once, $p(x,t)$ is found, the free surface elevation $\eta (x,t)$ can be reconstructed by using this formula
and the flow speed $u(x,t)$ from Equation (25).

$$\eta \phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}0)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{\eta}_{\phantom{\rule{0.166667em}{0ex}}0}\phantom{\rule{0.166667em}{0ex}}\left(x\right)\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}u\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}0)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{u}_{\phantom{\rule{0.166667em}{0ex}}0}\phantom{\rule{0.166667em}{0ex}}\left(x\right)\phantom{\rule{0.166667em}{0ex}}.$$

$${r}_{\phantom{\rule{0.166667em}{0ex}}t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{3\phantom{\rule{0.166667em}{0ex}}r\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}s}{4}\phantom{\rule{0.277778em}{0ex}}{r}_{\phantom{\rule{0.166667em}{0ex}}x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}{s}_{\phantom{\rule{0.166667em}{0ex}}t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\frac{r\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}3\phantom{\rule{0.166667em}{0ex}}s}{4}\phantom{\rule{0.277778em}{0ex}}{s}_{\phantom{\rule{0.166667em}{0ex}}x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},$$

$$r\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}u\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}2\phantom{\rule{0.166667em}{0ex}}c\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}s\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}u\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}2\phantom{\rule{0.166667em}{0ex}}c\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}c\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\sqrt{g\phantom{\rule{0.166667em}{0ex}}H}\phantom{\rule{0.166667em}{0ex}}.$$

$$u(x,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{s}_{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}2c\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}2{c}_{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}2\sqrt{gH(x,t)}.$$

$${u}_{0}\left(x\right)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}2{c}_{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}2\sqrt{g({\eta}_{0}\left(x\right)+{h}_{0})}.$$

$$p(x,t)\phantom{\rule{4pt}{0ex}}:=\phantom{\rule{4pt}{0ex}}\frac{3r(x,t)\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{s}_{0}}{4},$$

$${p}_{t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}p\phantom{\rule{0.166667em}{0ex}}{p}_{x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0.$$

$$p(x,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{p}_{0}\left(x\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}p(x,t)t\right),$$

$${p}_{0}\left(x\right)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{3r(x,0)\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{s}_{0}}{4}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}2{c}_{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}3\sqrt{g({\eta}_{0}\left(x\right)+{h}_{0})}.$$

$$p(x,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}2{c}_{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}3\sqrt{g({\eta}_{0}\left(x-p(x,t)\phantom{\rule{0.166667em}{0ex}}t\right)+{h}_{0})}.$$

$$\eta (x,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{\left(\frac{2{c}_{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}p(x,t)}{3\sqrt{g}}\right)}^{2}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{h}_{0},$$

**Remark**

**4.**

Please note that this method works only until the gradient catastrophe occurs at some time instance $t={t}^{*}$, which depends on the initial condition.

**Remark**

**5.**

In order to guarantee the solvability of Equation (26), it is enough to check that the following function
is monotonic in p for $0<t<{t}^{*}$.

$$f(p;x,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}p\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}3\sqrt{g({\eta}_{0}\left(x-p\phantom{\rule{0.166667em}{0ex}}t\right)+{h}_{0})}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}2{c}_{0}$$

#### 4.2.2. Validation

Using the method described above, we obtain the analytical solution for the following initial value problem:
where ${x}_{w}$ is the wave crest position and a is the wave amplitude. For $0<t<{t}^{*}$, the profile ${\eta}_{0}\left(x\right)$ will propagate to the left with the speed ${c}_{0}$ preserving its wavelength $\lambda $ and amplitude a. However, the gradient catastrophe will inevitably take place since the characteristics $\frac{\mathrm{d}x}{\mathrm{d}t}={p}_{0}\left(x\right)$ departing from the interval $({x}_{w}-\lambda /2,\phantom{\rule{0.277778em}{0ex}}{x}_{w})$ form a converging beam. On the other hand, the characteristics from $({x}_{w},\phantom{\rule{0.277778em}{0ex}}{x}_{w}+\lambda /2)$ diverges. Thus, the solution looks like a compression wave followed by a rarefaction wave. With the parameters specified in Table 4, the gradient catastrophe takes place at about $t={t}^{*}\approx 5.57$. The numerical results are shown in Figure 6 right before the gradient catastrophe occurs. The adaptive grid was constructed using the following monitor function, which contains an additional term with respect to Equation (11)
which is discretized as

$${\eta}_{0}\left(x\right)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left\{\begin{array}{cc}\frac{a}{2}\phantom{\rule{0.166667em}{0ex}}\left[1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}cos\left(\frac{2\pi (x\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{w})}{\lambda}\right)\right],\hfill & \hfill \left|\phantom{\rule{0.166667em}{0ex}}x\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{w}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}\lambda /2,\\ 0,\hfill & \hfill \left|\phantom{\rule{0.166667em}{0ex}}x\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{w}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}\lambda /2,\end{array}\right.$$

$$w(x,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\alpha}_{0}\phantom{\rule{0.166667em}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}\eta (x,t)\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\alpha}_{1}\phantom{\rule{0.166667em}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}{\eta}_{x}(x,t)\phantom{\rule{0.166667em}{0ex}}\right|,$$

$${w}_{j+1/2}^{n}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\alpha}_{0}\phantom{\rule{0.166667em}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}{\eta}_{j+1/2}^{n}\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}{\alpha}_{1}\phantom{\rule{0.166667em}{0ex}}\frac{\left|\phantom{\rule{0.166667em}{0ex}}{\eta}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\eta}_{j}^{n}\phantom{\rule{0.166667em}{0ex}}\right|}{{x}_{j+1}^{n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{j}^{n}}.$$

The thin solid line in Figure 6 represents the exact solution computed by solving Equation (26) as it was explained in the previous section. The agreement between these two profiles is exemplary. On the right panel, one can see how the nodes follow the wave propagation and how their density increases around the steep gradient. On the other hand, the use of a fixed grid leads to a noticeable smearing of the numerical solution.

The exact solution presented in the previous Section 4.2.1 can be used in order to study the absolute accuracy of proposed numerical methods. To this end, we introduce two discrete norms:
where n is the time step number corresponding to the final simulation time $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{T}_{\phantom{\rule{0.166667em}{0ex}}f}\phantom{\rule{0.166667em}{0ex}}$. Here, f denotes the free surface elevation $\eta $ or the depth-averaged horizontal velocity $u\phantom{\rule{0.166667em}{0ex}}$. The reference solution for u and $\eta $ is provided by Equations (25) and (27), correspondingly. We would like to mention that the above definition of the norm ${\left|\left|\phantom{\rule{0.166667em}{0ex}}\xb7\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}2}$ is valid for the fixed and moving grids. The computational results are reported for the fixed and moving grids in Table 5 and Table 6 respectively. All the parameters in these simulations were fixed and taken from Table 4 (except the parameter $N\phantom{\rule{0.166667em}{0ex}}$, which was varied). The second order convergence can be observed in Table 5. In general, the results obtained on a moving grid are more accurate than those on a fixed one as it follows from the comparison of corresponding cells in Table 5 and Table 6. In the last column of these tables, we report also the CPU times measured on a computer equiped with an Intel Pentium CPU 3.2 Ghz and 1Gb of RAM. The code was implemented in Fortran and compiled with Compaq Visual Fortran compiler (version 6.6c). In particular, for the finest grid ($N\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}6\phantom{\rule{0.166667em}{0ex}}400$), the overhead related to the grid motion represents less than 7% of the overall CPU time and the error (measured in the most stringent norm ${\left|\left|\phantom{\rule{0.166667em}{0ex}}\xb7\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}\infty}$) is reduced by a factor of four. Thus, we may conclude that the application of moving grid methods is very interesting from the practical point of view.

$$\begin{array}{cc}\hfill {\left|\left|\phantom{\rule{0.166667em}{0ex}}{f}_{\phantom{\rule{0.166667em}{0ex}}h}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\mathit{f}}_{\phantom{\rule{0.166667em}{0ex}}\mathrm{ref}}\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}\infty}\phantom{\rule{4pt}{0ex}}& :=\phantom{\rule{4pt}{0ex}}\underset{1\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}j\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}N\phantom{\rule{0.166667em}{0ex}}-\phantom{\rule{0.166667em}{0ex}}1}{max}\left|\phantom{\rule{0.166667em}{0ex}}{f}_{\phantom{\rule{0.166667em}{0ex}}j}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}f\phantom{\rule{0.166667em}{0ex}}({x}_{\phantom{\rule{0.166667em}{0ex}}j},\phantom{\rule{0.166667em}{0ex}}{T}_{\phantom{\rule{0.166667em}{0ex}}f})\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{0.166667em}{0ex}},\hfill \\ \hfill {\left|\left|\phantom{\rule{0.166667em}{0ex}}{f}_{\phantom{\rule{0.166667em}{0ex}}h}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{\mathit{f}}_{\phantom{\rule{0.166667em}{0ex}}\mathrm{ref}}\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}2}\phantom{\rule{4pt}{0ex}}& :=\phantom{\rule{4pt}{0ex}}{\left(\phantom{\rule{0.166667em}{0ex}}\sum _{j\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}1}^{N\phantom{\rule{0.166667em}{0ex}}-\phantom{\rule{0.166667em}{0ex}}1}\phantom{\rule{0.166667em}{0ex}}{\left({f}_{\phantom{\rule{0.166667em}{0ex}}j}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}f\phantom{\rule{0.166667em}{0ex}}({x}_{\phantom{\rule{0.166667em}{0ex}}j},\phantom{\rule{0.166667em}{0ex}}{T}_{\phantom{\rule{0.166667em}{0ex}}f})\right)}^{\phantom{\rule{0.166667em}{0ex}}2}\xb7\frac{{x}_{\phantom{\rule{0.166667em}{0ex}}j+1}^{\phantom{\rule{0.166667em}{0ex}}n}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}j-1}^{\phantom{\rule{0.166667em}{0ex}}n}}{2}\phantom{\rule{0.166667em}{0ex}}\right)}^{\phantom{\rule{0.166667em}{0ex}}2}\phantom{\rule{0.166667em}{0ex}},\hfill \end{array}$$

We underline also the fact that even better results could be obtained if one optimizes the monitor function parameters ${\alpha}_{\phantom{\rule{0.166667em}{0ex}}0,\phantom{\rule{0.166667em}{0ex}}1}$ along with mesh motion parameters $\beta $ and $\sigma \phantom{\rule{0.166667em}{0ex}}$. In our numerical simulations, we just took some reasonable values. At the current stage of the development of these methods, it is difficult to say something on the optimal values of these parameters a priori. Finally, we would like to mention that this test case is relatively difficult for both the analytical and numerical methods, since we deal with a nonlinear system of hyperbolic equations and at the final time $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{T}_{\phantom{\rule{0.166667em}{0ex}}f}$ the wave has almost developed a discontinuity (from a smooth initial condition). Thus, we operate at the edge of validity of the analytical solutions of Equations (25) and (27).

#### 4.2.3. Solitary Wave Run-Up

As the last test case, we consider a practically important problem of a solitary wave run-up on a sloping beach. The main difficulty here consists in the fact that the fluid domain may vary in time and its evolution is not known a priori. It has to be determined dynamically during the simulation. The wetting/drying algorithm was described in detail in our previous study [91]. Here, we focus mainly on the mesh motion algorithm behaviour.

Consider a closed 1-D channel with the bathymetry prescribed by the following function:
where $\theta $ is the sloping beach angle. The variable bathymetry region is located leftwards from ${x}_{s}=2cot\theta \approx 38.16$. At the initial time, the shoreline is located at ${x}_{00}=cot\theta \approx 19.08$.

$$z\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}-h\left(x\right)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left\{\begin{array}{cc}{h}_{0}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}xtan\theta & 0\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}x\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}{x}_{s},\hfill \\ -{h}_{0},& {x}_{s}\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}x\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}\ell ,\hfill \end{array}\right.$$

The initial condition is a solitary wave prescribed by the following formulas (which come from the analytical solitary wave solution to the Serre equations, see Reference [92], for example):
Variables a and ${x}_{0,w}={x}_{s}+30\approx 68.16$ are the initial solitary wave amplitude and position, correspondingly. The right boundary is located at $\ell ={x}_{0,w}+30\approx 98.16$. All numerical parameters used in this experiment are provided in Table 7.

$$\begin{array}{cc}\hfill \eta (x,0)\phantom{\rule{4pt}{0ex}}& =\phantom{\rule{4pt}{0ex}}a\phantom{\rule{0.277778em}{0ex}}{\mathrm{sech}}^{2}\left[\phantom{\rule{0.166667em}{0ex}}\frac{\sqrt{3ga}}{2{h}_{0}\sqrt{g({h}_{0}+a)}}\phantom{\rule{0.277778em}{0ex}}(x\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{0,w})\right],\hfill \\ \hfill u(x,0)\phantom{\rule{4pt}{0ex}}& =\phantom{\rule{4pt}{0ex}}-\sqrt{g({h}_{0}+a)}\phantom{\rule{0.277778em}{0ex}}\frac{\eta (x,0)}{{h}_{0}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\eta (x,0)},\hfill \end{array}$$

The considered situation is complex enough so that the analytical solution is not available. However, we can simulate it numerically with the predictor–corrector scheme on the moving grids presented above. The wave run-up process simulated in silico is depicted in Figure 7a, while the nodes motion is illustrated in the right panel Figure 7b. Please note that only every fifth node is depicted in Figure 7b in order to improve the visibility of the image. The rightmost node is fixed (i.e., its trajectory is a straight line), while the leftmost node’s trajectory coincides with the shoreline motion. One can see that, even on domains with variable spatial extent, the mesh motion algorithm is robust enough and it puts the resolution where it is needed.

The monitor function used in this computation is
It is important to use the wave elevation $\eta (x,t)$ instead of the total water depth $H(x,t)$ because of solutions such as the lake at rest state. In these situations, the total depth H varies in space, while the free surface elevation $\eta (x,t)\equiv 0$. Thus, the usage of the monitor function of Equation (30) leads to the uniform grid (since $w(x,t)\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}1$) and, trivially, to the well-balanced property shown in Theorem 1.

$$w(x,t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\alpha \phantom{\rule{0.166667em}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}\eta (x,t)\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{0.166667em}{0ex}}.$$

Some further validation tests and numerical experiments with this moving grid technique were presented in our preceding work [91] (without giving many details about the algorithm in use).

## 5. Some Open Problems

Only in very simple problems (linear and steady) one can study theoretically the choice of the optimal monitor function. Recently, we performed such an analysis for a singularly perturbed Sturm–Liouville problem [45]. In particular, we showed that a judicious choice of the monitor function allows an increase in the order of convergence from the 2nd to the 4th order (the so-called supraconvergence phenomenon), even if the scheme is just 2nd-order accurate on uniform meshes. Therefore, the first open problem consists in providing a similar analysis for, at least, the 1-D unsteady or nonlinear problems. The method employed in Reference [45] is suitable for smooth solutions. For discontinuous ones, a different technique has to be proposed. Even a linear transport equation is not completely understood from the perspective of constructing a suitable moving grid. It is even possible that, for every discretization scheme, there is its own “optimal” monitor function. Therefore, one choice clearly does not fit all possible schemes. Moreover, even if we choose the monitor function as in Equation (30), it was shown in Reference [45] that the error may depend non-monotonically on the coefficient $\alpha $. Thus, even if the monitor function form is fixed, one has to set optimal values of coefficients in this function.

## 6. Discussion

The main conclusions and perspectives of this study are outlined below.

#### 6.1. Conclusions

In the present work, our goal was to present a moving grid methodology that does not involve any interpolation procedure (thus avoiding the unnecessary smearing of the numerical solution). We showed some reasonable choices of the monitor function, which are currently used in practice, but these choices have to be refined further in the forthcoming works. The current state-of-the-art in this field is described in Reference [41].

In this manuscript, we presented a detailed description of a family of predictor–corrector schemes up to the second order in space, which were generalized to the case of nonuniform moving meshes, while having all these properties simultaneously:

- Conservation in space;
- Second-order accuracy (in smooth regions);
- TVD property for scalar problems;
- A well-balanced character;
- Preservation of the discrete conservation law in cell centers and cell interfaces;
- Adaptivity in space and in time (The time step is chosen the largest possible while meeting the stability requirement);
- No interpolation between the meshes; thus, we do not add any unnecessary numerical diffusion;
- Implementation is trivial, despite all good properties listed above.

This is the main novelty and contribution of our study to the growing field of adaptive numerical methods. This method was illustrated on a number of relatively serious tests coming from linear, nonlinear, and vectorial cases. Every time, the gain of using a moving grid (with respect to the fixed one) was clearly visible. Consequently, we can only encourage the community to use these (or similar) adaptive strategies to improve the quality and efficiency of their numerical simulations. In particular, the field of tsunami wave modelling could greatly benefit from the moving grid nodes to improve the accuracy and computational efficiency of operational tsunami wave predictions.

#### 6.2. Perspectives

The adaptive moving mesh technology presented in this study relies on the choice of the monitor function along with several free real parameters. Numerical experiments show that the method performance may depend crucially on the choice of these real numbers. Consequently, it would be highly desirable to obtain some theoretical estimations of the optimal choice of these parameters at least in the case of the simplest linear advection Equation (1). It constitutes one of the main challenges raised by our study. In the absence of such theoretical indications, one might envisage extensive numerical studies in order to issue some practical recommendations on how to choose reasonable values of parameters. Most probably, the case of nonlinear systems of conservation laws will remain essentially empiric in the foreseeable future due to the important theoretical difficulties in its analysis.

From a more practical point of view, the predictor-corrector schemes on moving grids presented in this study have to be generalized at least to a two-dimensional case as it was done for the Godunov scheme in Reference [52]. We already reported an implementation of the moving grid technique in two space dimensions for an elliptic problem in Reference [58]. Moreover, the spatial adaptivity has to be coupled with time-adaptive strategies such as the PI step size control [93] in order to achieve the full adaptivity.

Finally, there is another goal behind this study. Ultimately, we would like to generalize moving grid methods to some dispersive wave equations [92], which are going to be addressed with the operator splitting approach along the lines sketched in Reference [46]. In this way, the hyperbolic part would be addressed with the methods outlined above. The particularity of dispersive wave equations is that they possess localised solitary wave solutions. In other words, all the dynamics are concentrated in small portions of space, which move perpetually. Consequently, the grid redistribution techniques seem to be the natural choice to simulate complex solitonic gas dynamics [94].

## Author Contributions

All authors contributed equally to this study.

## Funding

This research was supported by RSCF project No. 14-17-00219. D. Dutykh acknowledges the support of the CNRS under the PEPS InPhyNiTi project FARA and project No. EDC26179 “Wave interaction with an obstacle”, as well as the hospitality of the Institute of Computational Technologies of SB RAS during his visit in October 2015. D. Mitsotakis was supported by the Marsden Fund administered by the Royal Society of New Zealand.

## Acknowledgments

We would like to thank Laurent Gosse (CNR, Italy) for the insightful discussions on the topics covered in our study. Moreover, we would like to thank the anonymous Referee on our previous manuscript [91] who incited us by his comments to produce a study which explains in more details our grid motion technique.

## Conflicts of Interest

The authors declare no conflict of interest.

## Appendix A. Illustrative Examples

Let us consider the “unsteady” version of the equidistribution principle expressed as the following nonlinear elliptic Boundary Value Problem (BVP):
with the following boundary conditions:
The first inherent problem with Equation (A1) is that small perturbations of the monitor function $w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)$ may lead to finite changes in the solution $x\phantom{\rule{0.166667em}{0ex}}(q,\phantom{\rule{0.166667em}{0ex}}t)$ as it is illustrated in the following example.

$${\left(\phantom{\rule{0.166667em}{0ex}}w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.277778em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{0.166667em}{0ex}}\right)}_{\phantom{\rule{0.166667em}{0ex}}q}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}q\phantom{\rule{4pt}{0ex}}\in \phantom{\rule{4pt}{0ex}}[\phantom{\rule{0.166667em}{0ex}}0,\phantom{\rule{0.166667em}{0ex}}1\phantom{\rule{0.166667em}{0ex}}]\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}0\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}t\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}{T}_{\phantom{\rule{0.166667em}{0ex}}f}\phantom{\rule{0.166667em}{0ex}},$$

$$x\phantom{\rule{0.166667em}{0ex}}(0,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}x\phantom{\rule{0.166667em}{0ex}}(1,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\ell \phantom{\rule{0.166667em}{0ex}}\phantom{\rule{2.em}{0ex}}0\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}t\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}{T}_{\phantom{\rule{0.166667em}{0ex}}f}\phantom{\rule{0.166667em}{0ex}}.$$

#### Appendix A.1. Example 1

Let, for $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n}$, the monitor function w be constant, i.e., $w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n})\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}1\phantom{\rule{0.166667em}{0ex}}$. Then, the solution to the BVPs of Equations (A1) and (A2) take the following simple form:
This solution prescribes the uniform distribution of nodes on $[\phantom{\rule{0.166667em}{0ex}}0,\phantom{\rule{0.166667em}{0ex}}\ell \phantom{\rule{0.166667em}{0ex}}]\phantom{\rule{0.166667em}{0ex}}$. Let us also assume that, at the next time step $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n+1}$, the monitor function w was perturbed with quantity $\epsilon $ on a portion of the segment $[\phantom{\rule{0.166667em}{0ex}}0,\phantom{\rule{0.166667em}{0ex}}\ell \phantom{\rule{0.166667em}{0ex}}]\phantom{\rule{0.166667em}{0ex}}$:
Then, the solution to the BVPs of Equations (A1) and (A2) will be given by the following piecewise linear function:
where ${q}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{\displaystyle \frac{(1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\epsilon )\phantom{\rule{0.166667em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}}{\ell \phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}}}\phantom{\rule{0.166667em}{0ex}}$. From here, the following estimation follows:
It is not difficult to check that this norm of the difference takes the maximal value for ${x}_{\phantom{\rule{0.166667em}{0ex}}*}^{\phantom{\rule{0.166667em}{0ex}}max}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{\displaystyle \frac{\ell \phantom{\rule{0.166667em}{0ex}}(\sqrt{1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\epsilon}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}1)}{\epsilon}}\phantom{\rule{0.166667em}{0ex}}$. For this given ${x}_{\phantom{\rule{0.166667em}{0ex}}*}^{\phantom{\rule{0.166667em}{0ex}}max}$ and for small values of $\epsilon $, we have
Hence, by choosing the domain length ℓ sufficiently large, we can obtain a finite (To obtain truly finite perturbations in $x\phantom{\rule{0.166667em}{0ex}}(q,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.166667em}{0ex}}$, it is sufficient to take $\ell \phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\mathcal{O}\phantom{\rule{0.166667em}{0ex}}\left({\epsilon}^{\phantom{\rule{0.166667em}{0ex}}-1}\right)\phantom{\rule{0.166667em}{0ex}}$) perturbation in the solution to the BVPs of Equations (A1) and (A2).

$$x\phantom{\rule{0.166667em}{0ex}}(q,\phantom{\rule{0.166667em}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n})\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}q\phantom{\rule{0.166667em}{0ex}}\ell \phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}q\phantom{\rule{4pt}{0ex}}\in \phantom{\rule{4pt}{0ex}}[\phantom{\rule{0.166667em}{0ex}}0,\phantom{\rule{0.166667em}{0ex}}1\phantom{\rule{0.166667em}{0ex}}]\phantom{\rule{0.166667em}{0ex}}.$$

$$w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n+1})\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\{\phantom{\rule{4pt}{0ex}}\begin{array}{cc}\phantom{\rule{4pt}{0ex}}1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}},\phantom{\rule{1.em}{0ex}}\hfill & x\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}},\\ \phantom{\rule{4pt}{0ex}}1\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{1.em}{0ex}}\hfill & x\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}},\end{array}\phantom{\rule{2.em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{4pt}{0ex}}\in \phantom{\rule{4pt}{0ex}}[\phantom{\rule{0.166667em}{0ex}}0,\phantom{\rule{0.166667em}{0ex}}\ell \phantom{\rule{0.166667em}{0ex}}]\phantom{\rule{0.166667em}{0ex}}.$$

$$x\phantom{\rule{0.166667em}{0ex}}(q,\phantom{\rule{0.166667em}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n+1})\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\{\begin{array}{cc}\phantom{\rule{4pt}{0ex}}q\phantom{\rule{0.277778em}{0ex}}\frac{{x}_{\phantom{\rule{0.166667em}{0ex}}*}}{{q}_{\phantom{\rule{0.166667em}{0ex}}*}}\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{1.em}{0ex}}\hfill & q\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}{q}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}},\\ \phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}(q\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{q}_{\phantom{\rule{0.166667em}{0ex}}*})\phantom{\rule{0.277778em}{0ex}}\frac{\ell \phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}}{1\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{q}_{\phantom{\rule{0.166667em}{0ex}}*}}\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{1.em}{0ex}}\hfill & q\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}{q}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}},\end{array}$$

$${\left|\left|\phantom{\rule{0.166667em}{0ex}}x(\xb7,\phantom{\rule{0.166667em}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n+1})\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}x(\xb7,\phantom{\rule{0.166667em}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n})\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}C\phantom{\rule{0.166667em}{0ex}}\left(Q\right)}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}x({q}_{\phantom{\rule{0.166667em}{0ex}}*},\phantom{\rule{0.166667em}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n+1})\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}x({q}_{\phantom{\rule{0.166667em}{0ex}}*},\phantom{\rule{0.166667em}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n})\phantom{\rule{0.166667em}{0ex}}\right|\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{\epsilon \phantom{\rule{0.166667em}{0ex}}(\ell \phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*})\phantom{\rule{0.166667em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}}{\ell \phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}}\phantom{\rule{0.166667em}{0ex}}.$$

$${\left|\left|\phantom{\rule{0.166667em}{0ex}}x(\xb7,\phantom{\rule{0.166667em}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n+1})\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}x(\xb7,\phantom{\rule{0.166667em}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n})\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}C\phantom{\rule{0.166667em}{0ex}}\left(Q\right)}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{\ell \phantom{\rule{0.166667em}{0ex}}(2\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\epsilon \phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}2\phantom{\rule{0.166667em}{0ex}}\sqrt{1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\epsilon})}{\epsilon}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{\epsilon \phantom{\rule{0.166667em}{0ex}}\ell}{4}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\mathcal{O}\phantom{\rule{0.166667em}{0ex}}\left({\epsilon}^{\phantom{\rule{0.166667em}{0ex}}2}\right)\phantom{\rule{0.166667em}{0ex}}.$$

In numerical practice, it means that the grid nodes in the vicinity of the point $x\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}^{\phantom{\rule{0.166667em}{0ex}}max}$ will undergo a shift proportional to $\propto \phantom{\rule{4pt}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}\ell $ when we advance the solution from the time layer $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n}$ to $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n+1}\phantom{\rule{0.166667em}{0ex}}$. If, for some reason, on the time layer $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{t}_{\phantom{\rule{0.166667em}{0ex}}n+1}$ the monitor function w becomes constant (In this case, the monitor function may assume two possible constant values $w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}1$ or $w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}$) again, the grid nodes will experience an opposite move towards a uniform grid as in Equation (A3) again. Such oscillations have been observed numerically, and the present example provides a theoretical explanation of this phenomenon.

#### Appendix A.2. Example 2

In order to complete the description of possible shortcomings of the equidistribution principle for the mesh motion in evolutionary PDEs, in this section, we consider a simple unsteady problem where the scenario described in Example 1 is actually realized.

Consider the linear advection equation:
where the source term is chosen to be
In this section, $\epsilon $ is a small parameter and ${x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{4pt}{0ex}}\in \phantom{\rule{4pt}{0ex}}[\phantom{\rule{0.166667em}{0ex}}0,\phantom{\rule{0.166667em}{0ex}}\ell \phantom{\rule{0.166667em}{0ex}}]\phantom{\rule{0.166667em}{0ex}}$. An exact solution to the homogeneous Initial-Boundary Value Problem (IBVP) in domain $[\phantom{\rule{0.166667em}{0ex}}0,\phantom{\rule{0.166667em}{0ex}}\ell \phantom{\rule{0.166667em}{0ex}}]\phantom{\rule{0.166667em}{0ex}}\backslash \phantom{\rule{0.166667em}{0ex}}\left\{\phantom{\rule{0.166667em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}}\right\}$ is given by the following formula:
Let us choose the monitor function as
and take the parameter $\alpha \phantom{\rule{4pt}{0ex}}\equiv \phantom{\rule{4pt}{0ex}}1$ for simplicity. Then, it is not difficult to check that
The nonuniform grid given by the equidistribution principle is obtained as a solution to the BVPs of Equations (A1) and (A2). In this example, it takes precisely the form of Equation (A4), but the point ${q}_{\phantom{\rule{0.166667em}{0ex}}*}$ depends on time:
It is not difficult to show that the maximal speed of grid nodes $-\phantom{\rule{0.166667em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}t}$ is achieved at $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0$ and ${x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{\ell}{2}\phantom{\rule{0.166667em}{0ex}}$. Moreover, $max\{-\phantom{\rule{0.166667em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}t}\}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{\epsilon \phantom{\rule{0.166667em}{0ex}}\ell}{4}\phantom{\rule{0.166667em}{0ex}}$. The grid at $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}0$ is uniform, and at the first time step, it will experience a brutal shift to the left. The maximal displacement being equal to $\frac{\epsilon \phantom{\rule{0.166667em}{0ex}}\ell}{4}\phantom{\rule{0.166667em}{0ex}}$. This shift may provoke, at least, a loss of accuracy or, in the worst case scenario, a blowup of the numerical solution. The latter may routinely happen in some explicit schemes, where the time step does not take into account the grid nodes displacements.

$${u}_{\phantom{\rule{0.166667em}{0ex}}t}\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}a\phantom{\rule{0.166667em}{0ex}}{u}_{\phantom{\rule{0.166667em}{0ex}}x}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}f\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{2.em}{0ex}}a\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\mathrm{const}\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},$$

$$f\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\{\begin{array}{cc}\phantom{\rule{4pt}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}({x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}x\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}a\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{1.em}{0ex}}\hfill & x\phantom{\rule{4pt}{0ex}}\u2a7d\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}},\\ \phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{1.em}{0ex}}\hfill & x\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}}.\end{array}$$

$$u\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\{\begin{array}{cc}\phantom{\rule{4pt}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{0.166667em}{0ex}}({x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}x)\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{1.em}{0ex}}\hfill & x\phantom{\rule{4pt}{0ex}}<\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}},\\ \phantom{\rule{4pt}{0ex}}0\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{1.em}{0ex}}\hfill & x\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}}.\end{array}$$

$$w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\alpha \phantom{\rule{0.166667em}{0ex}}\left|\phantom{\rule{0.166667em}{0ex}}{u}_{\phantom{\rule{0.166667em}{0ex}}x}\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.166667em}{0ex}}\right|$$

$$w\phantom{\rule{0.166667em}{0ex}}(x,\phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\{\begin{array}{cc}\phantom{\rule{4pt}{0ex}}1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{1.em}{0ex}}\hfill & x\phantom{\rule{4pt}{0ex}}<\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}},\\ \phantom{\rule{4pt}{0ex}}1\phantom{\rule{0.166667em}{0ex}},\phantom{\rule{1.em}{0ex}}\hfill & x\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{0.166667em}{0ex}}.\end{array}$$

$${q}_{\phantom{\rule{0.166667em}{0ex}}*}\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}\frac{(1\phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}t)\phantom{\rule{0.166667em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}}{\ell \phantom{\rule{4pt}{0ex}}+\phantom{\rule{4pt}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{0.166667em}{0ex}}{x}_{\phantom{\rule{0.166667em}{0ex}}*}}\phantom{\rule{0.166667em}{0ex}}.$$

Henceforth, we have just demonstrated analytically that the grid constructed with the equidistribution principle of Equation (A1) turns out to be unstable when the equidistribution principle is applied in unsteady problems. Indeed, arbitrary small perturbations in the monitor function or in the governing equation may lead to finite perturbations in the grid. Thus, we highly recommend the use of the unsteady parabolic Equation (15) in order to move grid nodes smoothly.

## Appendix B. Abbreviations

1D | One-dimensional |

2D | Two-dimensional |

BVP | Boundary Value Problem |

CFL | Courant–Friedrichs–Lewy |

DART | Deep-ocean Assessment and Reporting Tsunamis |

FEM | Finite Elements Method |

FNWD | Fully NonlinearWeakly Dispersive |

IBVP | Initial-Boundary Value Problem |

MOST | Method Of Splitting Tsunami |

NSWE | Nonlinear ShallowWater Equations |

PDE | Partial Differential Equation |

TVD | Total Variation Diminishing |

WNWD | Weakly NonlinearWeakly Dispersive |

## References

- Imamura, F. Simulation of wave-packet propagation along sloping beach by TUNAMI-code. In Long-Wave Runup Models; Yeh, H., Liu, P.L.-F., Synolakis, C.E., Eds.; World Scientific: Singapore, 1996; pp. 231–241. [Google Scholar]
- Titov, V.V.; González, F.I. Implementation and Testing of the Method of Splitting Tsunami (MOST) Model; Pacific Marine Environmental Laboratory: Seattle, WA, USA, 1997. [Google Scholar]
- Titov, V.V.; Synolakis, C.E. Numerical modeling of 3-D long wave runup using VTCS-3. In Long Wave Runup Models; Yeh, H., Liu, P.L.-F., Synolakis, C.E., Eds.; World Scientific: Singapore, 1996; pp. 242–248. [Google Scholar]
- Wang, X.; Powel, W.L. COMCOT: A Tsunami Generation, Propagation and Run-Up Model; GNS Science Report 2011/43; GNS Science: Lower Hutt, New Zealand, 2011; p. 121. [Google Scholar]
- Shokin, Y.I.; Babailov, V.V.; Beisel, S.A.; Chubarov, L.B.; Eletsky, S.V.; Fedotova, Z.I.; Gusiakov, V.K. Mathematical Modeling in Application to Regional Tsunami Warning Systems Operations. In Computational Science and High Performance Computing III, Proceedings of the 3rd Russian-German Advanced Research Workshop, Novosibirsk, Russia, 23–27 July 2007; Springer: Berlin/Heidelberg, Germany, 2008; pp. 52–68. [Google Scholar]
- Synolakis, C.E.; Bernard, E.N. Tsunami science before and beyond Boxing Day 2004. Phil. Trans. R. Soc. A
**2006**, 364, 2231–2265. [Google Scholar] [CrossRef] [PubMed] - Dalrymple, R.A.; Grilli, S.T.; Kirby, J.T. Tsunamis and challenges for accurate modeling. Oceanography
**2006**, 19, 142–151. [Google Scholar] [CrossRef] - Grilli, S.T.; Ioualalen, M.; Asavanant, J.; Shi, F.; Kirby, J.T.; Watts, P. Source Constraints and Model Simulation of the December 26, 2004, Indian Ocean Tsunami. J. Waterw. Port Coast. Ocean Eng.
**2007**, 133, 414–428. [Google Scholar] [CrossRef] - Murty, T.S.; Rao, A.D.; Nirupama, N.; Nistor, I. Numerical modelling concepts for tsunami warning systems. Curr. Sci.
**2006**, 90, 1073–1081. [Google Scholar] - Mirchina, N.R.; Pelinovsky, E.N. Nonlinear and dispersive effects for tsunami waves in the open ocean. Int. J. Tsunami Soc.
**1982**, 2, 1073–1081. [Google Scholar] - Dao, M.H.; Tkalich, P. Tsunami propagation modelling—A sensitivity study. Nat. Hazards Earth Syst. Sci.
**2007**, 7, 741–754. [Google Scholar] [CrossRef] - Løvholt, F.; Pedersen, G.; Gisler, G. Oceanic propagation of a potential tsunami from the La Palma Island. J. Geophys. Res.
**2008**, 113, C09026. [Google Scholar] [CrossRef] - Lovholt, F.; Pedersen, G.; Glimsdal, S. Coupling of Dispersive Tsunami Propagation and Shallow Water Coastal Response. Open Oceanogr. J.
**2010**, 4, 71–82. [Google Scholar] [CrossRef] - Peregrine, D.H. Long waves on a beach. J. Fluid Mech.
**1967**, 27, 815–827. [Google Scholar] [CrossRef] - Glimsdal, S.; Pedersen, G.K.; Harbitz, C.B.; Løvholt, F. Dispersion of tsunamis: Does it really matter? Natl. Hazards Earth Syst. Sci.
**2013**, 13, 1507–1526. [Google Scholar] [CrossRef] - Kirby, J.T.; Shi, F.; Tehranirad, B.; Harris, J.C.; Grilli, S.T. Dispersive tsunami waves in the ocean: Model equations and sensitivity to dispersion and Coriolis effects. Ocean Model.
**2013**, 62, 39–55. [Google Scholar] [CrossRef] - Khakimzyanov, G.S.; Dutykh, D.; Fedotova, Z.I. Dispersive shallow water wave modelling. Part III: Model derivation on a globally spherical geometry. Commun. Comput. Phys.
**2018**, 23, 315–360. [Google Scholar] [CrossRef] - Khakimzyanov, G.S.; Dutykh, D.; Gusev, O. Dispersive shallow water wave modelling. Part IV: Numerical simulation on a globally spherical geometry. Commun. Comput. Phys.
**2018**, 23, 361–407. [Google Scholar] [CrossRef] - Michalopoulos, P.G.; Yi, P.; Lyrintzis, A.S. Continuum modelling of traffic dynamics for congested freeways. Transp. Res. Part B Methodol.
**1993**, 27, 315–332. [Google Scholar] [CrossRef] - Dutykh, D.; Mitsotakis, D. On the relevance of the dam break problem in the context of nonlinear shallow water equations. Discret. Contin. Dyn. Syst. Ser. B
**2010**, 13, 799–818. [Google Scholar] [CrossRef] - Whitham, G.B. Linear and Nonlinear Waves; John Wiley & Sons Inc.: New York, NY, USA, 1999. [Google Scholar]
- Godunov, S.K. A finite difference method for the numerical computation of discontinuous solutions of the equations of fluid dynamics. Mat. Sb.
**1959**, 47, 271–290. [Google Scholar] - Godunov, S.K. Reminiscences about Difference Schemes. J. Comput. Phys.
**1999**, 153, 6–25. [Google Scholar] [CrossRef] - Roe, P.L. Approximate Riemann solvers, parameter vectors and difference schemes. J. Comput. Phys.
**1981**, 43, 357–372. [Google Scholar] [CrossRef] - Fuhrmann, J.; Ohlberger, M.; Rohde, C. Finite Volumes for Complex Applications VII—Elliptic, Parabolic and Hyperbolic Problems; Springer: Berlin, Germany, 2014. [Google Scholar]
- Babuska, I.; Henshaw, W.D.; Oliger, J.E.; Flaherty, J.E.; Hopcroft, J.E.; Tezduyar, T. (Eds.) Modeling, Mesh Generation, and Adaptive Numerical Methods for Partial Differential Equations; The IMA Volumes in Mathematics and Its Applications; Springer: New York, NY, USA, 1995; Volume 75. [Google Scholar]
- Babuska, I.; Suri, M. The p and h-p Versions of the Finite Element Method, Basic Principles and Properties. SIAM Rev.
**1994**, 36, 578–632. [Google Scholar] [CrossRef] - Houston, P.; Süli, E. hp-Adaptive Discontinuous Galerkin Finite Element Methods for First-Order Hyperbolic Problems. SIAM J. Sci. Comput.
**2001**, 23, 1226–1252. [Google Scholar] [CrossRef] - Arvanitis, C.; Katsaounis, T.; Makridakis, C. Adaptive Finite Element Relaxation Schemes for Hyperbolic Conservation Laws. ESAIM Math. Model. Numer. Anal.
**2010**, 35, 17–33. [Google Scholar] [CrossRef] - Berger, M.J.; Oliger, J. Adaptive mesh refinement for hyperbolic partial differential equations. J. Comp. Phys.
**1984**, 53, 484–512. [Google Scholar] [CrossRef] - Berger, M.J.; Colella, P. Local adaptive mesh refinement for shock hydrodynamics. J. Comp. Phys.
**1989**, 82, 64–84. [Google Scholar] [CrossRef] - George, D.L.; Leveque, R.J. Finite volume methods and adaptive refinement for global tsunami propagation and local inundation. Sci. Tsunami Hazards
**2006**, 24, 319. [Google Scholar] - Popinet, S. Gerris: A tree-based adaptive solver for the incompressible Euler equations in complex geometries. J. Comp. Phys.
**2003**, 190, 572–600. [Google Scholar] [CrossRef] - Tang, H.; Tang, T. Adaptive Mesh Methods for One- and Two-Dimensional Hyperbolic Conservation Laws. SIAM J. Numer. Anal.
**2003**, 41, 487–515. [Google Scholar] [CrossRef] - Arvanitis, C.; Delis, A.I. Behavior of Finite Volume Schemes for Hyperbolic Conservation Laws on Adaptive Redistributed Spatial Grids. SIAM J. Sci. Comput.
**2006**, 28, 1927–1956. [Google Scholar] [CrossRef] - Degtyarev, L.M.; Drozdov, V.V.; Ivanova, T.S. The method of adaptive grids for the solution of singularly perturbed one dimensional boundary value problems. Differ. Uravn.
**1987**, 23, 1160–1169. [Google Scholar] - Degtyarev, L.M.; Ivanova, T.S. The adaptive-grid method in one-dimensional nonstationary convection-diffusion problems. Differ. Uravn.
**1993**, 29, 1179–1192. [Google Scholar] - Shokin, Y.I.; Urusov, A.I. On the construction of adaptive algorithms for unsteady problems of gas dynamics in arbitrary coordinate systems. In Eighth International Conference on Numerical Methods in Fluid Dynamics; Springer: Berlin/Heidelberg, Germany, 1982; pp. 481–486. [Google Scholar]
- Huang, W.; Ren, Y.; Russell, R.D. Moving Mesh Methods Based on Moving Mesh Partial Differential Equations. J. Comp. Phys.
**1994**, 113, 279–290. [Google Scholar] [CrossRef] - Gasparin, S.; Berger, J.; Dutykh, D.; Mendes, N. An innovative method to determine optimum insulation thickness based on non-uniform adaptive moving grid. J. Braz. Soc. Mech. Sci. Eng.
**2019**, 41, 173. [Google Scholar] [CrossRef] - Huang, W.; Russell, R.D. Adaptive Moving Mesh Methods; Applied Mathematical Sciences; Springer: New York, NY, USA, 2011. [Google Scholar]
- Liseikin, V.D. Grid Generation Methods, 2nd ed.; Scientific Computation; Springer: Dordrecht, The Netherlands, 2010. [Google Scholar]
- Godunov, S.K.; Zabrodin, A.; Ivanov, M.Y.; Kraiko, A.N.; Prokopov, G.P. Numerical Solution of Multidimensional Problems of Gas Dynamics; Nauka: Moscow, Russia, 1976. [Google Scholar]
- Liseikin, V.D. The construction of structured adaptive grids—A review. Comp. Math. Math. Phys.
**1996**, 36, 1–32. [Google Scholar] - Khakimzyanov, G.; Dutykh, D. On supraconvergence phenomenon for second order centered finite differences on non-uniform grids. J. Comp. Appl. Math.
**2017**, 326, 1–14. [Google Scholar] [CrossRef] - Khakimzyanov, G.S.; Dutykh, D.; Gusev, O. Dispersive shallow water wave modelling. Part II: Numerical modelling on a globally flat space. Commun. Comput. Phys.
**2018**, 23, 30–92. [Google Scholar] [CrossRef] - Sudobicher, V.G.; Shugrin, S.M. Flow along a dry channel. Izv. Akad. Nauk SSSR
**1968**, 13, 116–122. [Google Scholar] - Alalykin, G.B.; Godunov, S.K.; Kireyeva, L.L.; Pliner, L.A. Solution of One-Dimensional Problems in Gas Dynamics on Moving Grids; Nauka: Moscow, Russia, 1970. [Google Scholar]
- Serezhnikova, T.I.; Sidorov, A.F.; Ushakova, O.V. On one method of construction of optimal curvilinear grids and its applications. Russ. J. Numer. Anal. Math. Model.
**1989**, 4, 137–156. [Google Scholar] [CrossRef] - Shokin, Y.I.; Yanenko, N.N. Method of Differential Approximation: Application to Gas Dynamics; Nauka: Novosibirsk, Russia, 1985. [Google Scholar]
- Darmaev, L.M.; Liseikin, V.D. A method of construction of multidimensional adaptive grids. Model. Mech.
**1987**, 1, 49–58. [Google Scholar] - Azarenok, B.N.; Ivanenko, S.A.; Tang, T. Adaptive Mesh Redistibution Method Based on Godunov’s Scheme. Commun. Math. Sci.
**2003**, 1, 152–179. [Google Scholar] [CrossRef] - Beckett, G.; Mackenzie, J.A.; Ramage, A.; Sloan, D.M. Computational Solution of Two-Dimensional Unsteady PDEs Using Moving Mesh Methods. J. Comp. Phys.
**2002**, 182, 478–495. [Google Scholar] [CrossRef] - Cao, W.; Huang, W.; Russell, R.D. A Study of Monitor Functions for Two-Dimensional Adaptive Mesh Generation. SIAM J. Sci. Comput.
**1999**, 20, 1978–1994. [Google Scholar] [CrossRef] - Prokopov, G.P. About organization of comparison of algorithms and programs for 2D regular difference mesh construction. Vopr. At. Nauk. Tekh. Ser. Mat. Model. Fiz. Prozess.
**1989**, 3, 98–108. [Google Scholar] - Budd, C.J.; Huang, W.; Russell, R.D. Adaptivity with moving grids. Acta Numer.
**2009**, 18, 111–241. [Google Scholar] [CrossRef] - Bona, J.; Varlamov, V. Wave generation by a moving boundary. Nonlinear Partial Differ. Equ. Relat. Anal.
**2005**, 371, 41–71. [Google Scholar] - Khakimzyanov, G.S.; Dutykh, D. Numerical Modelling of Surface Water Wave Interaction with a Moving Wall. Commun. Comput. Phys.
**2018**, 23, 1289–1354. [Google Scholar] [CrossRef] - Knobloch, E. and Krechetnikov, R. Problems on Time-Varying Domains: Formulation, Dynamics, and Challenges. Acta Appl. Math.
**2015**, 137, 123–157. [Google Scholar] [CrossRef] - MacCormack, R.W. The effect of viscosity in hypervelocity impact cratering. AIAA Pap.
**1969**. [Google Scholar] [CrossRef] - Chhay, M.; Hoarau, E.; Hamdouni, A.; Sagaut, P. Comparison of some Lie-symmetry-based integrators. J. Comp. Phys.
**2011**, 230, 2174–2188. [Google Scholar] [CrossRef] - Dorodnitsyn, V.A. Finite Difference Models Entirely Inheriting Continuous Symmetry of Original Differential Equations. Int. J. Mod. Phys. C
**1994**, 5, 723–734. [Google Scholar] [CrossRef] - Huang, W.; Russell, R.D. Adaptive mesh movement—The MMPDE approach and its applications. J. Comp. Appl. Math.
**2001**, 128, 383–398. [Google Scholar] [CrossRef] - Lax, P.; Wendroff, B. Systems of conservation laws. Commun. Pure Appl. Math.
**1960**, 13, 217–237. [Google Scholar] [CrossRef] - Courant, R.; Isaacson, E.; Rees, M. On the solution of nonlinear hyperbolic differential equations by finite differences. Comm. Pure Appl. Math.
**1952**, 5, 243–255. [Google Scholar] [CrossRef] - Courant, R.; Friedrichs, K.; Lewy, H. Über die partiellen Differenzengleichungen der mathematischen Physik. Math. Ann.
**1928**, 100, 32–74. [Google Scholar] [CrossRef] - Breuss, M. About the Lax-Friedrichs scheme for the numerical approximation of hyperbolic conservation laws. PAMM
**2004**, 4, 636–637. [Google Scholar] [CrossRef] - Shokin, Y.I.; Sergeeva, Y.V.; Khakimzyanov, G.S. Construction of monotonic schemes by the differential approximation method. Russ. J. Numer. Anal. Math. Model.
**2005**, 20, 463–481. [Google Scholar] [CrossRef] - LeVeque, R.J. Numerical Methods for Conservation Laws, 2nd ed.; Birkhäuser: Basel, Switzerland, 1992. [Google Scholar]
- Rozhdestvenskiy, B.L.; Yanenko, N.N. Systems of Quasilinear Equations and Their Application to Gas Dynamics; Nauka: Moscow, Russia, 1978. [Google Scholar]
- Thomas, P.D.; Lombart, C.K. Geometric conservation law and its application to flow computations on moving grid. AIAA J.
**1979**, 17, 1030–1037. [Google Scholar] [CrossRef] - Budd, C.J.; Williams, J.F. Moving Mesh Generation Using the Parabolic Monge-Ampère Equation. SIAM J. Sci. Comput.
**2009**, 31, 3438–3465. [Google Scholar] [CrossRef] - Stockie, J.M.; Mackenzie, J.A.; Russell, R.D. A Moving Mesh Method for One-dimensional Hyperbolic Conservation Laws. SIAM J. Sci. Comput.
**2001**, 22, 1791–1813. [Google Scholar] [CrossRef] - Fedorenko, R.P. Introduction to Computational Physics; MIPT Press: Moscow, Russia, 1994. [Google Scholar]
- Dar’in, N.A.; Mazhukin, V.I.; Samarskii, A.A. A finite-difference method for solving the equations of gas dynamics using adaptive nets which are dynamically associated with the solution. USSR Comput. Math. Math. Phys.
**1988**, 28, 164–174. [Google Scholar] [CrossRef] - Dorfi, E.A.; Drury, L.O. Simple adaptive grids for 1-D initial value problems. J. Comp. Phys.
**1987**, 69, 175–195. [Google Scholar] [CrossRef] - Zegeling, P.A.; Blom, J.G. An evaluation of the gradient-weighted moving-finite-element method in one space dimension. J. Comp. Phys.
**1992**, 103, 422–441. [Google Scholar] [CrossRef] - Zegeling, P.A.; Verwer, J.G.; Van Eijkeren, J.C.H. Application of a moving grid method to a class of 1D brine transport problems in porous media. Int. J. Num. Meth. Fluids
**1992**, 15, 175–191. [Google Scholar] [CrossRef] - Coyle, J.M.; Flaherty, J.E.; Ludwig, R. On the stability of mesh equidistribution strategies for time-dependent partial differential equations. J. Comp. Phys.
**1986**, 62, 26–39. [Google Scholar] [CrossRef] - Daripa, P. Iterative schemes and algorithms for adaptive grid generation in one dimension. J. Comp. Phys.
**1992**, 100, 284–293. [Google Scholar] [CrossRef] - Asselin, R. Frequency filter for time integrations. Mon. Weather Rev.
**1972**, 100, 487–490. [Google Scholar] [CrossRef] - Burgers, J.M. A mathematical model illustrating the theory of turbulence. Adv. Appl. Mech.
**1948**, 1, 171–199. [Google Scholar] - Harten, A. High resolution schemes for hyperbolic conservation laws. J. Comp. Phys.
**1983**, 49, 357–393. [Google Scholar] [CrossRef] - Stoker, J.J. Water Waves: The Mathematical Theory with Applications; Interscience: New York, NY, USA, 1957. [Google Scholar]
- Krejic, N.; Krunic, T.; Nedeljkov, M. Numerical verification of delta shock waves for pressureless gas dynamics. J. Math. Anal. Appl.
**2008**, 345, 243–257. [Google Scholar] [CrossRef] - van Dam, A.; Zegeling, P.A. A robust moving mesh finite volume method applied to 1D hyperbolic conservation laws from magnetohydrodynamics. J. Comp. Phys.
**2006**, 216, 526–546. [Google Scholar] [CrossRef] - Barakhnin, V.B.; Borodkin, N.V. The second order approximation TVD scheme on moving adaptive grids for hyperbolic systems. Sib. Zhurnal Vychisl. Mat.
**2000**, 3, 109–121. [Google Scholar] - Gosse, L. Computing Qualitatively Correct Approximations of Balance Laws: Exponential-Fit, Well-Balanced and Asymptotic-Preserving, 1st ed.; SIMAI Springer Series; Springer: Milan, Italy, 2013. [Google Scholar]
- Voltsinger, N.E.; Pelinovsky, E.N.; Klevannyi, K.A. Long Wave Dynamics of Coastal Regions; Gidrometeoizdat: Leningrad, Russia, 1989. [Google Scholar]
- Toro, E.F. Riemann Solvers and Numerical Methods for Fluid Dynamics; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
- Khakimzyanov, G.S.; Shokina, N.Y.; Dutykh, D.; Mitsotakis, D. A new run-up algorithm based on local high-order analytic expansions. J. Comp. Appl. Math.
**2016**, 298, 82–96. [Google Scholar] [CrossRef] - Dutykh, D.; Clamond, D.; Milewski, P.; Mitsotakis, D. Finite volume and pseudo-spectral schemes for the fully nonlinear 1D Serre equations. Eur. J. Appl. Math.
**2013**, 24, 761–787. [Google Scholar] [CrossRef] - Hairer, E.; Nørsett, S.P.; Wanner, G. Solving Ordinary Differential Equations: Nonstiff Problems; Springer: Berlin, Germany, 2009. [Google Scholar]
- Dutykh, D.; Pelinovsky, E. Numerical simulation of a solitonic gas in KdV and KdV-BBM equations. Phys. Lett. A
**2014**, 378, 3102–3110. [Google Scholar] [CrossRef]

**Figure 1.**A discontinuous profile propagation under the linear advection of Equation (1): (

**a**) A comparison of different profiles (The thin solid line is the exact solution, (1) is the numerical solution on the uniform mesh, (2) is the solution on the moving mesh, and (3) is the first order upwind scheme on the uniform mesh); (

**b**) the trajectories of grid nodes in space–time. Note that the Figure 1a shows only a zoom of the computational domain.

**Figure 2.**A smooth profile propagation under the linear advection of Equation (1): (

**a**) A comparison of different profiles (The thin solid line is the exact solution, (1) is the numerical solution on the uniform mesh, and (2) is the solution on the moving mesh); (

**b**) the trajectories of grid nodes in space–time. Note that Figure 2a shows only a zoom of the computational domain.

**Figure 3.**The stationary shock wave formation in the Burgers–Hopf equation: (

**a**) A comparison of different profiles (The thin solid line is the exact solution, (1) is the numerical solution on the uniform mesh, and (2) is the solution on the moving mesh); (

**b**) the trajectories of grid nodes in space–time. Note that Figure 3a shows only a zoom of the computational domain.

**Figure 4.**A stationary shock wave formation in the Burgers–Hopf equation: (

**a**) A comparison of different profiles (The thin solid line is the exact solution, (1) is the numerical solution on the uniform mesh, and (2) is the solution on the moving mesh); (

**b**) the trajectories of grid nodes in space–time. Note that Figure 4a shows only a zoom of the computational domain.

**Figure 6.**The shock wave formation in nonlinear shallow water equations: (

**a**) A comparison of different profiles (The thin solid line (1) is the exact solution, (2) is the numerical solution on the moving mesh, and (3) is the solution on the fixed uniform mesh); (

**b**) the trajectories of grid nodes in space–time. Notice that Figure 6a shows only a zoom of the computational domain.

**Figure 7.**The solitary wave run-up simulation on a sloping beach with nonlinear shallow water equations: (

**a**) The free surface elevation evolution and (

**b**) the trajectories of grid nodes in space–time.

**Table 1.**The numerical parameters used to simulate the discontinuous profile propagation under the linear advection of Equation (1).

Parameter | Value |
---|---|

Computational domain length, ℓ | $30.0$ |

Number of nodes, N | 150 |

CFL number, C | $0.8$ |

Final simulation time, ${T}_{f}$ | $10.0$ |

Propagation speed, a | $1.0$ |

Initial position of the discontinuity, ${x}_{*}$ | $10.0$ |

Monitor function parameter, $\alpha $ | $10.0$ |

Grid diffusion parameter, $\beta $ | $150.0$ |

Smoothing parameter, $\sigma $ | $100.0$ |

**Table 2.**The numerical parameters used to simulate the bell-shaped profile propagation under the linear advection of Equation (1).

Parameter | Value |
---|---|

Computational domain length, ℓ | $5.0$ |

Number of nodes, N | 150 |

CFL number, C | $0.8$ |

Final simulation time, ${T}_{f}$ | $3.0$ |

Initial position of the bell, ${x}_{0}$ | $1.0$ |

Propagation speed, a | $1.0$ |

Monitor function parameter, $\alpha $ | $20.0$ |

Grid diffusion parameter, $\beta $ | $20.0$ |

Smoothing parameter, $\sigma $ | $10.0$ |

**Table 3.**The numerical parameters used to simulate a stationary shock-wave formation under the Burgers–Hopf equation dynamics.

Parameter | Value |
---|---|

Computational domain length, ℓ | $30.0$ |

Number of nodes, N | 60 |

Final simulation time, ${T}_{f}$ | $10.0$ |

CFL number, C | $0.2$ |

Left transition coordinate, ${x}_{l}$ | $10.0$ |

Right transition coordinate, ${x}_{r}$ | $20.0$ |

Left constant state, ${u}_{l}$ | $1.0$ |

Right constant state, ${u}_{r}$ | $-1.0$ |

Monitor function parameter, $\alpha $ | $15.0$ |

Grid diffusion parameter, $\beta $ | $80.0$ |

Smoothing parameter, $\sigma $ | $60.0$ |

**Table 4.**The numerical parameters used in validations of the nonlinear shallow water equations solver.

Parameter | Value |
---|---|

Computational domain length, ℓ | $40.0$ |

Number of nodes, N | 100 |

Final simulation time, ${T}_{f}$ | $5.0$ |

CFL number, C | $0.95$ |

Gravity acceleration, g | $9.81$ |

Initial wave amplitude, a | $0.2$ |

Wave crest initial position, ${x}_{w}$ | $30.0$ |

Initial wavelength, $\lambda $ | $10.0$ |

Undisturbed water depth, ${h}_{0}$ | $1.0$ |

Monitor function parameter, ${\alpha}_{0}$ | $10.0$ |

Monitor function parameter, ${\alpha}_{1}$ | $10.0$ |

Grid diffusion parameter, $\beta $ | $5.0$ |

Smoothing parameter, $\sigma $ | $5.0$ |

**Table 5.**The numerical solution errors measured at the final simulation time $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{T}_{\phantom{\rule{0.166667em}{0ex}}f}$ on a fixed grid. The reference solution is given be Equations (25) and (27). All numerical parameters for this simulation are reported in Table 4.

N | $\mathit{\eta}$ | u | CPU Time, s | ||
---|---|---|---|---|---|

${\left|\left|\phantom{\rule{0.166667em}{0ex}}{\mathit{\eta}}_{\phantom{\rule{0.166667em}{0ex}}\mathit{h}}-{\mathit{\eta}}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{ref}}\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{\infty}}$ | ${\left|\left|\phantom{\rule{0.166667em}{0ex}}{\mathit{\eta}}_{\phantom{\rule{0.166667em}{0ex}}\mathit{h}}-{\mathit{\eta}}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{ref}}\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{2}}$ | ${\left|\left|\phantom{\rule{0.166667em}{0ex}}{\mathit{u}}_{\phantom{\rule{0.166667em}{0ex}}\mathit{h}}-{\mathit{u}}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{ref}}\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{\infty}}$ | ${\left|\left|\phantom{\rule{0.166667em}{0ex}}{\mathit{u}}_{\phantom{\rule{0.166667em}{0ex}}\mathit{h}}-{\mathit{u}}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{ref}}\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{2}}$ | ||

100 | $0.388\times {10}^{-1}$ | $0.289\times {10}^{-1}$ | $0.363\times {10}^{-1}$ | $0.270\times {10}^{-1}$ | $<{10}^{\phantom{\rule{0.166667em}{0ex}}-\phantom{\rule{0.166667em}{0ex}}2}$ |

200 | $0.245\times {10}^{-1}$ | $0.127\times {10}^{-1}$ | $0.229\times {10}^{-1}$ | $0.118\times {10}^{-1}$ | $0.03$ |

400 | $0.104\times {10}^{-1}$ | $0.451\times {10}^{-2}$ | $0.977\times {10}^{-2}$ | $0.424\times {10}^{-2}$ | $0.20$ |

800 | $0.418\times {10}^{-2}$ | $0.144\times {10}^{-2}$ | $0.394\times {10}^{-2}$ | $0.136\times {10}^{-2}$ | $1.36$ |

1600 | $0.128\times {10}^{-2}$ | $0.393\times {10}^{-3}$ | $0.122\times {10}^{-2}$ | $0.373\times {10}^{-3}$ | $9.05$ |

3200 | $0.353\times {10}^{-3}$ | $0.103\times {10}^{-3}$ | $0.337\times {10}^{-3}$ | $0.981\times {10}^{-4}$ | $71.08$ |

6400 | $0.885\times {10}^{-4}$ | $0.257\times {10}^{-4}$ | $0.843\times {10}^{-4}$ | $0.245\times {10}^{-4}$ | $573.11$ |

**Table 6.**The numerical solution errors measured at the final simulation time $t\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{T}_{\phantom{\rule{0.166667em}{0ex}}f}$ on a moving grid. The reference solution is given be Equations (25) and (27). All numerical parameters for this simulation are reported in Table 4.

N | $\mathit{\eta}$ | u | CPU Time, s | ||
---|---|---|---|---|---|

${\left|\left|\phantom{\rule{0.166667em}{0ex}}{\mathit{\eta}}_{\phantom{\rule{0.166667em}{0ex}}\mathit{h}}-{\mathit{\eta}}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{ref}}\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{\infty}}$ | ${\left|\left|\phantom{\rule{0.166667em}{0ex}}{\mathit{\eta}}_{\phantom{\rule{0.166667em}{0ex}}\mathit{h}}-{\mathit{\eta}}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{ref}}\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{2}}$ | ${\left|\left|\phantom{\rule{0.166667em}{0ex}}{\mathit{u}}_{\phantom{\rule{0.166667em}{0ex}}\mathit{h}}-{\mathit{u}}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{ref}}\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{\infty}}$ | ${\left|\left|\phantom{\rule{0.166667em}{0ex}}{\mathit{u}}_{\phantom{\rule{0.166667em}{0ex}}\mathit{h}}-{\mathit{u}}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{ref}}\phantom{\rule{0.166667em}{0ex}}\right|\right|}_{\phantom{\rule{0.166667em}{0ex}}\mathbf{2}}$ | ||

100 | $0.125\times {10}^{-1}$ | $0.907\times {10}^{-2}$ | $0.123\times {10}^{-1}$ | $0.900\times {10}^{-2}$ | $0.03$ |

200 | $0.591\times {10}^{-2}$ | $0.415\times {10}^{-2}$ | $0.586\times {10}^{-2}$ | $0.413\times {10}^{-2}$ | $0.20$ |

400 | $0.266\times {10}^{-2}$ | $0.170\times {10}^{-2}$ | $0.264\times {10}^{-2}$ | $0.170\times {10}^{-2}$ | $1.13$ |

800 | $0.897\times {10}^{-3}$ | $0.608\times {10}^{-3}$ | $0.894\times {10}^{-3}$ | $0.606\times {10}^{-3}$ | $5.76$ |

1600 | $0.317\times {10}^{-3}$ | $0.215\times {10}^{-3}$ | $0.316\times {10}^{-3}$ | $0.214\times {10}^{-3}$ | $27.66$ |

3200 | $0.881\times {10}^{-4}$ | $0.566\times {10}^{-4}$ | $0.878\times {10}^{-4}$ | $0.563\times {10}^{-4}$ | $130.00$ |

6400 | $0.221\times {10}^{-4}$ | $0.142\times {10}^{-4}$ | $0.220\times {10}^{-4}$ | $0.142\times {10}^{-4}$ | $612.60$ |

**Table 7.**The numerical parameters used in a solitary wave run-up simulation in nonlinear shallow water equations.

Parameter | Value |
---|---|

Computational domain length, ℓ | $98.16$ |

Number of nodes, N | 1000 |

Final simulation time, ${T}_{f}$ | $30.0$ |

CFL number, C | $0.95$ |

Gravity acceleration, g | $9.81$ |

Initial wave amplitude, $a/{h}_{0}$ | $0.05$ |

Wave crest initial position, ${x}_{0,w}$ | $68.16$ |

Beach slope position, ${x}_{s}$ | $38.16$ |

Beach slope, $\theta $ | ${3}^{\circ}$ |

Undisturbed water depth, ${h}_{0}$ | $1.0$ |

Monitor function parameter, $\alpha $ | $60.0$ |

Grid diffusion parameter, $\beta $ | $20.0$ |

Smoothing parameter, $\sigma $ | $10.0$ |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).