#include <obstacle_data_structure.hpp>
◆ NeighborListUpdateTracker()
template<int dim, typename number , typename ObstacleType >
| NeighborListUpdateTracker::NeighborListUpdateTracker |
( |
const CellListParticleHandler< dim, number, ObstacleType > & |
obstacle_data_structure | ) |
|
|
explicit |
Tracker to determine whether an update of the obstacle data structure is required based on the displacements of the obstacles since the last update.
- Parameters
-
| obstacle_data_structure | The obstacle data structure to be monitored for updates. |
◆ reinit_after_update()
template<int dim, typename number , typename ObstacleType >
| void NeighborListUpdateTracker::reinit_after_update |
( |
const number |
new_skin_thickness = 0, |
|
|
const number |
new_max_displacement_before_update = 0 |
|
) |
| |
Whenever the obstacle data structure is updated, this function must be called to update the internal cache of previous obstacle locations. This ensures that the next call to update_required() will correctly compute the displacements of the obstacles since the last update. During this update, the skin thickness and maximum allowed displacement parameters are also updated. This is especially important when the underlying triangulation is coarsened or refined.
- Parameters
-
| new_skin_thickness | The new skin thickness to be used for the next update check. |
| new_max_displacement_before_update | The new maximum allowed displacement to be used for the next update check. |
◆ update_required()
template<int dim, typename number , typename ObstacleType >
| bool NeighborListUpdateTracker::update_required |
( |
| ) |
const |
This functions checks whether an update of the obstacle data structure and its cached structures is required. The decision is based on the maximum displacement of the obstacles since the last update. If the sum of the two largest displacements exceeds the specified skin thickness (i.e., the buffer distance by which the obstacle search region is enlarged to avoid rebuilding the data structures after every small movement),an update is required. This is checked globally for all MPI ranks. Hence, this is a collective operation and must be called by all ranks in the communicator.
In addition to the classic skin thickness criterion, this function also checks whether the maximum displacement of any particle exceeds the given maximum allowed displacement. This displacement is a user-defined parameter that can be set to ensure that the update is triggered even if the skin thickness criterion is not met, but a particle has moved too far from its original position. When using the dealii::Particles::ParticleHandler, this is important as the particle handler might lose track of particles if they have used more than one active cell.
- Returns
- True if an update is required, false otherwise.
◆ max_displacement_before_update
template<int dim, typename number , typename ObstacleType >
The maximum allowed displacement of any particle before an update is required.
◆ obstacle_data_structure
template<int dim, typename number , typename ObstacleType >
The obstacle data structure that is being monitored for updates.
◆ previous_obstacle_locations
template<int dim, typename number , typename ObstacleType >
The locations of the obstacles at the time of the last update. This is used to compute the displacements of the obstacles since the last update.
◆ skin_thickness
template<int dim, typename number , typename ObstacleType >
The thickness of the "skin" around the obstacles that triggers the update when exceeded by the sum of the two largest particle displacements.
The documentation for this struct was generated from the following files: