MolSim
Loading...
Searching...
No Matches
Cluster.h
Go to the documentation of this file.
1
9#pragma once
10#include "ParticleContainer.h"
11#include <array>
12
14class Cluster {
15 protected:
23 std::array<double, 3> x;
24
26 double h;
27
29 double m;
30
32 int type;
33
35 double epsilon;
36
38 double sigma;
39
42 std::array<double, 3> v;
43
46
49
50 public:
64 Cluster(ParticleContainer &particles, const std::array<double, 3> &x, const std::array<double, 3> &v, double h,
65 double m, int type, double epsilon, double sigma);
66
68 virtual ~Cluster();
69
75 std::array<double, 3> &getX();
76
82 const std::array<double, 3> &getX() const;
83
89 double getH() const;
90
96 double getM() const;
97
103 std::array<double, 3> &getV();
104
110 const std::array<double, 3> &getV() const;
111
117 double getMeanVelocity() const;
118
125
132
138 virtual void initialize(size_t dimensions = 2) = 0;
139};
Class for encapsulating and iterating over multiple Particle objects.
Abstract class which models common information about Particle objects arranged in some cluster.
Definition Cluster.h:14
double getH() const
Gets the distance between the particles of this Cluster.
const std::array< double, 3 > & getX() const
Gets the position of this Cluster (const).
std::array< double, 3 > v
Starting velocity of the particles in the Cluster (before adding Maxwell-Boltzmann perturbations).
Definition Cluster.h:42
ParticleContainer & particles
Reference to the ParticleContainer object from the Simulation.
Definition Cluster.h:48
double getMeanVelocity() const
Gets the mean velocity for the Maxwell-Boltzmann distribution.
int type
Type of the particles in the Cluster.
Definition Cluster.h:32
const ParticleContainer & getParticles() const
Gets the reference to the central ParticleContainer (const).
double getM() const
Gets the mass of the particles of this Cluster.
double mean_velocity
Mean velocity for the Maxwell-Boltzmann distribution.
Definition Cluster.h:45
virtual void initialize(size_t dimensions=2)=0
Initializes the Particle objects in the Cluster.
const std::array< double, 3 > & getV() const
Gets the starting velocity of the particles of this Cluster (const).
double m
Mass of the particles in the Cluster.
Definition Cluster.h:29
std::array< double, 3 > & getX()
Gets the position of this Cluster.
std::array< double, 3 > x
Starting coordinate of the Cluster.
Definition Cluster.h:23
std::array< double, 3 > & getV()
Gets the starting velocity of the particles of this Cluster.
double h
Distance between the particles in the Cluster.
Definition Cluster.h:26
virtual ~Cluster()
Destroys the current 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.
double sigma
Distance where the Lennard-Jones potential reaches zero of the particles in the Cluster.
Definition Cluster.h:38
ParticleContainer & getParticles()
Gets the reference to the central ParticleContainer.
double epsilon
Depth of the potential well of the particles in the Cluster.
Definition Cluster.h:35
Class for encapsulating multiple Particle objects..
Definition ParticleContainer.h:17
Enumeration class corresponding to the type schema type.
Definition vtk-unstructured.h:2125