CellListParticleHandler< dim, number, ObstacleType > Struct Template Reference

Developer Documentation: MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType > Struct Template Reference
Developer Documentation
MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType > Struct Template Reference

Forward declaration of the CellListParticleHandler class template. More...

#include <obstacle_data_structure.hpp>

Collaboration diagram for MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >:
[legend]

Classes

struct  GhostParticleUpdateCache
 
struct  TriangulationLevelCache
 

Public Types

enum class  NotifyEvent { ObserverInitialization , UpdateGhostParticleProperties , SortParticlesIntoSubdomainsAndCells }
 

Public Member Functions

 CellListParticleHandler (const dealii::Triangulation< dim > &triangulation, const dealii::Mapping< dim > &mapping)
 
 ~CellListParticleHandler ()
 Destructor. Explicitly deregisters all particles from the global obstacle property pool.
 
void initialize ()
 Reinitializes the internal data structure by synchronizing obstacle data across all MPI processes.
 
template<typename ObstacleContainer >
void get_obstacles_in_cell (const dealii::TriaIterator< dealii::CellAccessor< dim > > &cell, ObstacleContainer &particles)
 
void broadcast_global_particles () const
 Broadcasts obstacle properties of all locally owned particles to all MPI processes.
 
void prepare_for_coarsening_and_refinement ()
 
void unpack_after_coarsening_and_refinement ()
 
void insert_global_particles (const std::vector< dealii::Point< dim, number > > &obstacle_locations, const std::vector< std::vector< number > > &obstacle_properties)
 
void register_particle_output (Postprocessor< dim, number > &postprocessor) const
 
std::ranges::subrange< ParticleIterator< dim, number > > locally_owned_particle_range () const
 
std::ranges::subrange< MeltPoolDG::ParticleIterator< dim, number > > ghost_particle_range () const
 
std::ranges::subrange< ParticleIterator< dim, number > > particles_in_cell (typename dealii::Triangulation< dim >::active_cell_iterator cell) const
 
boost::container::small_vector< DEMParticleAccessor< dim, number >, 3 *dim > find_particles_in_neighborhood (const DEMParticleAccessor< dim, number > &particle, const number relative_tolerance)
 
void compress ()
 
void update_ghost_particle_properties ()
 
void sort_particles_into_subdomains_and_cells ()
 
void auto_update_particle_cache ()
 
void prepare_for_serialization ()
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
void deserialize ()
 
unsigned int n_global_particles () const
 
unsigned int n_locally_owned_particles () const
 
unsigned int n_ghost_particles () const
 
MPI_Comm get_mpi_communicator () const
 
void subscribe (std::function< void(CellListParticleHandler &, const NotifyEvent)> callback)
 

Private Member Functions

void deregister_property_pool () const
 
dealii::TriaIterator< dealii::CellAccessor< dim > > find_particle_cache_cell (const dealii::TriaIterator< dealii::CellAccessor< dim > > &cell) const
 
template<typename ObstacleContainer >
void find_relevant_particles (const dealii::TriaIterator< dealii::CellAccessor< dim > > &cell, ObstacleContainer &particles)
 
number compute_max_particle_radius () const
 
void notify (const NotifyEvent &event)
 

Private Attributes

dealii::Particles::ParticleHandler< dim > obstacle_handler
 Handler managing the locally owned obstacles in the domain.
 
dealii::Particles::PropertyPool< dim > ghost_particles_property_pool
 Property pool containing the properties of the ghost particles.
 
MPI_Comm mpi_communicator = MPI_COMM_WORLD
 MPI communicator used for synchronizing obstacle data across all ranks.
 
std::unordered_map< dealii::types::particle_index, dealii::Particles::ParticleIterator< dim > > particle_id_to_iterator_cache
 
boost::signals2::signal< void(CellListParticleHandler &, const NotifyEvent &)> notify_signal
 
struct { 
 
