![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <insertion_file.h>
Public Member Functions | |
| InsertionFile (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_file_insertion (const DEMSolverParameters< dim > &dem_parameters, const unsigned int &inserted_this_step_this_proc, std::map< std::string, std::vector< double > > &particles_data, 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 |
| unsigned int | current_file_id |
| const unsigned int | number_of_files |
| const std::vector< std::string > | insertion_files |
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 ¤t_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 |
Definition at line 10 of file insertion_file.h.
| InsertionFile< dim, PropertiesIndex >::InsertionFile | ( | const std::vector< std::shared_ptr< Distribution > > & | size_distribution_object_container, |
| const parallel::distributed::Triangulation< dim > & | triangulation, | ||
| const DEMSolverParameters< dim > & | dem_parameters ) |
The InsertionFile class inserts particles using data stored in a file. This allows the insertion of any number of particles at a well-controlled location with any diameter value, translation, angular velocity and temperature.
| size_distribution_object_container | Contains all distribution for each particle type |
| triangulation | Triangulation to access the cells in which the particles are inserted |
| dem_parameters | DEM parameters declared in the .prm file |
Definition at line 11 of file insertion_file.cc.
References current_file_id, current_inserting_particle_type, Insertion< dim, PropertiesIndex >::Insertion(), insertion_files, number_of_files, and remaining_particles_of_each_type.
| void InsertionFile< dim, PropertiesIndex >::assign_particle_properties_for_file_insertion | ( | const DEMSolverParameters< dim > & | dem_parameters, |
| const unsigned int & | inserted_this_step_this_proc, | ||
| std::map< std::string, std::vector< double > > & | particles_data, | ||
| std::vector< std::vector< double > > & | particle_properties ) |
Carries out assigning the properties of inserted particles specifically for the file insertion method. In this method, the initial translation and angular velocities, the temperature and the diameter of each particles is set.
| dem_parameters | DEM parameters declared in the .prm file |
| inserted_this_step_this_proc | Number 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 |
| particles_data | Contains the particles |
| particle_properties | Properties of all inserted particles at each insertion step |
Definition at line 141 of file insertion_file.cc.
References current_inserting_particle_type, DEM::has_thermal_properties, and DEMSolverParameters< dim >::lagrangian_physical_properties.
|
inlineoverridevirtual |
Deserialize an input archive to the file insertion object.
| ar | Input archive where the attributes are stored. |
Implements Insertion< dim, PropertiesIndex >.
Definition at line 92 of file insertion_file.h.
References current_file_id, current_inserting_particle_type, and remaining_particles_of_each_type.
|
overridevirtual |
The InsertionFile class inserts particles using data stored in a file. This allows the insertion of any number of particles at a well-controlled location with any diameter value, translation, angular velocity and temperature.
| particle_handler | The particle handler of particles which are being inserted |
| triangulation | Triangulation to access the cells in which the particles are inserted |
| dem_parameters | DEM parameters declared in the .prm file |
Implements Insertion< dim, PropertiesIndex >.
Definition at line 30 of file insertion_file.cc.
References assign_particle_properties_for_file_insertion(), current_file_id, current_inserting_particle_type, fill_vectors_from_file(), Insertion< dim, PropertiesIndex >::find_cells_in_removing_box(), insertion_files, DEMSolverParameters< dim >::lagrangian_physical_properties, Insertion< dim, PropertiesIndex >::mark_for_update, Parameters::Lagrangian::LagrangianPhysicalProperties::number, number_of_files, 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.
|
inlineoverridevirtual |
Serialize the file insertion object to an output archive.
| ar | Output archive where the attributes are stored. |
Implements Insertion< dim, PropertiesIndex >.
Definition at line 79 of file insertion_file.h.
References current_file_id, current_inserting_particle_type, and remaining_particles_of_each_type.
| unsigned int InsertionFile< dim, PropertiesIndex >::current_file_id |
Definition at line 104 of file insertion_file.h.
| unsigned int InsertionFile< dim, PropertiesIndex >::current_inserting_particle_type |
Definition at line 101 of file insertion_file.h.
| const std::vector<std::string> InsertionFile< dim, PropertiesIndex >::insertion_files |
Definition at line 108 of file insertion_file.h.
| const unsigned int InsertionFile< dim, PropertiesIndex >::number_of_files |
Definition at line 105 of file insertion_file.h.
| unsigned int InsertionFile< dim, PropertiesIndex >::remaining_particles_of_each_type |
Definition at line 100 of file insertion_file.h.