Solving PDEs in C++: Numerical Methods in a Unified Object-Oriented Approach

In this chapter, we consider the Maxwell equations that model electromagnetic waves. In certain cases, these equations can be reduced to the scalar Helmholtz equation. We discuss the adequacy of finite-difference and finite-element discretization methods for this problem. Finally, we discuss models for the measuring problem, which can also be formulated as Maxwell or Helmholtz equations.
We start the discussion with the second-order linear wave equation, which governs the propagation of waves in a homogeneous medium. The domain is the unit square 0 < x, y < 1, and the time variable is ?? < t < ?. The constant c is the wave speed. The functions f(t, x, y) and g(t, y) are given in advance, and the function u(t, x, y) is the unknown solution. The wave equation is
We consider the following boundary conditions: on the left edge of the square, the boundary conditions are of Dirichlet type:
On the top and bottom edges, the boundary conditions are of homogeneous Neumann type:
Finally, on the right edge, the boundary conditions are of mixed type:
These boundary conditions imply that the wave issues from the left edge and leaves the square only through the right edge (with speed c) but not through the top or bottom edge.
Assume that the given functions f(t, x, y) and g(t, y) are square-integrable and also integrable in absolute value with respect to the time variable t:
Then,...