MEDYAN  3.1
Software for simulating active matter dynamics
Controller Class Reference

Used to initialize, manage, and run an entire simulation. More...

#include <Controller.h>

Collaboration diagram for Controller:

Public Member Functions

 Controller (SubSystem *s)
 
 ~Controller ()
 
void initialize (string inputFile, string inputDirectory, string outputDirectory)
 Initialize the system, given an input and output directory. More...
 
void run ()
 Run the simulation. More...
 

Private Member Functions

void setupInitialNetwork (SystemParser &p)
 INITIALIZATION HELPER FUNCTIONS. More...
 
void setupSpecialStructures (SystemParser &p)
 Setup any special structures needed. More...
 
void moveBoundary (double deltaTau)
 RUNTIME HELPER FUNCTIONS. More...
 
void updatePositions ()
 Update the positions of all elements in the system. More...
 
void updateNeighborLists ()
 Update neighbors lists, called in run. More...
 
void executeSpecialProtocols ()
 Execute any special protocols needed, for example, making Linker and Filament species static. More...
 
void pinBoundaryFilaments ()
 Helper function to pin filaments near the boundary. More...
 

Private Attributes

SubSystem_subSystem
 A pointer to the subsystem that this controls. More...
 
MController_mController
 Chemical controller used. More...
 
CController_cController
 Mechanical controller used. More...
 
GController_gController
 Geometry controller used. More...
 
DRController_drController
 Dynamic rate controller used. More...
 
string _inputDirectory
 Input directory being used. More...
 
string _outputDirectory
 Output directory being used. More...
 
vector< Output * > _outputs
 Vector of specified outputs. More...
 
double _runTime
 Total desired runtime for simulation. More...
 
double _snapshotTime
 Desired time for each snapshot. More...
 
double _minimizationTime
 Frequency of mechanical minimization. More...
 
double _neighborListTime
 Frequency of neighbor list updates. More...
 
double _runSteps
 Same parameter set as timestep, but in terms of chemical reaction steps. More...
 
double _snapshotSteps
 Same parameter set as timestep, but in terms of chemical reaction steps. More...
 
double _minimizationSteps
 Same parameter set as timestep, but in terms of chemical reaction steps. More...
 
double _neighborListSteps
 Same parameter set as timestep, but in terms of chemical reaction steps. More...
 
ChemistryData _chemData
 Same parameter set as timestep, but in terms of chemical reaction steps. More...
 
ChemistryAlgorithm _cAlgorithm
 Same parameter set as timestep, but in terms of chemical reaction steps. More...
 
vector< tuple< short, vector< double >, vector< double > > > fil
 Same parameter set as timestep, but in terms of chemical reaction steps. More...
 
tuple< vector< tuple< short, vector< double >, vector< double > > >, vector< tuple< string, short, vector< vector< double > > > >, vector< tuple< string, short, vector< double > > >, vector< vector< double > > > filaments
 Same parameter set as timestep, but in terms of chemical reaction steps. More...
 

Detailed Description

Used to initialize, manage, and run an entire simulation.

The Controller is initialized in the main program, and initializes the SubSystem given an initial input directory. After initialization of all member controllers, the Controller class can run a simulation given the already read input parameters, by iteratively switching between mechanical equilibration and stochastic chemical steps. The Controller is also responsible for updating positions, reaction rates, and neighbors lists through its corresponding sub-controllers and the Subsystem.

Definition at line 40 of file Controller.h.

Constructor & Destructor Documentation

§ Controller()

Controller::Controller ( SubSystem s)

§ ~Controller()

Controller::~Controller ( )
inline

Definition at line 113 of file Controller.h.

References initialize(), and run().

Member Function Documentation

§ executeSpecialProtocols()

void Controller::executeSpecialProtocols ( )
private

Execute any special protocols needed, for example, making Linker and Filament species static.

Definition at line 395 of file Controller.cpp.

References SysParams::Chemistry(), Cylinder::getCylinders(), Linker::getLinkers(), SysParams::Mechanics(), pinBoundaryFilaments(), and tau().

Referenced by run().

§ initialize()

§ moveBoundary()

void Controller::moveBoundary ( double  deltaTau)
private

§ pinBoundaryFilaments()

§ run()

§ setupInitialNetwork()

§ setupSpecialStructures()

§ updateNeighborLists()

void Controller::updateNeighborLists ( )
private

Update neighbors lists, called in run.

Definition at line 439 of file Controller.cpp.

References _subSystem, SubSystem::resetNeighborLists(), and SubSystem::updateBindingManagers().

Referenced by run().

§ updatePositions()

void Controller::updatePositions ( )
private

