Expand description

Computation of sparse density maps (evaluation of particle densities and mapping onto sparse grids)

This module provides functions for the computation of per-particle densities and the discretization of the resulting fluid density field by mapping onto a discrete background grid.

Currently, only sparse density maps are implemented.

Sparse density maps

The DensityMap stores fluid density values for each point of an implicit background grid where the density is not trivially zero. This is the case for all points that are inside or at least within some tolerance to the compact support radius of a particle. In case of a sparse density map, the values are stored in a hashmap. The keys are so called “flat point indices”. These are computed from the background grid point coordinates (i,j,k) analogous to multidimensional array index flattening. That means for a grid with dimensions [n_x, n_y, n_z], the flat point index is given by the expression i*n_x + j*n_y + k*n_z. For these point index operations, the UniformGrid is used.

Note that all density mapping functions always use the global background grid for flat point indices, even if the density map is only generated for a smaller subdomain.

Enums

Functions