Generating meshes for efficient waveform simulations in heterogeneous media with complex topography or internal structures has long been considered a difficult and time-consuming task.

SalvusMesh is a powerful tool to automate or at least prototype the generation of highly efficient spectral-element meshes.

On the following pages, we describe requirements, design criteria and potential pitfalls of generating meshes.

There is also a series of tutorials demonstrating various aspects and features.

Before Salvus can crunch some numbers, all physics need to be represented by a finite set of values. In particular, there are three different entities that need to be dicretized:

**the domain** that is the geometry of the object through which the waves propagate**the model or medium properties** that is how density and velocity vary within the domain**the wavefield** that is the space- and time-dependent solution of the wave equation.

Here, we focus on discrete representations using finite-element meshes of
variable polynomial order. Note that the discrete representation of all entities
involves polynomials, describing (1) the shape transformation of the elements to
characterize the domain, (2) the interpolation of the medium parameters
for the model, and (3) the discrete spatial representation of the wavefield.
Alternative approaches which not covered could include, for instance, wavelets, spherical harmonics, or splines.

Talking about the polynmial order might be ambiguous. In principle, a different degree might be used for domain, model and wavefield. In Salvus, however, we currently only distinguish between the 'tensor_order' which is the polynomial degree used for the domain and the model, and the degree of the wavefield, which for simplicity, we continue to call 'polynomial_degree'.

The highest resolvable frequency - or the shortest period, respectively - is the main external driver governing the mesh generation.
It influences the wavelengths of the wavefield, the effective medium which results in a homogenized model, as well as the resolution of topography and bathymetry that yield the effective domain.

The computational costs are proportional to the number of elements and the
number of time steps. Being able to resolve higher frequencies obviously
increases the costs. The following pages summarize other factors of
influence for efficient mesh generation.