Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
particle_particle_fine_search.h File Reference
#include <dem/contact_type.h>
#include <dem/data_containers.h>
#include <array>
Include dependency graph for particle_particle_fine_search.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

template<int dim, ContactType contact_type>
using adjacent_pairs_for_contact_t

Functions

template<int dim, ContactType contact_type>
void particle_particle_fine_search (const typename DEM::dem_data_structures< dim >::particle_index_iterator_map &particle_container, adjacent_pairs_for_contact_t< dim, contact_type > &adjacent_particles, const typename DEM::dem_data_structures< dim >::particle_particle_candidates &contact_pair_candidates, const double neighborhood_threshold, const std::array< double, dim > &periodic_offset_per_direction={})
template<int dim>
std::pair< Tensor< 1, dim >, bool > nearest_periodic_translation (const Point< dim, double > &particle_one_location, const Point< dim, double > &particle_two_real_location, const std::array< double, dim > &periodic_offset_per_direction)

Typedef Documentation

◆ adjacent_pairs_for_contact_t

template<int dim, ContactType contact_type>
using adjacent_pairs_for_contact_t
Initial value:
std::conditional_t<
@ ghost_periodic_particle_particle
@ ghost_local_periodic_particle_particle
@ local_periodic_particle_particle
ankerl::unordered_dense::map< types::particle_index, periodic_adjacent_particle_pairs_value > periodic_adjacent_particle_pairs
ankerl::unordered_dense::map< types::particle_index, adjacent_particle_pairs_value > adjacent_particle_pairs

Selects adjacent_particle_pairs or periodic_adjacent_particle_pairs based on the contact_type.

Definition at line 19 of file particle_particle_fine_search.h.

Function Documentation

◆ nearest_periodic_translation()

template<int dim>
std::pair< Tensor< 1, dim >, bool > nearest_periodic_translation ( const Point< dim, double > & particle_one_location,
const Point< dim, double > & particle_two_real_location,
const std::array< double, dim > & periodic_offset_per_direction )

Find the translation that brings the nearest periodic image of particle two to particle one. Since periodic directions are axis-aligned and independent, this translation is found directly, one direction at a time.

Parameters
particle_one_locationLocation of particle one.
particle_two_real_locationReal (non-translated) location of particle two.
periodic_offset_per_directionAn array whose component d holds the signed periodic offset of the domain along direction d (0 if d is not periodic).
Returns
The nearest translation, and whether any periodic direction required a nonzero translation. A pair whose nearest image requires no translation on any periodic direction is not a periodic contact (it is already handled by the non-periodic contact types).

Definition at line 254 of file particle_particle_fine_search.cc.

References delta().

◆ particle_particle_fine_search()

template<int dim, ContactType contact_type>
void particle_particle_fine_search ( const typename DEM::dem_data_structures< dim >::particle_index_iterator_map & particle_container,
adjacent_pairs_for_contact_t< dim, contact_type > & adjacent_particles,
const typename DEM::dem_data_structures< dim >::particle_particle_candidates & contact_pair_candidates,
const double neighborhood_threshold,
const std::array< double, dim > & periodic_offset_per_direction = {} )

Iterates over a vector of maps (pairs_in_contact) to see if the particles which were in contact in the last time step, are still in contact or not. If they are still in contact it will update the collision info, including tangential displacement, based on new properties of the particle pair, if they are not in contact anymore it will delete the pair from the pairs_in_contact and also its information from pairs_in_contact_info. Then it iterates over the contact candidates from broad search to see if they already exist in the pairs_in_contact or not, if they are not in the pairs_in_contact and have an overlap, the pair will be added to the pairs_in_contact and its contact information will be stored in the corresponding element of the pairs_in_contact_info.

Parameters
particle_containerA container that is used to obtain iterators to particles using their ids.
adjacent_particlesA map of maps which stores all the required information for calculation of the contact force of particle pairs. Can either be for non-periodic or periodic contact types.
contact_pair_candidatesThe output of broad search which shows contact pair candidates.
neighborhood_thresholdA value which defines the neighbor particles.
periodic_offset_per_directionAn array whose component d holds the signed periodic offsets associated with each periodic directions. If the given d direction is not periodic, the signed distance is 0.

Definition at line 24 of file particle_particle_fine_search.cc.

References ghost_local_periodic_particle_particle, ghost_particle_particle, ghost_periodic_particle_particle, local_particle_particle, local_periodic_particle_particle, and nearest_periodic_translation().