chrono::particlefactory::ChParticleProcessor Class Reference

Description

Class that can be used to process particles.

It uses two 'tools' that can be plugged in: 1) an object inherited from ChParticleEventTrigger, that decides IF an event must be triggered (there are ready-to-use triggers such as trigger if inside a box, if older than X, etc., or you can implement your own) 2) an object inherited from ChParticleProcessEvent, the performs an action if the event is triggered (there are ready-to-use event processors such as remove particle, etc.) Note: by default, the default trigger is ChParticleEventTriggerNever and the default particle event processor is ChParticleProcessEventDoNothing, so the default behavior is 'do nothing', so you must plug in more sophisticated ones after you create the ChParticleProcessor and before you use it.

#include <ChParticleProcessor.h>

Inheritance diagram for chrono::particlefactory::ChParticleProcessor:

Public Member Functions

virtual int ProcessParticles (ChSystem &msystem)
 This function process particles according to some rule, defined by plugging appropriate ChParticleEventTrigger and ChParticleProcessEvent. More...
 
void SetEventTrigger (std::shared_ptr< ChParticleEventTrigger > mtrigger)
 Use this function to plug in an event trigger.
 
void SetParticleEventProcessor (std::shared_ptr< ChParticleProcessEvent > mproc)
 Use this function to plug in a particle event processor.
 

Protected Attributes

std::shared_ptr< ChParticleEventTriggertrigger
 
std::shared_ptr< ChParticleProcessEventparticle_processor
 

Member Function Documentation

◆ ProcessParticles()

virtual int chrono::particlefactory::ChParticleProcessor::ProcessParticles ( ChSystem msystem)
inlinevirtual

This function process particles according to some rule, defined by plugging appropriate ChParticleEventTrigger and ChParticleProcessEvent.

Returns the number of processed particles (those that triggered events.)


The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono/particlefactory/ChParticleProcessor.h