MEDYAN  3.1
Software for simulating active matter dynamics
Bubble.h
Go to the documentation of this file.
1 
2 //------------------------------------------------------------------
3 // **MEDYAN** - Simulation Package for the Mechanochemical
4 // Dynamics of Active Networks, v3.1
5 //
6 // Copyright (2015-2016) Papoian Lab, University of Maryland
7 //
8 // ALL RIGHTS RESERVED
9 //
10 // See the MEDYAN web page for more information:
11 // http://www.medyan.org
12 //------------------------------------------------------------------
13 
14 #ifndef MEDYAN_Bubble_h
15 #define MEDYAN_Bubble_h
16 
17 #include "common.h"
18 
19 #include "Database.h"
20 #include "Trackable.h"
21 #include "Movable.h"
22 #include "DynamicNeighbor.h"
23 #include "Composite.h"
24 
25 //FORWARD DECLARATIONS
26 class SubSystem;
27 class Bead;
28 
31 
39 class Bubble : public Composite, public Trackable, public Movable, public DynamicNeighbor {
40 
41 private:
44 
45  short _type;
46 
47  double _radius;
48  double _kRepuls;
49  double _screenLength;
50 
51  int _ID;
52 
54 
55  bool _isMTOC = false;
56 
57 public:
58  vector<double> coordinate;
59 
62  Bubble(SubSystem* ps, vector<double> coordinates, short type);
63 
65  double getRadius() {return _radius;}
67  double getRepulsionConst() {return _kRepuls;}
68  double getScreeningLength() {return _screenLength;}
69 
70  Bead* getBead() {return _bead;}
71 
72  int getID() {return _ID;}
73  virtual int getType() {return _type;}
75 
76  void setAsMTOC() {_isMTOC = true;}
77  bool isMTOC() {return _isMTOC;}
78 
80  virtual void printSelf();
81 
83  virtual void addToSubSystem() { _bubbles.addElement(this);}
85  virtual void removeFromSubSystem() {_bubbles.removeElement(this);}
87 
89  static const vector<Bubble*>& getBubbles() {
90  return _bubbles.getElements();
91  }
93  static int numBubbles() {
94  return _bubbles.countElements();
95  }
96 
98  virtual void updatePosition();
99 
100 };
101 
102 #endif
Bubble(SubSystem *ps, vector< double > coordinates, short type)
Main constructor, sets up bead and other properties.
Definition: Bubble.cpp:21
vector< T > & getElements()
Get all items in database.
Definition: Database.h:69
Bead * _bead
The bead representing the center of the bubble.
Definition: Bubble.h:42
double getScreeningLength()
Getters.
Definition: Bubble.h:68
short _type
The type of bubble.
Definition: Bubble.h:45
Bead * getBead()
Getters.
Definition: Bubble.h:70
An abstract base class for a movable element in the SubSystem.
Definition: Movable.h:25
A collection class to hold instances of a given class.
Definition: Database.h:38
An abstract base class for a trackable object in the SubSystem.
Definition: Trackable.h:33
virtual void printSelf()
Print bubble information.
Definition: Bubble.cpp:40
virtual void updatePosition()
Update bubble position.
Definition: Bubble.cpp:35
bool isMTOC()
Definition: Bubble.h:77
double getRadius()
Getters.
Definition: Bubble.h:66
double _kRepuls
Repulsion constant for bubble-bubble and bubble-cylinder interactions.
Definition: Bubble.h:48
double _screenLength
Screening length for a repulsive potential.
Definition: Bubble.h:49
int _ID
Identifier.
Definition: Bubble.h:51
vector< double > coordinate
Current coordinates of bubble, Updated with updatePosition()
Definition: Bubble.h:58
double _radius
The radius of this bubble.
Definition: Bubble.h:47
Represents a dummy point potential that is involved in mechanical equilibration.
Definition: Bubble.h:39
void removeElement(T elem)
Remove an element from the collection.
Definition: Database.h:58
The aggregating class for the Composite pattern.
Definition: Composite.h:42
bool _isMTOC
If representing a MTOC.
Definition: Bubble.h:55
virtual void removeFromSubSystem()
SubSystem management, inherited from Trackable.
Definition: Bubble.h:85
static int numBubbles()
Get the number of cylinders in this system.
Definition: Bubble.h:93
static Database< Bubble * > _bubbles
Collection in SubSystem.
Definition: Bubble.h:53
static const vector< Bubble * > & getBubbles()
Get all instances of this class from the SubSystem.
Definition: Bubble.h:89
int countElements()
Count the number of objects in the collection.
Definition: Database.h:72
virtual void addToSubSystem()
SubSystem management, inherited from Trackable.
Definition: Bubble.h:84
SubSystem * _ps
The subsystem this bubble is in.
Definition: Bubble.h:43
void addElement(T elem)
Add an element to the collection.
Definition: Database.h:52
int getID()
Getters.
Definition: Bubble.h:72
double getRepulsionConst()
Getters.
Definition: Bubble.h:67
Manages all Movables and Reactables.
Definition: SubSystem.h:57
virtual int getType()
Getters.
Definition: Bubble.h:73
An abstract base class for any element that can be added or removed from a NeighborList dynamically a...
Represents a single coordinate between Cylinders, and holds forces needed for mechanical equilibratio...
Definition: Bead.h:49
void setAsMTOC()
Definition: Bubble.h:76