Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
particle_particle_broad_search.h File Reference
#include <dem/adaptive_sparse_contacts.h>
#include <dem/data_containers.h>
#include <deal.II/particles/particle.h>
#include <deal.II/particles/particle_handler.h>
#include <deal.II/particles/particle_iterator.h>
Include dependency graph for particle_particle_broad_search.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<int dim>
void find_particle_particle_contact_pairs (dealii::Particles::ParticleHandler< dim > &particle_handler, const typename DEM::dem_data_structures< dim >::cells_neighbor_list &cells_local_neighbor_list, const typename DEM::dem_data_structures< dim >::cells_neighbor_list &cells_ghost_neighbor_list, typename DEM::dem_data_structures< dim >::particle_particle_candidates &local_contact_pair_candidates, typename DEM::dem_data_structures< dim >::particle_particle_candidates &ghost_contact_pair_candidates)
template<int dim, typename PropertiesIndex>
void find_particle_particle_contact_pairs (dealii::Particles::ParticleHandler< dim > &particle_handler, const typename DEM::dem_data_structures< dim >::cells_neighbor_list &cells_local_neighbor_list, const typename DEM::dem_data_structures< dim >::cells_neighbor_list &cells_ghost_neighbor_list, typename DEM::dem_data_structures< dim >::particle_particle_candidates &local_contact_pair_candidates, typename DEM::dem_data_structures< dim >::particle_particle_candidates &ghost_contact_pair_candidates, const AdaptiveSparseContacts< dim, PropertiesIndex > &sparse_contacts_object)
template<int dim>
void find_particle_particle_periodic_contact_pairs (dealii::Particles::ParticleHandler< dim > &particle_handler, const typename DEM::dem_data_structures< dim >::cells_neighbor_list &cells_local_periodic_neighbor_list, const typename DEM::dem_data_structures< dim >::cells_neighbor_list &cells_ghost_periodic_neighbor_list, const typename DEM::dem_data_structures< dim >::cells_neighbor_list &cells_ghost_local_periodic_neighbor_list, typename DEM::dem_data_structures< dim >::particle_particle_candidates &local_contact_pair_periodic_candidates, typename DEM::dem_data_structures< dim >::particle_particle_candidates &ghost_contact_pair_periodic_candidates, typename DEM::dem_data_structures< dim >::particle_particle_candidates &ghost_local_contact_pair_periodic_candidates)
template<int dim, typename PropertiesIndex>
void find_particle_particle_periodic_contact_pairs (dealii::Particles::ParticleHandler< dim > &particle_handler, const typename DEM::dem_data_structures< dim >::cells_neighbor_list &cells_local_periodic_neighbor_list, const typename DEM::dem_data_structures< dim >::cells_neighbor_list &cells_ghost_periodic_neighbor_list, const typename DEM::dem_data_structures< dim >::cells_neighbor_list &cells_ghost_local_periodic_neighbor_list, typename DEM::dem_data_structures< dim >::particle_particle_candidates &local_contact_pair_periodic_candidates, typename DEM::dem_data_structures< dim >::particle_particle_candidates &ghost_contact_pair_periodic_candidates, typename DEM::dem_data_structures< dim >::particle_particle_candidates &ghost_local_contact_pair_periodic_candidates, const AdaptiveSparseContacts< dim, PropertiesIndex > &sparse_contacts_object)
template<int dim>
void store_candidates (const types::particle_index &main_particle_id, const typename dealii::Particles::ParticleHandler< dim >::particle_iterator_range::iterator &particle_begin, const typename dealii::Particles::ParticleHandler< dim >::particle_iterator_range &particles_to_evaluate, typename DEM::dem_data_structures< dim >::particle_particle_candidates &contact_pair_candidates)

Function Documentation

◆ find_particle_particle_contact_pairs() [1/2]

template<int dim>
void find_particle_particle_contact_pairs ( dealii::Particles::ParticleHandler< dim > & particle_handler,
const typename DEM::dem_data_structures< dim >::cells_neighbor_list & cells_local_neighbor_list,
const typename DEM::dem_data_structures< dim >::cells_neighbor_list & cells_ghost_neighbor_list,
typename DEM::dem_data_structures< dim >::particle_particle_candidates & local_contact_pair_candidates,
typename DEM::dem_data_structures< dim >::particle_particle_candidates & ghost_contact_pair_candidates )

Finds a vector of pairs (particle_particle_candidates) which shows the candidate particle-particle collision pairs. These collision pairs will be used in the fine search to investigate if they are in contact or not.

Parameters
[in]particle_handlerThe particle handler of particles in the broad search
[in]cells_local_neighbor_listA vector (with size equal to the number of local cells) of vectors. Each sub-vector have a size equal to the number of adjacent local cells plus one. First element of each sub-vector shows the main cell itself.
[in]cells_ghost_neighbor_listA vector (with size equal to the number of local cells) of vectors. Each sub-vector have a size equal to the number of adjacent ghost cells plus one. First element of each sub-vector shows the main cell itself.
[out]local_contact_pair_candidatesAnkerl unordered dense map. Stores potential pairs of local-local particle in contact without redundancy. Keys are particle ids and mapped types are vectors of particle ids.
[out]ghost_contact_pair_candidatesAnkerl unordered dense map. Stores potential pairs of local-ghost particle in contact. Keys are particle ids and mapped types are vectors of particle ids.

