MEDYAN  3.1
Software for simulating active matter dynamics
SubSystem Class Reference

Manages all Movables and Reactables. More...

#include <SubSystem.h>

Collaboration diagram for SubSystem:

Public Member Functions

 SubSystem ()
 Default constructor does nothing. More...
 
 ~SubSystem ()
 
template<class T , typename ... Args>
T * addTrackable (Args &&...args)
 Add a Trackable to the SubSystem. More...
 
template<class T >
void removeTrackable (T *t)
 Remove a trackable from the SubSystem Deleting the actual object should be executed by the actual callback and/or controlling function. More...
 
const unordered_set< Movable * > & getMovables ()
 Get all Movable. More...
 
const unordered_set< Reactable * > & getReactables ()
 Get all Reactable. More...
 
BoundarygetBoundary ()
 Get the subsystem boundary. More...
 
void addBoundary (Boundary *boundary)
 Add a boundary to this subsystem. More...
 
void addNeighborList (NeighborList *nl)
 Add a neighbor list to the subsystem. More...
 
void resetNeighborLists ()
 Reset all neighbor lists in subsystem. More...
 
void addMovable (Movable *mov)
 Setter functions for Movable. More...
 
void removeMovable (Movable *mov)
 Setter functions for Movable. More...
 
void addReactable (Reactable *r)
 Setter function for Reactable. More...
 
void removeReactable (Reactable *r)
 Setter function for Reactable. More...
 
double getSubSystemEnergy ()
 Subsystem energy management. More...
 
void setSubSystemEnergy (double energy)
 Subsystem energy management. More...
 
double _energy = 0
 Energy of this subsystem. More...
 
Boundary_boundary
 Boundary pointer. More...
 
unordered_set< Movable * > _movables
 All movables in the subsystem. More...
 
unordered_set< Reactable * > _reactables
 All reactables in the subsystem. More...
 
Database< NeighborList * > _neighborLists
 All neighborlists in the system. More...
 
CompartmentGrid_compartmentGrid
 The compartment grid. More...
 
void setCompartmentGrid (CompartmentGrid *grid)
 CompartmentGrid management. More...
 
CompartmentGridgetCompartmentGrid ()
 Energy of this subsystem. More...
 
void updateBindingManagers ()
 Update the binding managers of the system. More...
 

Detailed Description

Manages all Movables and Reactables.

Also holds all NeighborLists associated with chemical or mechanical interactions, as well as the CompartmentGrid which contains all chemical structural information, and the system Boundary.

This is a class which handles all changes and information regarding the simulated system. This class operates as a top manager and provides connections between smaller parts of the system. All creation and changes go through this class and will be redirected to lower levels. See the databases for more documentation on the explicit creation of subsystem objects at initialization and during runtime.

This class has functions to add or remove Trackable elements from the system, as well as update Movable and Reactable instances in the system. It also can update the NeighborList container that it holds for the system.

Definition at line 57 of file SubSystem.h.

Constructor & Destructor Documentation

§ SubSystem()

SubSystem::SubSystem ( )
inline

Default constructor does nothing.

Definition at line 61 of file SubSystem.h.

§ ~SubSystem()

SubSystem::~SubSystem ( )
inline

Definition at line 61 of file SubSystem.h.

References ~SubSystem().

Referenced by ~SubSystem().

Member Function Documentation

§ addBoundary()

void SubSystem::addBoundary ( Boundary boundary)
inline

Add a boundary to this subsystem.

Definition at line 140 of file SubSystem.h.

References _boundary.

§ addMovable()

void SubSystem::addMovable ( Movable mov)
inline

Setter functions for Movable.

Definition at line 117 of file SubSystem.h.

Referenced by addTrackable(), and removeTrackable().

§ addNeighborList()

void SubSystem::addNeighborList ( NeighborList nl)
inline

Add a neighbor list to the subsystem.

Definition at line 143 of file SubSystem.h.

References _neighborLists, and Database< T >::addElement().

Referenced by MController::initializeFF().

§ addReactable()

void SubSystem::addReactable ( Reactable r)
inline

Setter function for Reactable.

Definition at line 128 of file SubSystem.h.

Referenced by addTrackable(), and removeMovable().

