MatrixFreeCellBatchParticleCache< dim, number, ObstacleType > Class Template Reference
|
Developer Documentation
|
#include <cell_batch_particle_cache.hpp>
Public Member Functions | |
| MatrixFreeCellBatchParticleCache (const MatrixFreeContext< dim, number > mf_context) | |
| void | update (CellListParticleHandler< dim, number, ObstacleType > &particle_handler, const typename CellListParticleHandler< dim, number, ObstacleType >::NotifyEvent event) |
| DEAL_II_ALWAYS_INLINE const std::vector< DEMParticleAccessor< dim, number > > & | obstacles_in_cell_batch (const unsigned int cell_batch_id) const |
| DEAL_II_ALWAYS_INLINE std::vector< DEMParticleAccessor< dim, number > > & | obstacles_in_cell_batch (const unsigned int cell_batch_id) |
Private Attributes | |
| const MatrixFreeContext< dim, number > | mf_context |
| std::vector< std::vector< DEMParticleAccessor< dim, number > > > | cell_batch_to_particle_cache |
Detailed Description
class MeltPoolDG::MatrixFreeCellBatchParticleCache< dim, number, ObstacleType >
A cache that stores, for each cell batch in a matrix-free context, the particles relevant to the cells in that batch. This is useful for efficiently accessing particle data during matrix-free operations, as it avoids repeated searches for particles in each cell.
Constructor & Destructor Documentation
◆ MatrixFreeCellBatchParticleCache()
|
inline |
Constructor, stores a reference to the matrix-free object internally.
- Parameters
-
mf_context The matrix-free context that provides information about the cell batches for which the particle cache is to be constructed.
Member Function Documentation
◆ obstacles_in_cell_batch() [1/2]
|
inline |
Same as the above const version of obstacles_in_cell_batch, but returns a non-const reference to the vector of particles for the specified cell batch.
◆ obstacles_in_cell_batch() [2/2]
|
inline |
Returns the particles relevant to the specified cell batch. For the definition of "relevant", see the documentation of the CellListParticleHandler class.
- Parameters
-
cell_batch_id The ID of the cell batch for which to retrieve particles.
- Returns
- A const reference to the vector of particles for the specified cell batch.
◆ update()
| void MeltPoolDG::MatrixFreeCellBatchParticleCache< dim, number, ObstacleType >::update | ( | CellListParticleHandler< dim, number, ObstacleType > & | particle_handler, |
| const typename CellListParticleHandler< dim, number, ObstacleType >::NotifyEvent | event | ||
| ) |
Updates the particle cache by querying the provided obstacle field for the particles relevant to each cell batch in the matrix-free context. This function should be called whenever the particle-cell relationship changes.
- Parameters
-
particle_handler The obstacle data structure that manages the particles in the domain. event The type of event that triggered the update.
Member Data Documentation
◆ cell_batch_to_particle_cache
|
private |
Vector caching, for each cell batch, the particles relevant to the cells in that batch. The index of the outer vector corresponds to the cell batch id.
◆ mf_context
|
private |
The matrix-free context that provides information about the cell batches for which the particle cache is constructed.
The documentation for this class was generated from the following files:
- include/meltpooldg/particles/cell_batch_particle_cache.hpp
- source/particles/cell_batch_particle_cache.cpp
Generated by