Definition at line 11 of file particle_particle_broad_search.cc.

References store_candidates().

◆ find_particle_particle_contact_pairs() [2/2]

template<int dim, typename PropertiesIndex>
void find_particle_particle_contact_pairs ( dealii::Particles::ParticleHandler< dim > & particle_handler,
const typename DEM::dem_data_structures< dim >::cells_neighbor_list & cells_local_neighbor_list,
const typename DEM::dem_data_structures< dim >::cells_neighbor_list & cells_ghost_neighbor_list,
typename DEM::dem_data_structures< dim >::particle_particle_candidates & local_contact_pair_candidates,
typename DEM::dem_data_structures< dim >::particle_particle_candidates & ghost_contact_pair_candidates,
const AdaptiveSparseContacts< dim, PropertiesIndex > & sparse_contacts_object )

Finds a vector of pairs (particle_particle_candidates) which shows the candidate particle-particle collision pairs. These collision pairs will be used in the fine search to investigate if they are in contact or not. This version of the function is used when adaptive sparse contacts is enabled.

Template Parameters
dimAn integer that denotes the number of spatial dimensions.
PropertiesIndexIndex of the properties used within the ParticleHandler.
Parameters
particle_handlerThe particle handler of particles in the broad search
[in]cells_local_neighbor_listA vector (with size equal to the number of local cells) of vectors. Each sub-vector have a size equal to the number of adjacent local cells of the main cell plus one. The first element of each sub-vector shows the main cell itself.
[in]cells_ghost_neighbor_listA vector (with size equal to the number of local cells) of vectors. Each sub-vector have a size equal to the number of adjacent ghost cells of the main cell plus one. The first element of each sub-vector shows the main cell itself.
[out]local_contact_pair_candidatesAnkerl unordered dense map. Stores potential pairs of local-local particles in contact without redundancy. Keys are particle ids and mapped types are vectors of particle ids.
[in]ghost_contact_pair_candidatesAnkerl unordered dense map. Stores potential pairs of local-ghost particle in contact. Keys are particle ids and mapped types are vectors of particle ids.
[in]sparse_contacts_objectThe object that contains the information about the mobility status of cells

Definition at line 136 of file particle_particle_broad_search.cc.

References AdaptiveSparseContacts< dim, PropertiesIndex >::advected, AdaptiveSparseContacts< dim, PropertiesIndex >::advected_active, AdaptiveSparseContacts< dim, PropertiesIndex >::check_cell_mobility(), AdaptiveSparseContacts< dim, PropertiesIndex >::inactive, AdaptiveSparseContacts< dim, PropertiesIndex >::mobile, AdaptiveSparseContacts< dim, PropertiesIndex >::static_active, and store_candidates().

◆ find_particle_particle_periodic_contact_pairs() [1/2]

template<int dim>
void find_particle_particle_periodic_contact_pairs ( dealii::Particles::ParticleHandler< dim > & particle_handler,
const typename DEM::dem_data_structures< dim >::cells_neighbor_list & cells_local_periodic_neighbor_list,
const typename DEM::dem_data_structures< dim >::cells_neighbor_list & cells_ghost_periodic_neighbor_list,
const typename DEM::dem_data_structures< dim >::cells_neighbor_list & cells_ghost_local_periodic_neighbor_list,
typename DEM::dem_data_structures< dim >::particle_particle_candidates & local_contact_pair_periodic_candidates,
typename DEM::dem_data_structures< dim >::particle_particle_candidates & ghost_contact_pair_periodic_candidates,
typename DEM::dem_data_structures< dim >::particle_particle_candidates & ghost_local_contact_pair_periodic_candidates )

Finds vectors of pairs (particle_particle_candidates) which contains the candidate particle-particle collision pairs. These collision pairs will be used in the fine search to investigate if they are in contact or not.

Parameters
[in]particle_handlerThe particle handler of particles in the broad search.
[in]cells_local_periodic_neighbor_listA vector (with size equal to the number of local periodic cells at boundary 0) of vectors. Each sub-vector have a size equal to the number of adjacent local cells of the main cell plus one. The first element of each sub-vector shows the main cell itself.
[in]cells_ghost_periodic_neighbor_listA vector (with size equal to the number of local periodic cells at boundary 0) of vectors. Each sub-vector have a size equal to the number of adjacent ghost cells of the main cell plus one. The first element of each sub-vector shows the main cell itself.
[in]cells_ghost_local_periodic_neighbor_listA vector (with size equal to the number of ghost periodic cells at boundary 0) of vectors. Each sub-vector have a size equal to the number of adjacent local cells of the main ghost cell plus one. The first element of each sub-vector shows the main ghost cell itself.
[out]local_contact_pair_periodic_candidatesAnkerl unordered dense map. Stores potential pairs of local-local periodic particles in contact. Keys are local particle ids at boundary 0 and mapped types are vectors of local particle ids at boundary 1.
[out]ghost_contact_pair_periodic_candidatesAnkerl unordered dense map. Stores potential pairs of local-ghost periodic particles in contact. Keys are local particle ids at boundary 0 and mapped types are vectors of ghost particle ids at boundary 1.
[out]ghost_local_contact_pair_periodic_candidatesAnkerl unordered dense map. Stores potential pairs of local-ghost periodic particles in contact. Keys are ghost at boundary 0 particle ids and mapped types are vectors of local particle ids at boundary 1.