§ addTrackable()

§ getBoundary()

§ getCompartmentGrid()

§ getMovables()

const unordered_set<Movable*>& SubSystem::getMovables ( )
inline

Get all Movable.

Definition at line 124 of file SubSystem.h.

Referenced by removeMovable(), and Controller::updatePositions().

§ getReactables()

const unordered_set<Reactable*>& SubSystem::getReactables ( )
inline

Get all Reactable.

Definition at line 135 of file SubSystem.h.

Referenced by removeReactable(), and Controller::updatePositions().

§ getSubSystemEnergy()

double SubSystem::getSubSystemEnergy ( )
inline

Subsystem energy management.

Definition at line 154 of file SubSystem.h.

Referenced by resetNeighborLists().

§ removeMovable()

void SubSystem::removeMovable ( Movable mov)
inline

Setter functions for Movable.

Definition at line 118 of file SubSystem.h.

References _movables, _reactables, addReactable(), and getMovables().

Referenced by removeTrackable().

§ removeReactable()

void SubSystem::removeReactable ( Reactable r)
inline

Setter function for Reactable.

Definition at line 129 of file SubSystem.h.

References _reactables, and getReactables().

Referenced by removeTrackable().

§ removeTrackable()

template<class T >
void SubSystem::removeTrackable ( T *  t)
inline

Remove a trackable from the SubSystem Deleting the actual object should be executed by the actual callback and/or controlling function.

Definition at line 93 of file SubSystem.h.

References _movables, _neighborLists, addMovable(), Database< T >::getElements(), removeMovable(), and removeReactable().

Referenced by Filament::retractMinusEnd(), Filament::retractPlusEnd(), BranchingPoint::~BranchingPoint(), and Filament::~Filament().

§ resetNeighborLists()

void SubSystem::resetNeighborLists ( )
inline

Reset all neighbor lists in subsystem.

Definition at line 146 of file SubSystem.h.

References _energy, _neighborLists, Database< T >::getElements(), and getSubSystemEnergy().

Referenced by Controller::updateNeighborLists().

§ setCompartmentGrid()

void SubSystem::setCompartmentGrid ( CompartmentGrid grid)
inline

CompartmentGrid management.

Definition at line 160 of file SubSystem.h.

Referenced by setSubSystemEnergy().

§ setSubSystemEnergy()

void SubSystem::setSubSystemEnergy ( double  energy)
inline

Subsystem energy management.

Definition at line 155 of file SubSystem.h.

References _compartmentGrid, _energy, and setCompartmentGrid().

§ updateBindingManagers()

void SubSystem::updateBindingManagers ( )

Update the binding managers of the system.

Definition at line 20 of file SubSystem.cpp.

References _compartmentGrid, and CompartmentGrid::getCompartments().

Referenced by getCompartmentGrid(), Controller::run(), and Controller::updateNeighborLists().

Member Data Documentation

§ _boundary

Boundary* SubSystem::_boundary
private

Boundary pointer.

Definition at line 170 of file SubSystem.h.

Referenced by addBoundary(), and getBoundary().

§ _compartmentGrid

CompartmentGrid* SubSystem::_compartmentGrid
private

The compartment grid.

Definition at line 177 of file SubSystem.h.

Referenced by getCompartmentGrid(), setSubSystemEnergy(), and updateBindingManagers().

§ _energy

double SubSystem::_energy = 0
private

Energy of this subsystem.

Definition at line 169 of file SubSystem.h.

Referenced by resetNeighborLists(), and setSubSystemEnergy().

§ _movables

unordered_set<Movable*> SubSystem::_movables
private

All movables in the subsystem.

Definition at line 172 of file SubSystem.h.

Referenced by removeMovable(), and removeTrackable().

§ _neighborLists

Database<NeighborList*> SubSystem::_neighborLists
private

All neighborlists in the system.

Definition at line 175 of file SubSystem.h.

Referenced by addNeighborList(), addTrackable(), removeTrackable(), and resetNeighborLists().

§ _reactables

unordered_set<Reactable*> SubSystem::_reactables
private

All reactables in the subsystem.

Definition at line 173 of file SubSystem.h.

Referenced by removeMovable(), and removeReactable().


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