![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <insertion_packed.h>
Public Member Functions | |
| InsertionPacked (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 () |
Static Public Member Functions | |
| static void | apply_shift_displacement (Particles::ParticleHandler< dim > &particle_handler, const double max_displacement, ParticleInteractionOutcomes< PropertiesIndex > &contact_outcome, std::vector< double > &displacements) |
Private Member Functions | |
| void | generate_insertion_location (Point< dim > &insertion_location, std::mt19937 &rng, const InsertionInfo< dim > &insertion_information) |
Private Attributes | |
| std::vector< double > | axis_min |
| std::vector< double > | axis_max |
| std::shared_ptr< Function< dim > > | acceptance_fct |
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 16 of file insertion_packed.h.
| InsertionPacked< dim, PropertiesIndex >::InsertionPacked | ( | 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 the packed insertion method.
Particles are inserted by randomly generating points inside the insertion region and assigning them particle properties (such as their diameter). Because the generated configuration may contain particle-particle and particle-wall overlaps, particles are iteratively displaced along the corresponding contact normal directions until all overlaps are resolved.
| 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 17 of file insertion_packed.cc.
References acceptance_fct, axis_max, axis_min, Parameters::Lagrangian::InsertionInfo< dim >::direction_sequence, Insertion< dim, PropertiesIndex >::Insertion(), Parameters::Lagrangian::InsertionInfo< dim >::insertion_box_point_1, Parameters::Lagrangian::InsertionInfo< dim >::insertion_box_point_2, and DEMSolverParameters< dim >::insertion_info.
|
static |
Displace the locally owned particles by the displacements accumulated by the shift contact models.
Each contact of a particle adds a displacement to the entry of that particle in the force container of the contact outcomes. Each particle is moved by the sum of the displacements of its contacts, limited to a maximum norm, and the norm of the applied displacement is added to the displacement used by the dynamic contact detection. The force container is then reset to zero for the next pseudo-time step.
| [in,out] | particle_handler | The particle handler of particles which are being inserted. |
| [in] | max_displacement | Maximum displacement of a particle during a single pseudo-time step. |
| [in,out] | contact_outcome | Contact outcomes holding the accumulated displacements of the particles. |
| [in,out] | displacements | Displacement of each particle since the last contact detection step. The norm of the applied displacement is added. |
Definition at line 186 of file insertion_packed.cc.
References ParticleInteractionOutcomes< PropertiesIndex >::force, and tensor_nd_to_2d().
|
inlineoverridevirtual |
Deserialize an input archive to the packed insertion object. For the packing insertion, nothing needs to be stored.
| ar | Input archive where the attributes are stored. |
Implements Insertion< dim, PropertiesIndex >.
Definition at line 76 of file insertion_packed.h.
|
private |
Generate an insertion point inside an insertion box.
| insertion_location | Generated insertion location. |
| rng | Random number generator. |
| insertion_information | Insertion parameters read from the .prm file. |
Definition at line 228 of file insertion_packed.cc.
References acceptance_fct, axis_max, axis_min, and Parameters::Lagrangian::InsertionInfo< dim >::direction_sequence.
|
overridevirtual |
Carries out the packed 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 56 of file insertion_packed.cc.
References Insertion< dim, PropertiesIndex >::assign_particle_properties(), generate_insertion_location(), DEMSolverParameters< dim >::insertion_info, DEMSolverParameters< dim >::lagrangian_physical_properties, Parameters::Lagrangian::LagrangianPhysicalProperties::number, Parameters::Lagrangian::LagrangianPhysicalProperties::particle_type_number, and Insertion< dim, PropertiesIndex >::print_insertion_info().
|
inlineoverridevirtual |
Serialize the packed insertion object to an output archive. For the packing insertion, nothing needs to be stored.
| ar | Output archive where the attributes are stored. |
Implements Insertion< dim, PropertiesIndex >.
Definition at line 63 of file insertion_packed.h.
|
private |
Function used to insert particles inside or outside an arbitrary shape.
Definition at line 128 of file insertion_packed.h.
|
private |
Definition at line 125 of file insertion_packed.h.
|
private |
Definition at line 125 of file insertion_packed.h.