Update the positions of all elements in the system.

Definition at line 423 of file Controller.cpp.

References _subSystem, Cylinder::getCylinders(), SubSystem::getMovables(), and SubSystem::getReactables().

Referenced by run().

Member Data Documentation

§ _cAlgorithm

ChemistryAlgorithm Controller::_cAlgorithm
private

Same parameter set as timestep, but in terms of chemical reaction steps.

Useful for small runs and debugging.

Definition at line 71 of file Controller.h.

Referenced by initialize().

§ _cController

CController* Controller::_cController
private

Mechanical controller used.

Definition at line 46 of file Controller.h.

Referenced by Controller(), initialize(), moveBoundary(), and run().

§ _chemData

ChemistryData Controller::_chemData
private

Same parameter set as timestep, but in terms of chemical reaction steps.

Useful for small runs and debugging.

Definition at line 70 of file Controller.h.

Referenced by initialize(), and run().

§ _drController

DRController* Controller::_drController
private

Dynamic rate controller used.

Definition at line 48 of file Controller.h.

Referenced by Controller(), and initialize().

§ _gController

GController* Controller::_gController
private

Geometry controller used.

Definition at line 47 of file Controller.h.

Referenced by Controller(), and initialize().

§ _inputDirectory

string Controller::_inputDirectory
private

Input directory being used.

Definition at line 50 of file Controller.h.

Referenced by initialize(), and setupInitialNetwork().

§ _mController

MController* Controller::_mController
private

Chemical controller used.

Definition at line 45 of file Controller.h.

Referenced by Controller(), initialize(), and run().

§ _minimizationSteps

double Controller::_minimizationSteps
private

Same parameter set as timestep, but in terms of chemical reaction steps.

Useful for small runs and debugging.

Definition at line 68 of file Controller.h.

Referenced by initialize(), and run().

§ _minimizationTime

double Controller::_minimizationTime
private

Frequency of mechanical minimization.

Definition at line 59 of file Controller.h.

Referenced by initialize(), and run().

§ _neighborListSteps

double Controller::_neighborListSteps
private

Same parameter set as timestep, but in terms of chemical reaction steps.

Useful for small runs and debugging.

Definition at line 69 of file Controller.h.

Referenced by initialize(), and run().

§ _neighborListTime

double Controller::_neighborListTime
private

Frequency of neighbor list updates.

Definition at line 60 of file Controller.h.

Referenced by initialize(), and run().

§ _outputDirectory

string Controller::_outputDirectory
private

Output directory being used.

Definition at line 51 of file Controller.h.

Referenced by initialize().

§ _outputs

vector<Output*> Controller::_outputs
private

Vector of specified outputs.

Definition at line 53 of file Controller.h.

Referenced by initialize(), and run().

§ _runSteps

double Controller::_runSteps
private

Same parameter set as timestep, but in terms of chemical reaction steps.

Useful for small runs and debugging.

Definition at line 65 of file Controller.h.

Referenced by initialize(), and run().

§ _runTime

double Controller::_runTime
private

Total desired runtime for simulation.

Definition at line 55 of file Controller.h.

Referenced by initialize(), and run().

§ _snapshotSteps

double Controller::_snapshotSteps
private

Same parameter set as timestep, but in terms of chemical reaction steps.

Useful for small runs and debugging.

Definition at line 66 of file Controller.h.

Referenced by initialize(), and run().

§ _snapshotTime

double Controller::_snapshotTime
private

Desired time for each snapshot.

Definition at line 57 of file Controller.h.

Referenced by initialize(), and run().

§ _subSystem

SubSystem* Controller::_subSystem
private

A pointer to the subsystem that this controls.

Definition at line 43 of file Controller.h.

Referenced by Controller(), initialize(), moveBoundary(), pinBoundaryFilaments(), run(), setupInitialNetwork(), setupSpecialStructures(), updateNeighborLists(), and updatePositions().

§ fil

vector<tuple<short, vector<double>, vector<double> > > Controller::fil
private

Same parameter set as timestep, but in terms of chemical reaction steps.

Useful for small runs and debugging.

Definition at line 72 of file Controller.h.

Referenced by setupInitialNetwork(), and setupSpecialStructures().

§ filaments

tuple< vector<tuple<short, vector<double>, vector<double> > > , vector<tuple<string, short, vector<vector<double> > > > , vector<tuple<string, short, vector<double> > > , vector<vector<double> > > Controller::filaments
private

Same parameter set as timestep, but in terms of chemical reaction steps.

Useful for small runs and debugging.

Definition at line 73 of file Controller.h.

Referenced by run(), setupInitialNetwork(), and setupSpecialStructures().


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