[][src]Module splashsurf_lib::density_map

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

DensityMap

A sparse density map

Functions

compute_particle_densities

Computes the individual densities of particles using a standard SPH sum

compute_particle_densities_inplace

Computes the individual densities of particles inplace using a standard SPH sum

generate_sparse_density_map

Computes a sparse density map for the fluid based on the specified background grid

parallel_compute_particle_densities

Computes the individual densities of particles using a standard SPH sum, multi-threaded implementation

parallel_generate_sparse_density_map

Computes a sparse density map for the fluid based on the specified background grid, multi-threaded implementation

sequential_compute_particle_densities

Computes the individual densities of particles using a standard SPH sum, sequential implementation

sequential_generate_sparse_density_map

Computes a sparse density map for the fluid based on the specified background grid, sequential implementation

sequential_generate_sparse_density_map_subdomain

Computes a sparse density map for the fluid restricted to the specified subdomain

sparse_density_map_to_hex_mesh

Converts a sparse density map (based on the implicit background grid) to a sparse hexahedral mesh with explicit coordinates for the cells' vertices.