![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <insertion_plane.h>
Public Member Functions | |
| InsertionPlane (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 |
| 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 () |
Private Member Functions | |
| void | find_inplane_cells (const parallel::distributed::Triangulation< dim > &triangulation, const Point< 3 > &plane_point, const Tensor< 1, 3 > &plane_normal_vector) |
| void | find_centers_of_inplane_cells () |
Private Attributes | |
| std::set< typename Triangulation< dim >::active_cell_iterator > | plane_cells_for_insertion |
| double | maximum_range_for_randomness |
| int | particles_of_each_type_remaining |
| unsigned int | current_inserting_particle_type |
| std::unordered_map< unsigned int, Point< dim > > | cells_centers |
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 |
Insertion of particles using cells cut by a plane. Particle insertion using cells cut by a plane. Locally owned cells that are cut by the plane are flagged. From those flagged cells, we insert a particle at their centroids if they are individually empty (contain no particle). This way, no significant overlap is occurring on the insertion of new particle which can occur with other insertion method.
Definition at line 18 of file insertion_plane.h.
| InsertionPlane< dim, PropertiesIndex >::InsertionPlane | ( | const std::vector< std::shared_ptr< Distribution > > & | size_distribution_object_container, |
| const parallel::distributed::Triangulation< dim > & | triangulation, | ||
| const DEMSolverParameters< dim > & | dem_parameters ) |
The plane insertion class insert particles using a plane define by a point and a normal vector. This method of insertion can be useful when dealing with a domain close to be fully filled with particle. In this situation, other insertion method have a high risk to create a big overlap between particles on insertion. The plane insertion method mitigate this risk by insertion at the center of empty cells.
| 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 16 of file insertion_plane.cc.
References current_inserting_particle_type, find_centers_of_inplane_cells(), find_inplane_cells(), Insertion< dim, PropertiesIndex >::Insertion(), DEMSolverParameters< dim >::insertion_info, maximum_range_for_randomness, and particles_of_each_type_remaining.
|
inlineoverridevirtual |
Deserialize an input archive to the plane insertion object.
| ar | Input archive where the attributes are stored. |
Implements Insertion< dim, PropertiesIndex >.
Definition at line 72 of file insertion_plane.h.
References current_inserting_particle_type, and particles_of_each_type_remaining.
|
private |
Store the location of the centers of all the cells that are in the plane.
Definition at line 97 of file insertion_plane.cc.
References cells_centers, and plane_cells_for_insertion.
|
private |
Store the cells that are cut by the plane.
| triangulation | Triangulation to access the cells in which the particles are inserted |
| plane_point | Point which define the plane |
| plane_normal_vector | Vector which define the normal direction of the plane. |
Definition at line 47 of file insertion_plane.cc.
References plane_cells_for_insertion, and point_nd_to_3d().
|
overridevirtual |
Carries out the insertion of particles.
| 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 110 of file insertion_plane.cc.
References Insertion< dim, PropertiesIndex >::assign_particle_properties(), cells_centers, current_inserting_particle_type, Insertion< dim, PropertiesIndex >::find_cells_in_removing_box(), find_centers_of_inplane_cells(), find_inplane_cells(), DEMSolverParameters< dim >::insertion_info, DEMSolverParameters< dim >::lagrangian_physical_properties, Insertion< dim, PropertiesIndex >::mark_for_update, maximum_range_for_randomness, Parameters::Lagrangian::LagrangianPhysicalProperties::number, Parameters::Lagrangian::LagrangianPhysicalProperties::particle_type_number, particles_of_each_type_remaining, plane_cells_for_insertion, Insertion< dim, PropertiesIndex >::remove_particles_in_box(), and Insertion< dim, PropertiesIndex >::removing_particles_in_region.
|
inlineoverridevirtual |
Serialize the plane insertion object to an output archive.
| ar | Output archive where the attributes are stored. |
Implements Insertion< dim, PropertiesIndex >.
Definition at line 60 of file insertion_plane.h.
References current_inserting_particle_type, and particles_of_each_type_remaining.
|
private |
Definition at line 105 of file insertion_plane.h.
|
private |
Definition at line 104 of file insertion_plane.h.
|
private |
Definition at line 102 of file insertion_plane.h.
|
private |
Definition at line 103 of file insertion_plane.h.
|
private |
Definition at line 101 of file insertion_plane.h.