Eikonal implementation for the Advanced Methods for Scientific Computing (AMSC) Course @Polimi
Students:
An Eikonal equation is a non-linear first-order partial differential equation
that is encountered in problems of wave propagation.
An Eikonal equation is one of the form:
where
-
$d$ is the dimension of the problem, either 2 or 3; -
$u$ is the eikonal function, representing the travel time of a wave; -
$\nabla u(x)$ is the gradient of$u$ , a vector that points in the direction of the wavefront; -
$H$ is the Hamiltonian, which is a function of the spatial coordinates$x$ and the gradient$\nabla u$ ; -
$\Gamma$ is a set smooth boundary conditions.
In most cases,
In the simplest cases,
where
src is a library for the computation of the numerical solution of the Eikonal equation described in the introduction paragraph.
The library contains:
Meshwhich is a class that represents a mesh in N-D (where N is eihter 2 or 3). The class is inherited by two classes:TriangularMeshandTetrahedricalMesh;EikonalSolveris an interface for the two implementation of the solver:SerialEikonalSolverandParallelEikonalSolver.
The SerialEikonalSolver and ParallelEikonalSolver are based on the algorithms described in the Fu et al. 2011 paper and Fu et al. 2013 paper.
The parallelisation was carried out using OpenMP.
To build the executable, from the root folder run the following commands:
$ mkdir build
$ cd build
$ cmake ..
$ makeAn executable for each test will be created into /build, and can be executed through:
$ ./test_name input-filename num-threads output_type output-filenamewhere:
test_nameis eithertriangular,triangulatedortetrahedricaldepending on the physical dimensione of the mesh and its type;input-filenameis the input file path where the mesh will be retrieved. The program only accepts file in vtk format.num-threadsis the number of threads used in the parallel algorithm.output_typeshould be set tosto save the serial solver output or topto save the parallel solver output into the output file.output-filenameis the name of the output file. The file will be located in the foldertest/output_meshes.
However, these are only examples. To fully exploit our library, it should be directly used in code to access further features, such as the possibility to modify the velocity matrix and the boundary conditions (which in our example are defaulted respectively to the identity matrix and the vertex nearest to the origin).
We have already provided some meshes in the folder test/input_meshes.
One example is:
$ ./triangulated ../test/input_meshes/triangulated/bunny.vtk 4 s output-bunnywill execute both the serial and the parallel algorithm on the well-known Stanford Bunny test model and will save the serial
output into the file output-bunny.
After extensive testing, we have been able to conclude that the output from the serial solver is correct as well as the
parallel solver. The parallel solver has shown excellent scaling properties.
The following are some examples visualized using Paraview:
2D square with two wave sources. Stanford Bunny model. Lucy model with one wave source. 3D cube with two wave sources.