   std::vector< std::vector< dealii::Particles::ParticleIterator< dim > > >   locally_owned_particles 
 
   std::vector< std::vector< typename dealii::Particles::PropertyPool< dim >::Handle > >   ghost_particles 
 
   int   cell_level = 0 
 The level of the cells on which the particles are cached. More...
 
   number   global_max_particle_radius = 0 
 The maximum radius of all particles in the global domain. More...
 
cell_particle_cache 
 
struct MeltPoolDG::CellListParticleHandler::TriangulationLevelCache triangulation_level_cache
 
struct MeltPoolDG::CellListParticleHandler::GhostParticleUpdateCache ghost_particle_update_cache
 
NeighborListUpdateTracker< dim, number, ObstacleType > neighbor_list_update_tracker
 

Detailed Description

template<int dim, typename number, typename ObstacleType>
struct MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >

Forward declaration of the CellListParticleHandler class template.

This class manages a collection of obstacles in a simulation domain via an optimized cache layer. It basically acts as a specialized wrapper around a deal.II ParticleHandler. It provides extended functionality to efficiently retrieve obstacles that are relevant to a given triangulation potentially non-active cell or that act as potential contact partners.

Motivation

In many applications, the triangulation on which the particles live is prescribed by an external physical problem (e.g., a fluid simulation). Because the particle handler must work with this fixed mesh, modifying the triangulation to leverage deal.II's ParticleHandler capability to efficiently get particles on active cells can not be efficiently used for the fluid-structure interaction implementations in MeltPoolDG.

To illustrate this further, let's consider a fluid-particle simulation where the fluid mesh is highly refined around the particles. Consequently, the active cells of the triangulation are significantly smaller than the particle diameters. For efficient particle computations, two primary operations are required:

  • Neighborhood Search: Efficiently retrieving all particles within a defined vicinity of a target particle.
  • Fluid Interaction: Efficiently identifying the set of particles that coincide with a given active cell to compute penalty forces acting on the flow field.

Ideally, particles would be stored in cells large enough to contain them entirely, mimicking a standard cell-list approach. This would allow neighborhood or collision information to be gathered simply by inspecting the cell itself and its immediate neighbors. However, because the deal.II particle handler is bound to active cells that are much smaller than the particles this is not directly possible. To address this, the class provides additional caching structures that store particles on a coarser level of the triangulation. This enables efficient retrieval of relevant particles for neighborhood searches and penalty force computations, independent of the total number of particles in the simulation domain.

Class Design

The internal cache stores particles on a coarser level of the triangulation hierarchy. The cache level is automatically selected so that its cells are large enough to contain the largest particle in the global domain.

By utilizing this coarser level, querying for neighboring particles or finding obstacles that intersect a specific cell becomes extremely efficient. The execution time is essentially independent of the total number of particles in the global domain, as it only requires looking up the cached particles entries of the cell and its coarse neighbors.

Note that constructing and updating this cache is an expensive operation. However, if the particles move slowly, the cache can be reused across many time steps. This often amortizes the setup costs. however, if the specific problem requires frequent updates, the overhead can become significant and it should be considered to use an alternative approach.

Usage

Conceptually, using this class involves two main tasks:

  1. Cache Maintenance: Setting up data structures and keeping the cache updated.
  2. Particle Querying: Retrieving relevant particles from the cache.

1. Cache Maintenance & Synchronization

The class provides several functions to modify and update the internal caches:

