![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <dem_action_manager.h>
Static Public Member Functions | |
| static DEMActionManager * | get_action_manager () |
Private Member Functions | |
| DEMActionManager () | |
Private Attributes | |
| bool | periodic_boundaries_enabled |
| bool | solid_objects_enabled |
| bool | sparse_contacts_enabled |
| bool | grid_motion_enabled |
| bool | read_checkpoint_trigger |
| bool | load_balance_trigger |
| bool | clear_tangential_displacement_trigger |
| bool | resize_containers_trigger |
| bool | contact_search_trigger |
| bool | solid_object_search_trigger |
| bool | sparse_contacts_cells_update_trigger |
| bool | mobility_status_reset_trigger |
Static Private Attributes | |
| static DEMActionManager * | instance = nullptr |
Manage the actions to be performed in the DEM solver and on the DEM part of the coupling CFD-DEM solver.
Any event that needs some following actions is handled by the action manager. The event communicates to the action manager that it happened and the action manager will change the trigger flags to the actions to be taken. When this action is about to be performed, it checks with the action manager if it should be triggered. Many events can trigger the same actions, but when the action is about to be performed, it only checks if it has to be performed, not what event have happened.
If you implement a new feature that needs resetting or contact search after (or other actions), you should add a new "step" function to the action manager that will set the trigger to the action to be performed. If you implement new actions, you should add a new trigger flag and a new check function to the action manager. Obviously, you should also have to initialize the trigger in the constructor, and reset it in the reset function called after a DEM iteration. If the action depends on a enabling of a feature, you should add a new function to set the enabled flag.
Definition at line 30 of file dem_action_manager.h.
|
delete |
Copy constructor as a delete function to make sure it can not be copied. It will never be used.
| copy | The object to be copied |
References DEMActionManager().
|
inlineprivate |
Constructor of the DEMActionManager.
Definition at line 401 of file dem_action_manager.h.
References clear_tangential_displacement_trigger, contact_search_trigger, grid_motion_enabled, load_balance_trigger, mobility_status_reset_trigger, periodic_boundaries_enabled, read_checkpoint_trigger, resize_containers_trigger, solid_object_search_trigger, solid_objects_enabled, sparse_contacts_cells_update_trigger, and sparse_contacts_enabled.
|
inline |
Check if the tangential displacement history needs to be cleared.
Definition at line 363 of file dem_action_manager.h.
References clear_tangential_displacement_trigger.
|
inline |
Check if the contact search needs to be performed.
Definition at line 336 of file dem_action_manager.h.
References contact_search_trigger.
|
inline |
Check if the solid objects are enabled to perform some actions that are not handled by triggers of the action manager.
Definition at line 177 of file dem_action_manager.h.
References grid_motion_enabled.
|
inline |
Check if the repartitioning (load balancing) needs to be performed.
Definition at line 327 of file dem_action_manager.h.
References load_balance_trigger.
|
inline |
Check if the mobility status need to be reset to mobile.
Definition at line 381 of file dem_action_manager.h.
References mobility_status_reset_trigger.
|
inline |
Check if the periodic boundaries are enabled to perform some actions that are not handled by triggers of the action manager.
Definition at line 93 of file dem_action_manager.h.
References periodic_boundaries_enabled.
|
inline |
Check if the containers need to be resized.
Definition at line 372 of file dem_action_manager.h.
References resize_containers_trigger.
|
inline |
Check if checkpoint needs to be read.
Definition at line 318 of file dem_action_manager.h.
References read_checkpoint_trigger.
|
inline |
Check if the solid object has to be searched.
Definition at line 354 of file dem_action_manager.h.
References solid_object_search_trigger.
|
inline |
Check if the solid objects are enabled to perform some actions that are not handled by triggers of the action manager.
Definition at line 118 of file dem_action_manager.h.
References solid_objects_enabled.
|
inline |
Check if the sparse contacts is enabled to perform some actions that are not handled by triggers of the action manager.
Definition at line 156 of file dem_action_manager.h.
References sparse_contacts_enabled.
|
inline |
Check if the sparse contacts cells need to be updated.
Definition at line 345 of file dem_action_manager.h.
References sparse_contacts_cells_update_trigger.
|
inline |
Set trigger for the contact search to be performed in the current time step because of a contact detection step.
It triggers:
Definition at line 259 of file dem_action_manager.h.
References contact_search_trigger.
|
inline |
Set trigger that the mobility status need to be reset to mobile at the first DEM time step if the sparse contacts are enabled.
It trigger:
Definition at line 292 of file dem_action_manager.h.
References mobility_status_reset_trigger, and sparse_contacts_enabled.
|
static |
Getter of the unique instance of the DEMActionManager.
Definition at line 9 of file dem_action_manager.cc.
References DEMActionManager(), and instance.
|
inline |
Set trigger for the contact search to be performed at the last DEM iteration of the CFD iteration.
It triggers:
Definition at line 309 of file dem_action_manager.h.
References contact_search_trigger.
|
inline |
Set triggers for actions to be performed in the current iteration because it is a load balancing step.
It triggers:
Definition at line 224 of file dem_action_manager.h.
References clear_tangential_displacement_trigger, contact_search_trigger, load_balance_trigger, resize_containers_trigger, solid_object_search_trigger, solid_objects_enabled, sparse_contacts_cells_update_trigger, and sparse_contacts_enabled.
|
delete |
Copy constructor as a delete function to make sure it can not be assigned. It will never be used.
| copy | The object to be copied |
References DEMActionManager().
|
inline |
Set trigger for the contact search to be performed in the current time step because of a particle insertion step.
It triggers:
Definition at line 244 of file dem_action_manager.h.
References contact_search_trigger.
|
inline |
Reset all triggers to false. TODO: modify the handling of the contact search at counter = 1 because of the resetting of the mobility status.
Definition at line 62 of file dem_action_manager.h.
References clear_tangential_displacement_trigger, contact_search_trigger, load_balance_trigger, mobility_status_reset_trigger, read_checkpoint_trigger, solid_object_search_trigger, and sparse_contacts_cells_update_trigger.
|
inline |
Set triggers for actions to be performed in the current time step because the simulation starts from restart files (previously called checkpoint step).
It triggers the reading of checkpoints, the contact search, clearing the contact structures, the solid object mapping (if enabled), and the update of the sparse contacts cells (if enabled).
Definition at line 192 of file dem_action_manager.h.
References clear_tangential_displacement_trigger, contact_search_trigger, read_checkpoint_trigger, solid_object_search_trigger, solid_objects_enabled, sparse_contacts_cells_update_trigger, and sparse_contacts_enabled.
|
inline |
Flag that the grid will motion in the simulation.
Definition at line 165 of file dem_action_manager.h.
References grid_motion_enabled.
|
inline |
Flag that there are periodic boundary in the simulation.
Definition at line 81 of file dem_action_manager.h.
References periodic_boundaries_enabled.
|
inline |
Flag that there are solid objects in the simulation. Already trigger a solid object search in the background map.
Definition at line 103 of file dem_action_manager.h.
References solid_object_search_trigger, and solid_objects_enabled.
|
inline |
Disables the ASC.
Definition at line 141 of file dem_action_manager.h.
References mobility_status_reset_trigger, and sparse_contacts_enabled.
|
inline |
Flag that the ASC is enabled and trigger a mobility status reset to initialize the containers.
Definition at line 128 of file dem_action_manager.h.
References mobility_status_reset_trigger, and sparse_contacts_enabled.
|
inline |
Set triggers for actions to be performed in the current time step because of a solid object search step.
It triggers the solid object search and the contact search.
Definition at line 271 of file dem_action_manager.h.
References contact_search_trigger, and solid_object_search_trigger.
|
inline |
Check if the default broad search functions should be used. It depends if adaptive sparse contacts is enabled, if so, it is a step where the mobility status are reset.
Definition at line 392 of file dem_action_manager.h.
References mobility_status_reset_trigger, and sparse_contacts_enabled.
|
private |
Flag of the trigger for clearing the tangential displacement history.
Definition at line 454 of file dem_action_manager.h.
|
private |
Flag of the trigger for the contact search.
Definition at line 465 of file dem_action_manager.h.
|
private |
Flag for motion of grid in the simulation.
Definition at line 439 of file dem_action_manager.h.
|
staticprivate |
Pointer to the unique of the DEMActionManager.
Definition at line 419 of file dem_action_manager.h.
|
private |
Flag of the trigger for load balancing execution.
Definition at line 449 of file dem_action_manager.h.
|
private |
Flag of the trigger for the mobility status reset to mobile status.
Definition at line 481 of file dem_action_manager.h.
|
private |
Flag for periodic boundaries in the simulation.
Definition at line 424 of file dem_action_manager.h.
|
private |
Flag of the trigger for reading the checkpoint.
Definition at line 444 of file dem_action_manager.h.
|
private |
Flag of the trigger for resize the vector dependant of the local particles.
Definition at line 460 of file dem_action_manager.h.
|
private |
Flag of the trigger for the solid object search, mapping the solid with the background triangulation.
Definition at line 471 of file dem_action_manager.h.
|
private |
Flag for solid objects in the simulation.
Definition at line 429 of file dem_action_manager.h.
|
private |
Flag of the trigger for the update of the sparse contacts cells.
Definition at line 476 of file dem_action_manager.h.
|
private |
Flag for the enabling of the sparse contacts.
Definition at line 434 of file dem_action_manager.h.