Reducing the Memory Footprint of an Eikonal Solver
Daniel Ganellari, Gundolf Haase · 2017
The numerical solution of the Eikonal equation follows the fast iterative method with its application for tetrahe-dral meshes. Therein the main operations in each discretization element τ contain various inner products in the M-metric as 〈e⃗k,s, e⃗s,ℓ〉Mτ≡e⃗k,sT· Mτ· e⃗s,ℓwith e⃗s,ℓas connecting edge between vertices s and ℓ in element τ. Instead of passing all coordinates of the tetrahedron together with the 6 entries of Mτwe precompute these inner products and use only them in the wave front computation. This first change requires less memory transfers for each tetrahedron. The second change is caused by the fact that 〈e⃗k,s,e⃗s,ℓ〉Mτ(k ≠ ℓ) represents an angle of a surface triangle whereas 〈e⃗k,s,e⃗k,s〉Mτrepresents the length of an edge in the M- metric. Basic geometry as well as vector arithmetics yield to the conclusion that the angle information can be expressed by the combination of three edge lengths. Therefore we only have to precompute the 6 edge lengths of a tetrahedron and compute the remaining 12 angle data on-the-fly which reduces the memory footprint per tetrahedron to 6 numbers. The efficient implementation of the two changes requires a local Gray-code numbering of edges in the tetrahedron and a bunch of bit shifts to assign the appropriate data. First numerical experiments on CPUs show that the reduced memory footprint approach is faster than the original implementation. Detailed investigations as well as a CUDA implementation are ongoing work.