Manages the coupling of particles with a finite element background mesh. More...
#include <particle_coupling.h>
Public Member Functions | |
ParticleCoupling (const ParticleCouplingParameters< dim > &par) | |
Constructor. | |
void | output_particles (const std::string &output_name) const |
Outputs the current state of the particles to a file. | |
void | initialize_particle_handler (const parallel::TriangulationBase< dim > &tria_background, const Mapping< dim > &mapping=StaticMappingQ1< dim >::mapping) |
std::vector< std::vector< BoundingBox< dim > > > | get_global_bounding_boxes () const |
const Particles::ParticleHandler< dim > & | get_particles () const |
std::map< unsigned int, IndexSet > | insert_points (const std::vector< Point< dim > > &points, const std::vector< std::vector< double > > &properties={}) |
Protected Attributes | |
const ParticleCouplingParameters< dim > & | par |
Parameters for particle coupling. | |
MPI_Comm | mpi_communicator |
Get the MPI communicator associated with the triangulation. | |
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. | |
std::vector< std::vector< BoundingBox< dim > > > | global_bounding_boxes |
Particles::ParticleHandler< dim > | particles |
Handler for managing particles in the simulation. | |
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.
dim | The spatial dimension. |
Definition at line 79 of file particle_coupling.h.
ParticleCoupling< dim >::ParticleCoupling | ( | const ParticleCouplingParameters< dim > & | par | ) |
Constructor.
par | Reference to the parameters governing particle coupling. |
Definition at line 26 of file particle_coupling.cc.
References mpi_communicator, and par.
std::vector< std::vector< BoundingBox< dim > > > ParticleCoupling< dim >::get_global_bounding_boxes | ( | ) | const |
Get a covering of the background triangulation indexed by processor.
Definition at line 82 of file particle_coupling.cc.
References global_bounding_boxes.
const Particles::ParticleHandler< dim > & ParticleCoupling< dim >::get_particles | ( | ) | const |
Get the particles triangulation.
Definition at line 91 of file particle_coupling.cc.
Referenced by ReducedCoupling< reduced_dim, dim, spacedim, n_components >::assemble_coupling_matrix().
void ParticleCoupling< dim >::initialize_particle_handler | ( | const parallel::TriangulationBase< dim > & | tria_background, |
const Mapping< dim > & | mapping = StaticMappingQ1<dim>::mapping ) |
Initializes the particle handler with a background triangulation.
tria_background | The background triangulation. |
mapping | The mapping associated with the triangulation. |
Definition at line 47 of file particle_coupling.cc.
References mapping, mpi_communicator, particles, and tria_background.
std::map< unsigned int, IndexSet > ParticleCoupling< dim >::insert_points | ( | const std::vector< Point< dim > > & | points, |
const std::vector< std::vector< double > > & | properties = {} ) |
Insert global points into the particle handler.
points | The points to be inserted. |
Definition at line 100 of file particle_coupling.cc.
void ParticleCoupling< dim >::output_particles | ( | const std::string & | output_name | ) | const |
Outputs the current state of the particles to a file.
output_name | The base name of the output file. |
Definition at line 36 of file particle_coupling.cc.
References Particles::DataOut< int dim, int spacedim >::build_patches(), mpi_communicator, particles, and Particles::DataOut< int dim, int spacedim >::write_vtu_in_parallel().
|
protected |
A covering of the background triangulation indexed by processor.
Definition at line 156 of file particle_coupling.h.
Referenced by get_global_bounding_boxes().
|
protected |
Smart pointer to the mapping associated with the triangulation.
Definition at line 151 of file particle_coupling.h.
Referenced by ReducedCoupling< reduced_dim, dim, spacedim, n_components >::initialize(), and initialize_particle_handler().
|
protected |
Get the MPI communicator associated with the triangulation.
Definition at line 141 of file particle_coupling.h.
Referenced by initialize_particle_handler(), output_particles(), and ParticleCoupling().
|
protected |
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.
Definition at line 135 of file particle_coupling.h.
Referenced by ParticleCoupling().
|
protected |
Handler for managing particles in the simulation.
Definition at line 161 of file particle_coupling.h.
Referenced by initialize_particle_handler(), and output_particles().
|
protected |
Smart pointer to the background triangulation.
Definition at line 146 of file particle_coupling.h.
Referenced by initialize_particle_handler().