Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
OngoingCollisionLog< dim > Class Template Reference

#include <log_collision_data.h>

Public Member Functions

void start_collision (const collision_log< dim > &log)
void end_collision (const unsigned int particle_id, const types::boundary_id boundary_id, collision_log< dim > &start_log)
bool is_in_collision (const unsigned int particle_id, const types::boundary_id boundary_id) const

Private Attributes

std::map< std::pair< unsigned int, types::boundary_id >, collision_log< dim > > ongoing_collisions

Detailed Description

template<int dim>
class OngoingCollisionLog< dim >

Class managing the ongoing collisions.

Definition at line 46 of file log_collision_data.h.

Member Function Documentation

◆ end_collision()

template<int dim>
void OngoingCollisionLog< dim >::end_collision ( const unsigned int particle_id,
const types::boundary_id boundary_id,
collision_log< dim > & start_log )
inline

End a collision for a particle. Retrieve the start log and remove the particle from the ongoing collisions.

Parameters
[in]particle_idThe id of the particle that ended the collision.
[out]start_logThe log of the collision start to be filled.

Definition at line 67 of file log_collision_data.h.

References ongoing_collisions.

◆ is_in_collision()

template<int dim>
bool OngoingCollisionLog< dim >::is_in_collision ( const unsigned int particle_id,
const types::boundary_id boundary_id ) const
inline

Check whether the particle is currently in a collision.

Parameters
[in]particle_idThe id of the particle to check.
Returns
True if the particle is in a collision, false otherwise.

Definition at line 83 of file log_collision_data.h.

References ongoing_collisions.

◆ start_collision()

template<int dim>
void OngoingCollisionLog< dim >::start_collision ( const collision_log< dim > & log)
inline

Start logging a collision for a particle. If the particle is already present in the log, it does nothing.

Parameters
[in]logThe collision log to be added for the particle.

Definition at line 55 of file log_collision_data.h.

References collision_log< dim >::boundary_id, ongoing_collisions, and collision_log< dim >::particle_id.

Member Data Documentation

◆ ongoing_collisions

template<int dim>
std::map<std::pair<unsigned int, types::boundary_id>, collision_log<dim> > OngoingCollisionLog< dim >::ongoing_collisions
private

Definition at line 94 of file log_collision_data.h.


The documentation for this class was generated from the following file: