SPH
Public Member Functions | Public Attributes | List of all members
MergeBoundHandler Class Reference

Handler merging overlapping particles if their relative velocity is lower than the escape velocity. More...

#include <Collision.h>

Inheritance diagram for MergeBoundHandler:
IOverlapHandler Polymorphic

Public Member Functions

 MergeBoundHandler (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 ()
 

Public Attributes

ArrayView< Vectorr
 
ArrayView< Vectorv
 
ArrayView< Vectoromega
 
ArrayView< Floatm
 
Float bounceLimit
 
Float rotationLimit
 

Detailed Description

Handler merging overlapping particles if their relative velocity is lower than the escape velocity.

If the relative veloity is too high, the particles are allowed to simply pass each other - this situation is not classified as overlap.

Definition at line 510 of file Collision.h.

Constructor & Destructor Documentation

◆ MergeBoundHandler()

MergeBoundHandler::MergeBoundHandler ( const RunSettings settings)
inlineexplicit

Definition at line 522 of file Collision.h.

Member Function Documentation

◆ handle()

virtual void MergeBoundHandler::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 564 of file Collision.h.

◆ initialize()

virtual void MergeBoundHandler::initialize ( Storage storage)
inlineoverridevirtual

Implements IOverlapHandler.

Definition at line 528 of file Collision.h.

◆ overlaps()

virtual bool MergeBoundHandler::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.
Todo:
shouldn't we check velocities AFTER the bounce?

Implements IOverlapHandler.

Definition at line 537 of file Collision.h.

Member Data Documentation

◆ bounceLimit

Float MergeBoundHandler::bounceLimit

Definition at line 518 of file Collision.h.

◆ m

ArrayView<Float> MergeBoundHandler::m

Definition at line 516 of file Collision.h.

◆ omega

ArrayView<Vector> MergeBoundHandler::omega

Definition at line 515 of file Collision.h.

◆ r

ArrayView<Vector> MergeBoundHandler::r

Definition at line 515 of file Collision.h.

◆ rotationLimit

Float MergeBoundHandler::rotationLimit

Definition at line 519 of file Collision.h.

◆ v

ArrayView<Vector> MergeBoundHandler::v

Definition at line 515 of file Collision.h.


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