Definition at line 318 of file particle_particle_broad_search.cc.

References store_candidates().

◆ find_particle_particle_periodic_contact_pairs() [2/2]

template<int dim, typename PropertiesIndex>
void find_particle_particle_periodic_contact_pairs ( dealii::Particles::ParticleHandler< dim > & particle_handler,
const typename DEM::dem_data_structures< dim >::cells_neighbor_list & cells_local_periodic_neighbor_list,
const typename DEM::dem_data_structures< dim >::cells_neighbor_list & cells_ghost_periodic_neighbor_list,
const typename DEM::dem_data_structures< dim >::cells_neighbor_list & cells_ghost_local_periodic_neighbor_list,
typename DEM::dem_data_structures< dim >::particle_particle_candidates & local_contact_pair_periodic_candidates,
typename DEM::dem_data_structures< dim >::particle_particle_candidates & ghost_contact_pair_periodic_candidates,
typename DEM::dem_data_structures< dim >::particle_particle_candidates & ghost_local_contact_pair_periodic_candidates,
const AdaptiveSparseContacts< dim, PropertiesIndex > & sparse_contacts_object )

Finds a vector of pairs (particle_particle_candidates) which contains the candidate particle-particle collision pairs. These collision pairs will be used in the fine search to investigate if they are in contact or not. This version of the function is used when adaptive sparse contacts is enabled.

Parameters
[in]particle_handlerThe particle handler of particles in the broad search.
[in]cells_local_periodic_neighbor_listA vector (with size equal to the number of local periodic cells at boundary 0) of vectors. Each sub-vector have a size equal to the number of adjacent local cells of the main cell plus one. The first element of each sub-vector shows the main cell itself.
[in]cells_ghost_periodic_neighbor_listA vector (with size equal to the number of local periodic cells at boundary 0) of vectors. Each sub-vector have a size equal to the number of adjacent ghost cells of the main cell plus one. The first element of each sub-vector shows the main cell itself.
[in]cells_ghost_local_periodic_neighbor_listA vector (with size equal to the number of ghost periodic cells at boundary 0) of vectors. Each sub-vector have a size equal to the number of adjacent local cells of the main ghost cell plus one. The first element of each sub-vector shows the main ghost cell itself.
[out]local_contact_pair_periodic_candidatesAnkerl unordered dense map. Stores potential pairs of local-local periodic particles in contact. Keys are local particle ids at boundary 0 and mapped types are vectors of local particle ids at boundary 1.
[out]ghost_contact_pair_periodic_candidatesAnkerl unordered dense map. Stores potential pairs of local-ghost periodic particles in contact. Keys are local particle ids at boundary 0 and mapped types are vectors of ghost particle ids at boundary 1.
[out]ghost_local_contact_pair_periodic_candidatesAnkerl unordered dense map. Stores potential pairs of local-ghost periodic particles in contact. Keys are ghost at boundary 0 particle ids and mapped types are vectors of local particle ids at boundary 1.
sparse_contacts_objectThe object that contains the information about the mobility status of cells

Definition at line 497 of file particle_particle_broad_search.cc.

References AdaptiveSparseContacts< dim, PropertiesIndex >::advected, AdaptiveSparseContacts< dim, PropertiesIndex >::check_cell_mobility(), AdaptiveSparseContacts< dim, PropertiesIndex >::inactive, AdaptiveSparseContacts< dim, PropertiesIndex >::mobile, AdaptiveSparseContacts< dim, PropertiesIndex >::static_active, and store_candidates().

◆ store_candidates()

template<int dim>
void store_candidates ( const types::particle_index & main_particle_id,
const typename dealii::Particles::ParticleHandler< dim >::particle_iterator_range::iterator & particle_begin,
const typename dealii::Particles::ParticleHandler< dim >::particle_iterator_range & particles_to_evaluate,
typename DEM::dem_data_structures< dim >::particle_particle_candidates & contact_pair_candidates )
inline

Stores the candidate particle-particle collision pairs with a given particle iterator. particle_begin iterator is useful to skip storage of the first particle in main cell (particle_begin will be the iterator after the particles_to_evaluate.begin() in that case). When particle_begin is particles_to_evaluate.begin(), it stores all the particle id in contact_pair_candidates.

Parameters
main_particle_idThe id of the main particle to store the candidate.
particle_beginThe particle iterator to start storing particle ids.
particles_to_evaluateThe particle range to evaluate with the particle iterator prior storing ids.
contact_pair_candidatesA map which will contain all the particle pairs candidate.