Template Class ParticleCoupling¶
Defined in File particle_coupling.h
Class Documentation¶
-
template<int dim>
class ParticleCoupling¶ Manages the coupling of particles with a finite element background mesh.
This class provides functionality to initialize and manage a particle handler in the context of a finite element simulation, including outputting particle data and interfacing with the background triangulation and mapping.
- Template Parameters:
dim – The spatial dimension.
Public Functions
-
ParticleCoupling(const ParticleCouplingParameters<dim> &par)¶
Constructor.
- Parameters:
par – Reference to the parameters governing particle coupling.
-
void output_particles(const std::string &output_name) const¶
Outputs the current state of the particles to a file.
- Parameters:
output_name – The base name of the output file.
-
void initialize_particle_handler(const parallel::TriangulationBase<dim> &tria_background, const Mapping<dim> &mapping = StaticMappingQ1<dim>::mapping)¶
Initializes the particle handler with a background triangulation.
- Parameters:
tria_background – The background triangulation.
mapping – The mapping associated with the triangulation.
-
std::vector<std::vector<BoundingBox<dim>>> get_global_bounding_boxes() const¶
Get a covering of the background triangulation indexed by processor.
-
std::map<unsigned int, IndexSet> insert_points(const std::vector<Point<dim>> &points, const std::vector<std::vector<double>> &properties = {})¶
Insert global points into the particle handler.
- Parameters:
points – The points to be inserted.
properties – Optional property vectors stored on inserted particles.
- Returns:
A map of processor to local indices corresponding to the processor where the local qpoints ended up being locate w.r.t. the background grid.
Protected Attributes
-
const ParticleCouplingParameters<dim> &par¶
Parameters for particle coupling.
This object contains parameters that control the behavior of the particle coupling process, such as the extraction level for the R-tree.
-
MPI_Comm mpi_communicator¶
Get the MPI communicator associated with the triangulation.
- Return:
The MPI communicator.
-
SmartPointer<const parallel::TriangulationBase<dim>> tria_background¶
Smart pointer to the background triangulation.
-
SmartPointer<const Mapping<dim>> mapping¶
Smart pointer to the mapping associated with the triangulation.