Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
InsertionList< dim, PropertiesIndex > Class Template Reference

#include <insertion_list.h>

Inheritance diagram for InsertionList< dim, PropertiesIndex >:
[legend]

Public Member Functions

 InsertionList (const std::vector< std::shared_ptr< Distribution > > &size_distribution_object_container, const parallel::distributed::Triangulation< dim > &triangulation, const DEMSolverParameters< dim > &dem_parameters)
virtual void insert (Particles::ParticleHandler< dim > &particle_handler, const parallel::distributed::Triangulation< dim > &triangulation, const DEMSolverParameters< dim > &dem_parameters) override
void assign_particle_properties_for_list_insertion (const DEMSolverParameters< dim > &dem_parameters, const unsigned int &inserted_this_step_this_proc, std::vector< std::vector< double > > &particle_properties)
virtual void serialize (boost::archive::text_oarchive &ar) override
virtual void deserialize (boost::archive::text_iarchive &ar) override
Public Member Functions inherited from Insertion< dim, PropertiesIndex >
 Insertion (const std::vector< std::shared_ptr< Distribution > > &size_distribution_object_container, const parallel::distributed::Triangulation< dim > &triangulation, const DEMSolverParameters< dim > &dem_parameters)
virtual ~Insertion ()

Public Attributes

unsigned int remaining_particles_of_each_type
unsigned int current_inserting_particle_type
std::vector< Point< dim > > insertion_points
std::vector< Tensor< 1, 3 > > velocities
std::vector< Tensor< 1, 3 > > angular_velocities
std::vector< double > diameters
std::vector< double > temperatures

Additional Inherited Members

Protected Member Functions inherited from Insertion< dim, PropertiesIndex >
void print_insertion_info (const unsigned int &inserted_this_step, const unsigned int &remained_particles, const unsigned int &particle_type, const ConditionalOStream &pcout)
void assign_particle_properties (const DEMSolverParameters< dim > &dem_parameters, const unsigned int &inserted_this_step_this_proc, const unsigned int &current_inserting_particle_type, const std::vector< Point< dim > > &insertion_points, std::vector< std::vector< double > > &particle_properties)
void find_cells_in_removing_box (const parallel::distributed::Triangulation< dim > &triangulation)
void remove_particles_in_box (Particles::ParticleHandler< dim > &particle_handler)
Protected Attributes inherited from Insertion< dim, PropertiesIndex >
std::vector< std::shared_ptr< Distribution > > distributions_objects
const bool removing_particles_in_region
Point< dim > p_min
Point< dim > p_max
std::set< typename Triangulation< dim >::active_cell_iterator > in_removal_box
std::set< typename Triangulation< dim >::active_cell_iterator > edge_of_removal_box
bool mark_for_update
boost::signals2::connection change_to_triangulation

Detailed Description

template<int dim, typename PropertiesIndex>
class InsertionList< dim, PropertiesIndex >

Definition at line 10 of file insertion_list.h.

Constructor & Destructor Documentation

◆ InsertionList()

template<int dim, typename PropertiesIndex>
InsertionList< dim, PropertiesIndex >::InsertionList ( const std::vector< std::shared_ptr< Distribution > > & size_distribution_object_container,
const parallel::distributed::Triangulation< dim > & triangulation,
const DEMSolverParameters< dim > & dem_parameters )

Insert particles using a list of specific positions. This allows the insertion of a low number of particles at a well-controlled location, which is especially useful from a testing perspective. The code ensures that the number of positions provided in the x,y (and possibly z) direction is coherent. If more particles than the number of positions in the list are requested, the class will continue inserting particles at the insertion frequency using the list of positions. There is no mechanism in place that prevents the overlap of these new particles with previous ones.

Parameters
size_distribution_object_containerContains all distribution for each particle type
triangulationTriangulation to access the cells in which the particles are inserted
dem_parametersDEM parameters declared in the .prm file

Definition at line 18 of file insertion_list.cc.

References angular_velocities, current_inserting_particle_type, diameters, Insertion< dim, PropertiesIndex >::Insertion(), DEMSolverParameters< dim >::insertion_info, insertion_points, DEMSolverParameters< dim >::lagrangian_physical_properties, Parameters::Lagrangian::LagrangianPhysicalProperties::particle_average_diameter, remaining_particles_of_each_type, temperatures, and velocities.

Member Function Documentation

◆ assign_particle_properties_for_list_insertion()

template<int dim, typename PropertiesIndex>
void InsertionList< dim, PropertiesIndex >::assign_particle_properties_for_list_insertion ( const DEMSolverParameters< dim > & dem_parameters,
const unsigned int & inserted_this_step_this_proc,
std::vector< std::vector< double > > & particle_properties )

