Reduced Lagrange Multipliers
 
Loading...
Searching...
No Matches
ParticleCoupling< dim > Class Template Reference

Manages the coupling of particles with a finite element background mesh. More...

#include <particle_coupling.h>

Inheritance diagram for ParticleCoupling< dim >:
ReducedCoupling< reduced_dim, dim, spacedim, n_components >

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, IndexSetinsert_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.
 

Detailed Description

template<int dim>
class ParticleCoupling< dim >

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
dimThe spatial dimension.

Definition at line 79 of file particle_coupling.h.

Constructor & Destructor Documentation

◆ ParticleCoupling()

template<int dim>
ParticleCoupling< dim >::ParticleCoupling ( const ParticleCouplingParameters< dim > & par)

Constructor.

Parameters
parReference to the parameters governing particle coupling.

Definition at line 26 of file particle_coupling.cc.

References mpi_communicator, and par.

Member Function Documentation

◆ get_global_bounding_boxes()

template<int dim>
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.

◆ get_particles()

template<int dim>
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().

◆ initialize_particle_handler()

template<int dim>
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.

Parameters
tria_backgroundThe background triangulation.
mappingThe mapping associated with the triangulation.

Definition at line 47 of file particle_coupling.cc.

References mapping, mpi_communicator, particles, and tria_background.

◆ insert_points()

template<int dim>
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.

Parameters
pointsThe points to be inserted.
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.

Definition at line 100 of file particle_coupling.cc.

◆ output_particles()

template<int dim>
void ParticleCoupling< dim >::output_particles ( const std::string & output_name) const

Outputs the current state of the particles to a file.

Parameters
output_nameThe 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().

Member Data Documentation

◆ global_bounding_boxes

template<int dim>
std::vector<std::vector<BoundingBox<dim> > > ParticleCoupling< dim >::global_bounding_boxes
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().

◆ mapping

template<int dim>
SmartPointer<const Mapping<dim> > ParticleCoupling< dim >::mapping
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().

◆ mpi_communicator

template<int dim>
MPI_Comm ParticleCoupling< dim >::mpi_communicator
protected

Get the MPI communicator associated with the triangulation.

Returns
The MPI communicator.

Definition at line 141 of file particle_coupling.h.

Referenced by initialize_particle_handler(), output_particles(), and ParticleCoupling().

◆ par

template<int dim>
const ParticleCouplingParameters<dim>& ParticleCoupling< dim >::par
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().

◆ particles

template<int dim>
Particles::ParticleHandler<dim> ParticleCoupling< dim >::particles
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().

◆ tria_background

template<int dim>
SmartPointer<const parallel::TriangulationBase<dim> > ParticleCoupling< dim >::tria_background
protected

Smart pointer to the background triangulation.

Definition at line 146 of file particle_coupling.h.

Referenced by initialize_particle_handler().


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