include/meltpooldg/particles/cell_batch_particle_cache.hpp Source File

Developer Documentation: include/meltpooldg/particles/cell_batch_particle_cache.hpp Source File
Developer Documentation
cell_batch_particle_cache.hpp
Go to the documentation of this file.
1#pragma once
2
6
7#include <boost/container/small_vector.hpp>
8
9#include <vector>
10
11namespace MeltPoolDG
12{
18 template <int dim, typename number, typename ObstacleType>
20 {
21 public:
31
40 void
43
51 inline DEAL_II_ALWAYS_INLINE const std::vector<DEMParticleAccessor<dim, number>> &
52 obstacles_in_cell_batch(const unsigned int cell_batch_id) const;
53
58 inline DEAL_II_ALWAYS_INLINE std::vector<DEMParticleAccessor<dim, number>> &
59 obstacles_in_cell_batch(const unsigned int cell_batch_id);
60
61 private:
65
68 std::vector<std::vector<DEMParticleAccessor<dim, number>>> cell_batch_to_particle_cache;
69 };
70
71
72 template <int dim, typename number, typename ObstacleType>
73 const std::vector<DEMParticleAccessor<dim, number>> &
75 const unsigned int cell_batch_id) const
76 {
77 AssertIndexRange(cell_batch_id, cell_batch_to_particle_cache.size());
78 return cell_batch_to_particle_cache[cell_batch_id];
79 }
80
81 template <int dim, typename number, typename ObstacleType>
82 std::vector<DEMParticleAccessor<dim, number>> &
84 const unsigned int cell_batch_id)
85 {
86 AssertIndexRange(cell_batch_id, cell_batch_to_particle_cache.size());
87 return cell_batch_to_particle_cache[cell_batch_id];
88 }
89} // namespace MeltPoolDG
Definition cell_batch_particle_cache.hpp:20
std::vector< std::vector< DEMParticleAccessor< dim, number > > > cell_batch_to_particle_cache
Definition cell_batch_particle_cache.hpp:68
const MatrixFreeContext< dim, number > mf_context
Definition cell_batch_particle_cache.hpp:64
DEAL_II_ALWAYS_INLINE const std::vector< DEMParticleAccessor< dim, number > > & obstacles_in_cell_batch(const unsigned int cell_batch_id) const
Definition cell_batch_particle_cache.hpp:74
MatrixFreeCellBatchParticleCache(const MatrixFreeContext< dim, number > mf_context)
Definition cell_batch_particle_cache.hpp:28
void update(CellListParticleHandler< dim, number, ObstacleType > &particle_handler, const typename CellListParticleHandler< dim, number, ObstacleType >::NotifyEvent event)
Definition cell_batch_particle_cache.cpp:19
Interface for a general preconditioner.
Definition boundary_condition_functions.hpp:17
Forward declaration of the CellListParticleHandler class template.
Definition obstacle_data_structure.hpp:210
NotifyEvent
Definition obstacle_data_structure.hpp:217
Definition matrix_free_util.hpp:21