numerics
Loading...
Searching...
No Matches
physics::SpatialHash3D Class Reference

#include <spatial_hash3d.hpp>

Public Member Functions

 SpatialHash3D (float cell_size, float xmin, float xmax, float ymin, float ymax, float zmin, float zmax)
 
void build (const std::vector< Particle3D > &particles)
 
template<typename F >
void query (float px, float py, float pz, F &&f) const
 
template<typename F >
void iterate_pairs (F &&f) const
 Newton's 3rd law pair traversal – 13 forward offsets, O(n*k/2).
 

Detailed Description

Definition at line 15 of file spatial_hash3d.hpp.

Constructor & Destructor Documentation

◆ SpatialHash3D()

physics::SpatialHash3D::SpatialHash3D ( float  cell_size,
float  xmin,
float  xmax,
float  ymin,
float  ymax,
float  zmin,
float  zmax 
)
inline

Definition at line 17 of file spatial_hash3d.hpp.

Member Function Documentation

◆ build()

void physics::SpatialHash3D::build ( const std::vector< Particle3D > &  particles)
inline

Definition at line 23 of file spatial_hash3d.hpp.

References num::CellList3D< Scalar >::build().

Referenced by physics::FluidSolver3D::step().

◆ iterate_pairs()

template<typename F >
void physics::SpatialHash3D::iterate_pairs ( F &&  f) const
inline

Newton's 3rd law pair traversal – 13 forward offsets, O(n*k/2).

Definition at line 37 of file spatial_hash3d.hpp.

References num::CellList3D< Scalar >::iterate_pairs().

Referenced by physics::backends::seq::compute_density_pressure(), and physics::backends::seq::compute_forces().

◆ query()

template<typename F >
void physics::SpatialHash3D::query ( float  px,
float  py,
float  pz,
F &&  f 
) const
inline

The documentation for this class was generated from the following file: