|
MolSim
|
Class storing metadata about a Particle disc. More...
#include <Disc.h>
Public Member Functions | |
| Disc (ParticleContainer &particles, const std::array< double, 3 > &x, int r, const std::array< double, 3 > &v, double h, double m, int type=TYPE_DEFAULT, double epsilon=EPSILON_DEFAULT, double sigma=SIGMA_DEFAULT) | |
| Constructs a new Disc object with all the needed metadata. | |
| int | getR () const |
| Gets the radius \( r \) of this disc. | |
| bool | operator== (const Disc &other) const |
| Overload of the equality operator for Cuboid objects. | |
| bool | operator!= (const Disc &other) const |
| Overload of the inequality operator for Disc objects. | |
| void | initialize (size_t dimensions=2) override |
| Main function of Disc class, initializes the particles based on the disc metadata in a grid and adds them to the given ParticleContainer. | |
| std::string | toString () |
| Returns a string representation of this Disc. | |
Public Member Functions inherited from Cluster | |
| Cluster (ParticleContainer &particles, const std::array< double, 3 > &x, const std::array< double, 3 > &v, double h, double m, int type, double epsilon, double sigma) | |
| Constructs a new Cluster. | |
| virtual | ~Cluster () |
| Destroys the current Cluster. | |
| std::array< double, 3 > & | getX () |
| Gets the position \( x \) of this Cluster. | |
| const std::array< double, 3 > & | getX () const |
| Gets the position \( x \) of this Cluster (const). | |
| double | getH () const |
| Gets the distance \( h \) between the particles of this Cluster. | |
| double | getM () const |
| Gets the mass \( m \) of the particles of this Cluster. | |
| std::array< double, 3 > & | getV () |
| Gets the starting velocity \( v \) of the particles of this Cluster. | |
| const std::array< double, 3 > & | getV () const |
| Gets the starting velocity \( v \) of the particles of this Cluster (const). | |
| double | getMeanVelocity () const |
| Gets the mean velocity for the Maxwell-Boltzmann distribution. | |
| ParticleContainer & | getParticles () |
| Gets the reference to the central ParticleContainer. | |
| const ParticleContainer & | getParticles () const |
| Gets the reference to the central ParticleContainer (const). | |
Private Member Functions | |
| std::vector< std::array< double, 3 > > | getCircleCoordinates (double centerX, double centerY, double radius, double distance) |
| Helper function to get circle point (Particle) coordinates. | |
Private Attributes | |
| int | r |
| Radius \( r \) of the disc in terms of number of particles. | |
Additional Inherited Members | |
Protected Attributes inherited from Cluster | |
| std::array< double, 3 > | x |
| Starting coordinate \( x \) of the Cluster. | |
| double | h |
| Distance \( h \) between the particles in the Cluster. | |
| double | m |
| Mass \( m \) of the particles in the Cluster. | |
| int | type |
| Type of the particles in the Cluster. | |
| double | epsilon |
| Depth \( \epsilon \) of the potential well of the particles in the Cluster. | |
| double | sigma |
| Distance \( \sigma \) where the Lennard-Jones potential reaches zero of the particles in the Cluster. | |
| std::array< double, 3 > | v |
| Starting velocity \( v \) of the particles in the Cluster (before adding Maxwell-Boltzmann perturbations). | |
| double | mean_velocity |
| Mean velocity for the Maxwell-Boltzmann distribution. | |
| ParticleContainer & | particles |
| Reference to the ParticleContainer object from the Simulation. | |
Class storing metadata about a Particle disc.
| Disc::Disc | ( | ParticleContainer & | particles, |
| const std::array< double, 3 > & | x, | ||
| int | r, | ||
| const std::array< double, 3 > & | v, | ||
| double | h, | ||
| double | m, | ||
| int | type = TYPE_DEFAULT, |
||
| double | epsilon = EPSILON_DEFAULT, |
||
| double | sigma = SIGMA_DEFAULT |
||
| ) |
Constructs a new Disc object with all the needed metadata.
| particles | A reference to the central ParticleContainer. |
| x | A reference to the array containing data for the disc position \( x \). |
| r | The radius \( r \) of the disc. |
| v | A reference to the array containing data for the starting speed \( v \) of the particles in the disc. |
| h | The distance \( h \) between the particles in the disc. |
| m | The mass \( m \) of the particles in the disc. |
| type | The type of the particle. |
| epsilon | The Lennard-Jones parameter \( \epsilon \) of the particle. |
| sigma | The Lennard-Jones parameter \( \sigma \) of the particle. |
|
private |
| int Disc::getR | ( | ) | const |
Gets the radius \( r \) of this disc.
|
overridevirtual |
Main function of Disc class, initializes the particles based on the disc metadata in a grid and adds them to the given ParticleContainer.
Implements Cluster.
| bool Disc::operator!= | ( | const Disc & | other | ) | const |
| bool Disc::operator== | ( | const Disc & | other | ) | const |
| std::string Disc::toString | ( | ) |
|
private |
Radius \( r \) of the disc in terms of number of particles.