SPH
Public Member Functions | List of all members
InternalBounceHandler Class Reference

Overlap handler performing a bounce of particles. More...

#include <Collision.h>

Inheritance diagram for InternalBounceHandler:
IOverlapHandler Polymorphic

Public Member Functions

 InternalBounceHandler (const RunSettings &settings)
 
virtual void initialize (Storage &storage) override
 
virtual bool overlaps (const Size i, const Size j) const override
 Returns true if two particles overlaps. More...
 
virtual void handle (const Size i, const Size j, FlatSet< Size > &toRemove) override
 Handles the overlap of two particles. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Overlap handler performing a bounce of particles.

Particles only bounce if their centers are moving towards each other. This way we prevent particles bouncing infinitely - after the first bounce, the particle move away from each other and they are not classified as overlaps by the handler.

Definition at line 472 of file Collision.h.

Constructor & Destructor Documentation

◆ InternalBounceHandler()

InternalBounceHandler::InternalBounceHandler ( const RunSettings settings)
inlineexplicit

Definition at line 479 of file Collision.h.

Member Function Documentation

◆ handle()

virtual void InternalBounceHandler::handle ( const Size  i,
const Size  j,
FlatSet< Size > &  toRemove 
)
inlineoverridevirtual

Handles the overlap of two particles.

When called, the particles must actually overlap (overlaps must return true). This is checked by assert.

Implements IOverlapHandler.

Definition at line 501 of file Collision.h.

◆ initialize()

virtual void InternalBounceHandler::initialize ( Storage storage)
inlineoverridevirtual

Implements IOverlapHandler.

Definition at line 487 of file Collision.h.

◆ overlaps()

virtual bool InternalBounceHandler::overlaps ( const Size  i,
const Size  j 
) const
inlineoverridevirtual

Returns true if two particles overlaps.

If so, the overlap is then resolved using handle.

Parameters
i,jIndices of particles in the storage.

Implements IOverlapHandler.

Definition at line 494 of file Collision.h.


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