Carries out assigning the properties of inserted particles specifically for the list insertion method. In this method, the initial translation and angular velocities, the temperature and the diameter of each particle are set.

Parameters
dem_parametersDEM parameters declared in the .prm file
inserted_this_step_this_procNumber of particles that are inserted at each insertion step on each processor. This value can change in the last insertion step to reach the desired number of particles
particle_propertiesProperties of all inserted particles at each insertion step

Definition at line 175 of file insertion_list.cc.

References angular_velocities, current_inserting_particle_type, diameters, DEM::has_thermal_properties, DEMSolverParameters< dim >::lagrangian_physical_properties, temperatures, and velocities.

◆ deserialize()

template<int dim, typename PropertiesIndex>
virtual void InsertionList< dim, PropertiesIndex >::deserialize ( boost::archive::text_iarchive & ar)
inlineoverridevirtual

Deserialize an input archive to the list insertion object.

Parameters
arInput archive where the attributes are stored.

Implements Insertion< dim, PropertiesIndex >.

Definition at line 96 of file insertion_list.h.

References current_inserting_particle_type, and remaining_particles_of_each_type.

◆ insert()

template<int dim, typename PropertiesIndex>
void InsertionList< dim, PropertiesIndex >::insert ( Particles::ParticleHandler< dim > & particle_handler,
const parallel::distributed::Triangulation< dim > & triangulation,
const DEMSolverParameters< dim > & dem_parameters )
overridevirtual

The InsertionList class inserts particles using a list of specific position. This allows the insertion of any number of particles at a well-controlled location, which is especially useful from a testing perspective. The code ensures that the number of positions provided in the x,y (and possibly z) direction is coherent. If more particles than the number of positions in the list are requested, the class will continue inserting particles at the insertion frequency using the list of positions. There is no mechanism in place that prevents the overlap of these new particles with previous ones.

Parameters
particle_handlerThe particle handler of particles which are being inserted
triangulationTriangulation to access the cells in which the particles are inserted
dem_parametersDEM parameters declared in the .prm file

Implements Insertion< dim, PropertiesIndex >.

Definition at line 87 of file insertion_list.cc.

References assign_particle_properties_for_list_insertion(), current_inserting_particle_type, Insertion< dim, PropertiesIndex >::find_cells_in_removing_box(), insertion_points, DEMSolverParameters< dim >::lagrangian_physical_properties, Insertion< dim, PropertiesIndex >::mark_for_update, Parameters::Lagrangian::LagrangianPhysicalProperties::number, Parameters::Lagrangian::LagrangianPhysicalProperties::particle_type_number, Insertion< dim, PropertiesIndex >::print_insertion_info(), remaining_particles_of_each_type, Insertion< dim, PropertiesIndex >::remove_particles_in_box(), and Insertion< dim, PropertiesIndex >::removing_particles_in_region.

◆ serialize()

template<int dim, typename PropertiesIndex>
virtual void InsertionList< dim, PropertiesIndex >::serialize ( boost::archive::text_oarchive & ar)
inlineoverridevirtual

Serialize the list insertion object to an output archive.

Parameters
arOutput archive where the attributes are stored.

Implements Insertion< dim, PropertiesIndex >.

Definition at line 84 of file insertion_list.h.

References current_inserting_particle_type, and remaining_particles_of_each_type.

Member Data Documentation

◆ angular_velocities

template<int dim, typename PropertiesIndex>
std::vector<Tensor<1, 3> > InsertionList< dim, PropertiesIndex >::angular_velocities

Definition at line 110 of file insertion_list.h.

◆ current_inserting_particle_type

template<int dim, typename PropertiesIndex>
unsigned int InsertionList< dim, PropertiesIndex >::current_inserting_particle_type

Definition at line 104 of file insertion_list.h.

◆ diameters

template<int dim, typename PropertiesIndex>
std::vector<double> InsertionList< dim, PropertiesIndex >::diameters

Definition at line 111 of file insertion_list.h.

◆ insertion_points

template<int dim, typename PropertiesIndex>
std::vector<Point<dim> > InsertionList< dim, PropertiesIndex >::insertion_points

Definition at line 108 of file insertion_list.h.

◆ remaining_particles_of_each_type

template<int dim, typename PropertiesIndex>
unsigned int InsertionList< dim, PropertiesIndex >::remaining_particles_of_each_type

Definition at line 103 of file insertion_list.h.

◆ temperatures

template<int dim, typename PropertiesIndex>
std::vector<double> InsertionList< dim, PropertiesIndex >::temperatures

Definition at line 112 of file insertion_list.h.

◆ velocities

template<int dim, typename PropertiesIndex>
std::vector<Tensor<1, 3> > InsertionList< dim, PropertiesIndex >::velocities

Definition at line 109 of file insertion_list.h.


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