This is an implementation of a numerical solver for Eikonal equation.
This is part of a project-work for Advanced Method for Scientific Computing course @Polimi
Project developed by:
Can be found into report - documents/Report.pdf
-
include
- headers files where:Mesh.h
- defines the data structure containing the meshVtkParser.hpp
- defines data structure and methods in order to parse a .vtk fileMeshLoader.hpp
- defines methods in order to load a mesh from a file parserEikonalSolver.hpp
- defines Eikonal global problem solverEikonalTraits.hpp
- defines some Data Structure for Eikonal problem traitsLocalSolver.hpp
- defines Eikonal local problem solverOptimizedLocalSolver.hpp
- defines Eikonal Optimized local problem solverEikonalMath.hpp
- defines common mathematical method implementations
-
include-cuda
- headers files for cuda implemented function wrappingGlobalSolverKernel.hpp
- defines function wrappers for global solver functionsLocalSolverKernel.hpp
- defines function wrappers for local solver functions
-
src
- source files of headers implementation -
src-cuda
- source files of cuda function implementation -
testfiles_torus_tetra
- collection of .vtk file containing tetrahedrical test mesh -
testfiles_torus_tri
- collection of .vtk file containing triangular test mesh -
showcase
- collection of reference results images -
documents
- collection of reference papers and implementation report
In order to build all targets the following software libraries must be installed:
OpenMP
- Reference site - tested version: 17.0.xEigen
- Reference site - tested version: 3.4.xMetis
- Reference site - tested version: 5.2.x
In order to build cuda targets version the following libraris must be installed:
Cuda
- Reference site - tested version: 11.7.x
Since installing methods can variate between linux distribution we do not provide any installation tutorial for the above libraries.
In order to build the executable, from the root folder run the following commands:
$ mkdir build
$ cd build
$ cmake .. _FLAGS_
$ make
_FLAGS_
are optional, they can be:
-D EIGEN_PATH='/path/to/eigen3'
- specify eigen3 library path-D OMP_NUM_THREADS=_num_threads_
- specify the number of threads used by omp implementation-D VERBOSE=true/false
- specify if you want to enable all verbose options-D SOLVER_VERBOSE=true/false
- specify if show local solver work-messages-D EXE_NAME='_exe_filename_'
- specify the executable filename (default = eikonal_solver_'method_tag')-D USECUDA=(1 or 0)
- specify if you want to compile the cuda target-D CMAKE_CUDA_COMPILER=
- if you want compile the cuda target it's best to specify the nvcc path, if cuda toolkit is alredy in path it's should not be neccesary-D IO_VERBOSE=true/false
- specify if you want to enable verbose option for vtk file reading and writing-D METIS_LIB='path/to/metis.so'
- specify path to metis shared object-D MAKETEST=(1 or 0)
- specify if compile alternative test targets
output executables will be:
eikonal_solver_FMM
- Fast Marching Methodeikonal_solver_FIMP
- Fast Iterative Parallel Methodeikonal_solver_FMMO
- Fast Marching Method with Optimized Local solvereikonal_solver_FIM
- Fast Iterative Methodeikonal_solver_PFIM
- Patch Fast Iterative Methodeikonal_solver_PFIMC
- Patch Fast Iterative Method on GPU
if MAKETEST=1 the output executables will be
eikonal_test_FMM
- Fast Marching Method testereikonal_test_FIMP
- Fast Iterative Parallel Method testereikonal_test_FMMO
- Fast Marching Method with Optimized Local Solver testereikonal_test_FIM
- Fast Iterative Method testereikonal_test_PFIM
- Patch Fast Iterative Method testereikonal_test_PFIMC
- Patch Fast Iterative Method on GPU tester
$ ./eikonal_solver_* input.vtk output.vtk meshdim id1 [id2 ...]
where:
input.vtk
- is a path/filename to ASCII formatted .vtk input mesh fileoutput.vtk
- is the path/filename where output (mesh + data) will be placedmeshdim
- is the mesh size (3=triangular mesh, 4=tetrahedral mesh)- physical dimension is assumed to be always 3,
be careful .vtk file to be appropriately formatted
- physical dimension is assumed to be always 3,
id1
- the .vtk point index of wave starting point [$u(id_1) = 0$][id2 ...]
- optional list of other starting points
$ ./eikonal_test_* input_dir_path output.csv meshdim
where:
input_dir_path
- is a path to a dir containing only ASCII formatted .vtk input mesh filesoutput.csv
- is the path/filename where output (test result) will be placedmeshdim
- is the mesh size (3=triangular mesh, 4=tetrahedral mesh)- physical dimension is assumed to be always 3,
be careful .vtk file to be appropriately formatted
- physical dimension is assumed to be always 3,