MolSim
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Cluster Class Referenceabstract

Abstract class which models common information about Particle objects arranged in some cluster. More...

#include <Cluster.h>

Inheritance diagram for Cluster:
Cuboid Disc

Public Member Functions

 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.
 
ParticleContainergetParticles ()
 Gets the reference to the central ParticleContainer.
 
const ParticleContainergetParticles () const
 Gets the reference to the central ParticleContainer (const).
 
virtual void initialize (size_t dimensions=2)=0
 Initializes the Particle objects in the Cluster.
 

Protected Attributes

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.
 
ParticleContainerparticles
 Reference to the ParticleContainer object from the Simulation.
 

Detailed Description

Abstract class which models common information about Particle objects arranged in some cluster.

Constructor & Destructor Documentation

◆ Cluster()

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.

Parameters
particlesA reference to the central ParticleContainer.
xA reference to the array containing data for the cluster position \( x \).
vA reference to the array containing data for the starting speed \( v \) of the particles in the cluster.
hThe distance \( h \) between the particles in the cluster.
mThe mass \( m \) of the particles in the cluster.
typeThe type of the particle.
epsilonThe Lennard-Jones parameter \( \epsilon \) of the particle.
sigmaThe Lennard-Jones parameter \( \sigma \) of the particle.

◆ ~Cluster()

virtual Cluster::~Cluster ( )
virtual

Destroys the current Cluster.

Member Function Documentation

◆ getH()

double Cluster::getH ( ) const

Gets the distance \( h \) between the particles of this Cluster.

Returns
The distance between the particles of the Cluster.

◆ getM()

double Cluster::getM ( ) const

Gets the mass \( m \) of the particles of this Cluster.

Returns
The mass of the particles of the Cluster.

◆ getMeanVelocity()

double Cluster::getMeanVelocity ( ) const

Gets the mean velocity for the Maxwell-Boltzmann distribution.

Returns
The mean velocity field of the Cluster.

◆ getParticles() [1/2]

ParticleContainer & Cluster::getParticles ( )

Gets the reference to the central ParticleContainer.

Returns
A reference to the ParticleContainer stored in this container.

◆ getParticles() [2/2]

const ParticleContainer & Cluster::getParticles ( ) const

Gets the reference to the central ParticleContainer (const).

Returns
A const reference to the ParticleContainer stored in this container.

◆ getV() [1/2]

std::array< double, 3 > & Cluster::getV ( )

Gets the starting velocity \( v \) of the particles of this Cluster.

Returns
A reference to the velocity array of the Cluster.

◆ getV() [2/2]

const std::array< double, 3 > & Cluster::getV ( ) const

Gets the starting velocity \( v \) of the particles of this Cluster (const).

Returns
A const reference to the velocity array of the Cluster.

◆ getX() [1/2]

std::array< double, 3 > & Cluster::getX ( )

Gets the position \( x \) of this Cluster.

Returns
A reference to the position array of this Cluster.

◆ getX() [2/2]

const std::array< double, 3 > & Cluster::getX ( ) const

Gets the position \( x \) of this Cluster (const).

Returns
A const reference to the position array of this Cluster.

◆ initialize()

virtual void Cluster::initialize ( size_t  dimensions = 2)
pure virtual

Initializes the Particle objects in the Cluster.

Parameters
dimensionsThe number of dimensions for which to initialize the particles (default: 2).

Implemented in Cuboid, and Disc.

Member Data Documentation

◆ epsilon

double Cluster::epsilon
protected

Depth \( \epsilon \) of the potential well of the particles in the Cluster.

◆ h

double Cluster::h
protected

Distance \( h \) between the particles in the Cluster.

◆ m

double Cluster::m
protected

Mass \( m \) of the particles in the Cluster.

◆ mean_velocity

double Cluster::mean_velocity
protected

Mean velocity for the Maxwell-Boltzmann distribution.

◆ particles

ParticleContainer& Cluster::particles
protected

Reference to the ParticleContainer object from the Simulation.

◆ sigma

double Cluster::sigma
protected

Distance \( \sigma \) where the Lennard-Jones potential reaches zero of the particles in the Cluster.

◆ type

int Cluster::type
protected

Type of the particles in the Cluster.

◆ v

std::array<double, 3> Cluster::v
protected

Starting velocity \( v \) of the particles in the Cluster (before adding Maxwell-Boltzmann perturbations).

◆ x

std::array<double, 3> Cluster::x
protected

Starting coordinate \( x \) of the Cluster.

For Disc objects, it is the center of the disc. For Cuboid objects, it is the lower left corner of the cuboid.


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