  • **initialize()** Must be called once before using the class. It initializes all data structures and caches, including those that only change if the triangulation changes. It automatically determines the optimal cache level based on the maximum particle radius and the minimum vertex distance of cells on each level. Note, that if the triangulation is coarsened or refined during the simulation while initialize() has already be called before, do not call this directly. Instead use the function prepare_for_coarsening_and_refinement() before adaptation, and unpack_after_coarsening_and_refinement()` afterward.
  • **sort_particles_into_subdomains_and_cells()** Performs a complete, expensive update of the particle structures. It uses the deal.II ParticleHandler functionality to determine the active cell and subdomain for each particle, moving them across MPI ranks as needed. Afterward, it rebuilds the coarse-level cell-list cache, identifies ghost particles on that level needed by each process, and distributes them accordingly.
  • **update_ghost_particle_properties()** A lightweight alternative to a full rebuild. It synchronizes the properties of ghost particles with their locally owned counterparts without resort-sorting particles into subdomains/active cells or rebuilding the coarse cache. You can use this function when particles have moved, but not enough to invalidate the existing cache structure.
  • **auto_update_ghost_particle_properties()** Automatically decides whether a lightweight ghost update suffices or if a full sort_particles_into_subdomains_and_cells() is required. It tracks particle displacements since the last full sorting to make this decision. See teh documentation of the class NeighborListUpdateTracker for details.
  • **compress()** Accumulates rank-local force or torque contributions computed on ghost particles back to their locally owned counterparts by summing the values across ranks. Be aware that after calling this function, the force and torque values on ghost particles are invalidated and should not before at least one more call to update_ghost_particle_properties() or sort_particles_into_subdomains_and_cells().

2. Particle Querying

Once the cache is up to date, particles can be retrieved efficiently via the following methods:

  • **get_obstacles_in_cell()** Takes an active cell iterator and returns all particles relevant to that cell (i.e., particles overlapping or in the immediate vicinity of the cell). It basically just looks up the coarse-level cell-list cache for the cell and its neighbors, making it a very cheap call independent of the total number of particles in the global domain.
  • **find_particles_in_neighborhood()** Takes a particle and returnins all particles within a certain distance. Like the cell query, this leverages the coarse-level cell-list cache making the function very cheap and independent of the total number of particles in the global domain.

Member Enumeration Documentation

◆ NotifyEvent

template<int dim, typename number , typename ObstacleType >
enum class MeltPoolDG::CellListParticleHandler::NotifyEvent
strong

The type of event that can trigger a notification to subscribers of the obstacle data structure.

Enumerator
ObserverInitialization 

Initialization of the observer. This event is triggered as soon as the observer is registered with the obstacle data structure.

UpdateGhostParticleProperties 

Triggered when the properties of ghost particles are updated. This event is typically triggered after a call to update_ghost_particle_properties().

SortParticlesIntoSubdomainsAndCells 

Triggered when the particles are sorted into subdomains and cells. This event is triggered after a call to sort_particles_into_subdomains_and_cells().

Constructor & Destructor Documentation

◆ CellListParticleHandler()

template<int dim, typename number , typename ObstacleType >
CellListParticleHandler::CellListParticleHandler ( const dealii::Triangulation< dim > &  triangulation,
const dealii::Mapping< dim > &  mapping 
)
explicit

Constructor. Initializes the internal particle handler and property pool for managing obstacles.

Parameters
triangulationThe triangulation on which the obstacles are placed.
mappingMapping used to interpret geometry on the given triangulation.

◆ ~CellListParticleHandler()

template<int dim, typename number , typename ObstacleType >
MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::~CellListParticleHandler ( )

Destructor. Explicitly deregisters all particles from the global obstacle property pool.

Member Function Documentation

◆ auto_update_particle_cache()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::auto_update_particle_cache ( )

This function is a combination of the sort_particles_into_subdomains_and_cells() and update_ghost_particle_properties() functions. It will update the internal data structure and guarantee that subsequent queries to particle information such as which particles are in a given cell or which particles are neighbors of a given particle will return correct results. Thereby it internally checks whether it is sufficient to only update th ghost particle properties or if it is required to perform the more expensive operation of sorting the particles into subdomains and cells. This function should be called after particles have been moved.

Note
If new particles where added to the data structure, it is required to call sort_particles_into_subdomains_and_cells() directly as this function does not check for new particles.

◆ broadcast_global_particles()

template<int dim, typename number , typename ObstacleType >
void MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::broadcast_global_particles ( ) const

Broadcasts obstacle properties of all locally owned particles to all MPI processes.

This function ensures that each process has access to a complete copy of all obstacles, regardless of ownership. It enables computations involving obstacles even on processes that do not originally own them.

Each process broadcasts its locally owned obstacles in turn, including both their location and associated properties. The data is stored in the ghost_particles_property_pool structure.

◆ compress()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::compress ( )

This function compresses the forces and torques of the ghost particles by sending them to the owning rank of the particles and summing them up there.

Note
After a call to this function, the compressed value is exclusively available on the owning rank of the particle. The force and torque values on the ghost particles are not updated and should be considered invalid.

◆ compute_max_particle_radius()

template<int dim, typename number , typename ObstacleType >
number CellListParticleHandler::compute_max_particle_radius ( ) const
private

Computes and returns the maximum radius of all particles in the global domain.

◆ deregister_property_pool()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::deregister_property_pool ( ) const
private

Deregister all particles from the ghost particles property pool.

◆ deserialize()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::deserialize ( )

Performs the objects deserialization. This function forwards the call to dealii::ParticleHandler::deserialize(). See the documentation of that function for further details.

◆ find_particle_cache_cell()

template<int dim, typename number , typename ObstacleType >
dealii::TriaIterator< dealii::CellAccessor< dim > > CellListParticleHandler::find_particle_cache_cell ( const dealii::TriaIterator< dealii::CellAccessor< dim > > &  cell) const
private

Given a cell, this function finds the corresponding cell on the level of the triangulation that is used to cache the particles. It returns an iterator to that cell.

Parameters
cellThe cell for which to find the corresponding particle cache cell.
Exceptions
Ifthe passed cell is on a smaller level than the level used for caching particles, an exception is thrown in Debug mode.
Ifthe passed cell is not of valid state, an exception is thrown in Debug mode.

◆ find_particles_in_neighborhood()

template<int dim, typename number , typename ObstacleType >
boost::container::small_vector< DEMParticleAccessor< dim, number >, 3 *dim > CellListParticleHandler::find_particles_in_neighborhood ( const DEMParticleAccessor< dim, number > &  particle,
const number  relative_tolerance 
)

This functions returns a vector of particles that are located within the influence area of a given particle. The neighborhood radius is defined as:

r_neighborhood = particle.radius() * (1 + relative_tolerance)

This captures two categories of neighbors:

  • Contact neighbors: particles whose surfaces overlap or touch.
  • Influence neighbors: particles close enough to exert non-contact interactions (e.g. van der Waals or lubrication forces).
Parameters
particleThe particle around which the neighborhood is constructed.
relative_toleranceA non-negative scaling factor applied to the particle's radius to define the neighborhood extent. A value of 0 restricts the search to overlapping (contact) particles only.
Returns
All particles within the influence neighborhood of particle, excluding particle itself. The type is a boost small_vector with a size of 3 * dim, which is should be sufficient for most cases to prevent dynamic memory allocations. However, if the number of neighbors exceeds this size, the vector will dynamically resize to accommodate all neighbors.

◆ find_relevant_particles()

template<int dim, typename number , typename ObstacleType >
template<typename ObstacleContainer >
void MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::find_relevant_particles ( const dealii::TriaIterator< dealii::CellAccessor< dim > > &  cell,
ObstacleContainer &  particles 
)
private

Finds all particles that might intersect with the given cell and adds them to the provided container. The function checks both locally owned and ghost particles, ensuring that all relevant particles are included. In order to make the function work the cell particle cache must be up to date as the function retrieves the relevant particles from the cache.

Parameters
cellThe cell for which to find relevant particles. It is assumed that the cell is on the level of the triangulation that is used to cache the particles.
particlesThe container to which the relevant particles will be added. Note that the function does not check for duplicates, so it is not guaranteed that the container will only contain unique particles after the function call. However, the implementation ensures that itself does add the same particles multiple times to the container.
Exceptions
Ifthe passed cell is not on the same level as the level used for caching particles, an exception is thrown in Debug mode.

◆ get_mpi_communicator()

template<int dim, typename number , typename ObstacleType >
MPI_Comm CellListParticleHandler::get_mpi_communicator ( ) const

Return the MPI communicator used throughout the obstacle data structure.

◆ get_obstacles_in_cell()

template<int dim, typename number , typename ObstacleType >
template<typename ObstacleContainer >
void MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::get_obstacles_in_cell ( const dealii::TriaIterator< dealii::CellAccessor< dim > > &  cell,
ObstacleContainer &  particles 
)

Identify obstacles that likely at least partially occupy the specified cell. Note, that the returned particles are not guaranteed to be located within the cell, but they are guaranteed to include all particles that are located within the cell.

To guarantee fast accesss the function uses the background triangulation. It identifies the level in the triangulation for which it is guaranteed that assuming the largest particle in the global domain needs to be considered all particles that potentially intersect with the cell of interest have their center locations within either the cell on the level for which includes the given cell or one of its neighboring cells. The corresponding particles can then be efficiently retrieved from an internal cache making the cost of this function independent of the total number of particles in the global domain.

Parameters
cellThe cell of interest. The iterator must point to a cell within the triangulation that was used to initialize this object.
particlesDestination container where the properties of the identified obstacles will be added. If the container already contains particles, the function will append new particles to it, ensuring that no duplicates are added.
Returns
Vector containing the handles of the newly registered obstacles in dst.

◆ ghost_particle_range()

template<int dim, typename number , typename ObstacleType >
std::ranges::subrange< ParticleIterator< dim, number > > CellListParticleHandler::ghost_particle_range ( ) const

Returns a subrange for iterating over all ghost particles.

Returns
An iterable subrange representing the ghost particles.

◆ initialize()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::initialize ( )

Reinitializes the internal data structure by synchronizing obstacle data across all MPI processes.

This function communicates all locally owned obstacles to every other process in the MPI communicator. As a result, each process obtains and stores a complete local copy of all obstacles, regardless of ownership. This enables fully local access to obstacle data during subsequent computations.

◆ insert_global_particles()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::insert_global_particles ( const std::vector< dealii::Point< dim, number > > &  obstacle_locations,
const std::vector< std::vector< number > > &  obstacle_properties 
)

Insert obstacles into the particle data structure based on provided locations and properties. This function takes a set of obstacle locations and their corresponding properties, and inserts them into the internal particle handler. Thereby it is not required that the particle locations passed to this function are located in the local subdomain of the current MPI rank. The function will automatically determine which MPI rank owns which particles and insert them accordingly.

Parameters
obstacle_locationsA vector of points representing the locations of the obstacles.
obstacle_propertiesA vector of vectors, where each inner vector contains the properties associated with the corresponding obstacle location.
Note
If the same obstacles are inserted multiple times, e.g., by passing the same locations and properties to this function on different MPI ranks, the function will insert the obstacles multiple times, resulting in duplicate entries in the particle data structure. It is the responsibility of the caller to ensure that each obstacle is inserted only once across all MPI ranks.

◆ locally_owned_particle_range()

template<int dim, typename number , typename ObstacleType >
std::ranges::subrange< ParticleIterator< dim, number > > CellListParticleHandler::locally_owned_particle_range ( ) const

Returns a subrange for iterating over particles that are owned by the current MPI rank.

Returns
An iterable subrange representing the local particles.

◆ n_ghost_particles()

template<int dim, typename number , typename ObstacleType >
unsigned int CellListParticleHandler::n_ghost_particles ( ) const

Return the number of ghost particles, i.e., the number of particles that are not owned by the current MPI rank but are needed, e.g., for computing interactions with locally owned particles or locally owned cells.

◆ n_global_particles()

template<int dim, typename number , typename ObstacleType >
unsigned int CellListParticleHandler::n_global_particles ( ) const

Return the number of global particles, i.e., the total number of particles across all MPI ranks.

◆ n_locally_owned_particles()

template<int dim, typename number , typename ObstacleType >
unsigned int CellListParticleHandler::n_locally_owned_particles ( ) const

Return the number of locally owned particles, i.e., the number of particles owned by the current MPI rank.

◆ notify()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::notify ( const NotifyEvent event)
private

Notifies all subscribers of an update to the obstacle data structure.

Parameters
eventThe type of event that triggered the update.

◆ particles_in_cell()

template<int dim, typename number , typename ObstacleType >
std::ranges::subrange< ParticleIterator< dim, number > > CellListParticleHandler::particles_in_cell ( typename dealii::Triangulation< dim >::active_cell_iterator  cell) const

Returns a subrange for iterating over particles for which the particle center location is contained in the specified active cell.

Parameters
cellThe active cell for which to retrieve particles.
Returns
An iterable subrange representing the particles in the cell.

◆ prepare_for_coarsening_and_refinement()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::prepare_for_coarsening_and_refinement ( )

Prepares the obstacle data structure for coarsening and refinement of the underlying triangulation. This call is necessary to ensure that the obstacle data structure remains consistent with the mesh after coarsening and refinement operations.

◆ prepare_for_serialization()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::prepare_for_serialization ( )

Prepares this object for serialization. This function forwards the call to dealii::ParticleHandler::prepare_for_serialization(). See the documentation of that function for further details.

◆ register_particle_output()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::register_particle_output ( Postprocessor< dim, number > &  postprocessor) const

Registers the obstacle handler for particle output.

Parameters
postprocessorThe postprocessor to which the particles are registered for output.

◆ serialize()

template<int dim, typename number , typename ObstacleType >
template<class Archive >
void MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::serialize ( Archive &  ar,
const unsigned int  version 
)

Serializes the internal state of the class. This function forwards the call to dealii::ParticleHandler::serialize(). See the documentation of that function for further details.

Parameters
arThe archive used for serialization or deserialization.
versionThe serialization version.

◆ sort_particles_into_subdomains_and_cells()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::sort_particles_into_subdomains_and_cells ( )

This function sorts the particles into subdomains and cells based on their locations. Based on the current particle position it finds the surrounding cell on the cache level, inserts the particle into the corresponding cell in the cache and also determines which MPI rank owns the particle and inserts it into the corresponding subdomain. Further if particles are located in cells that are not locally owned by the current MPI rank but still of local relevance, they are inserted into the corresponding ghost particle list. This function is typically called after particles have been moved or new particles have been added to ensure that the internal data structures remain consistent with the current state of the simulation.

After this function is called, the particle data structure is ready for efficient queries such as finding particles in a specific cell or identifying neighboring particles.

Note
The function assumes that internal data structures related to the triangulation and MPI communication patterns have been properly initialized. This can be ensured by calling reinit() once. After that, this function can be called multiple times to update the particle data structure as particles move or are added as long as the triangulation remains unchanged. If the triangulation is modified, reinit() must be called again to reestablish the necessary data structures.

◆ subscribe()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::subscribe ( std::function< void(CellListParticleHandler< dim, number, ObstacleType > &, const NotifyEvent)>  callback)

Subscribes a callback function to be notified whenever the obstacle data structure is updated.

Parameters
callbackA callable that takes a reference to the obstacle data structure and the event type that triggered the update. The callable will be invoked whenever the obstacle data structure is updated, allowing the subscriber to react accordingly.

◆ unpack_after_coarsening_and_refinement()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::unpack_after_coarsening_and_refinement ( )

Unpacks the obstacle data structure after coarsening and refinement operations. This call is necessary to ensure that the obstacle data structure remains consistent with the mesh after coarsening and refinement operations.

Note
It is required that prepare_for_coarsening_and_refinement() has been called before the triangulation was coarsened and refined.

◆ update_ghost_particle_properties()

template<int dim, typename number , typename ObstacleType >
void CellListParticleHandler::update_ghost_particle_properties ( )

This function updates the properties of ghost particles by receiving updated values from their owning ranks. Contrary to the sort_particles_into_subdomains_and_cells() function, this function does not update the ownership of the particles or their cell locations. It only updates the properties of ghost particles based on the latest values from their owning ranks.

Member Data Documentation

◆ cell_level

template<int dim, typename number , typename ObstacleType >
int MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::cell_level = 0

The level of the cells on which the particles are cached.

◆ [struct]

struct { ... } MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::cell_particle_cache

◆ ghost_particle_update_cache

template<int dim, typename number , typename ObstacleType >
struct MeltPoolDG::CellListParticleHandler::GhostParticleUpdateCache MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::ghost_particle_update_cache
private

◆ ghost_particles

template<int dim, typename number , typename ObstacleType >
std::vector<std::vector<typename dealii::Particles::PropertyPool<dim>::Handle> > MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::ghost_particles

Same as above but for ghost particles. As ghost particles are stored in a separate property pool, we need to store their handles instead of their iterators. Note that the cells a ghost particle is associated with might be on a lower (coarser) than the one the particles should be stored on, as it is not guaranteed that the cell on the specified level in which the ghost particle lives is available on the current rank.

◆ ghost_particles_property_pool

template<int dim, typename number , typename ObstacleType >
dealii::Particles::PropertyPool<dim> MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::ghost_particles_property_pool
mutableprivate

Property pool containing the properties of the ghost particles.

◆ global_max_particle_radius

template<int dim, typename number , typename ObstacleType >
number MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::global_max_particle_radius = 0

The maximum radius of all particles in the global domain.

◆ locally_owned_particles

template<int dim, typename number , typename ObstacleType >
std::vector<std::vector<dealii::Particles::ParticleIterator<dim> > > MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::locally_owned_particles

A map that associates each cell on the specified level to store particles on with the particle iterators of the locally owned particles that are located in that cell. This cache is used to efficiently retrieve locally owned particles for a given cell without having to search through all particles. The key is the global level cell index

◆ mpi_communicator

template<int dim, typename number , typename ObstacleType >
MPI_Comm MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::mpi_communicator = MPI_COMM_WORLD
private

MPI communicator used for synchronizing obstacle data across all ranks.

◆ neighbor_list_update_tracker

template<int dim, typename number , typename ObstacleType >
NeighborListUpdateTracker<dim, number, ObstacleType> MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::neighbor_list_update_tracker
private

A class that tracks whether an update of the obstacle data structure is required based on the displacements of the obstacles since the last update.

◆ notify_signal

template<int dim, typename number , typename ObstacleType >
boost::signals2::signal<void(CellListParticleHandler &, const NotifyEvent &)> MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::notify_signal
private

A list of callables that are notified whenever the obstacle data structure is updated. This allows other components of the simulation to react to changes in the obstacle data structure, such as updating ghost particle properties or re-sorting particles into subdomains and cells.

◆ obstacle_handler

template<int dim, typename number , typename ObstacleType >
dealii::Particles::ParticleHandler<dim> MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::obstacle_handler
private

Handler managing the locally owned obstacles in the domain.

◆ particle_id_to_iterator_cache

template<int dim, typename number , typename ObstacleType >
std::unordered_map<dealii::types::particle_index, dealii::Particles::ParticleIterator<dim> > MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::particle_id_to_iterator_cache
private

Cache mapping particle ids to their corresponding particle iterators in the property pool. This is used to efficiently compress particle properties

◆ triangulation_level_cache

template<int dim, typename number , typename ObstacleType >
struct MeltPoolDG::CellListParticleHandler::TriangulationLevelCache MeltPoolDG::CellListParticleHandler< dim, number, ObstacleType >::triangulation_level_cache
private

The documentation for this struct was generated from the following files: