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

Class defining a time-integration simulation. More...

#include <Simulation.h>

Inheritance diagram for Simulation:
SimulationLC

Public Member Functions

 Simulation (ParticleContainer &pc, Arguments &args, Thermostat &t, FlowSimulationAnalyzer &analyzer)
 Constructs a new Simulation.
 
virtual ~Simulation ()
 Destroys the current Simulation object.
 
virtual void runSimulation ()
 Main function for running the simulation.
 
ParticleContainergetParticles ()
 Gets a reference to the ParticleContainer storing the simulation's particles.
 

Protected Member Functions

void initializeBase ()
 Base function for initializing Simulation parameters.
 
void runSimulationLoop (CellContainer *lc=nullptr)
 Runs a basic simulation loop.
 

Protected Attributes

ParticleContainerm_particles
 Reference to the ParticleContainer containing the particles used in the simulation.
 
Argumentsm_args
 Reference to the Arguments struct containing simulation parameters.
 
Thermostatm_thermostat
 Reference to the Thermostat, for temperature regulation.
 
FlowSimulationAnalyzerm_analyzer
 Reference to the FlowSimulationAnalyzer, for statistics computation.
 
int m_totalIt
 The total number of iterations for which the simulation will run.
 
std::unique_ptr< FileWriterm_writer
 A pointer to the FileWriter object used for writing file output.
 
TimeIntegrationFuncs::VFunc m_calculateV
 Function for calculating the Particle velocities.
 
TimeIntegrationFuncs::XFunc m_calculateX
 Function for calculating the Particle positions.
 
StrategyFactory::FFunc m_calculateF
 Function for calculating the force effective on each Particle.
 
Timer m_timer
 Timer used to measure simulation runtime and log molecule updates per second (MUPS).
 

Detailed Description

Class defining a time-integration simulation.

Constructor & Destructor Documentation

◆ Simulation()

Simulation::Simulation ( ParticleContainer pc,
Arguments args,
Thermostat t,
FlowSimulationAnalyzer analyzer 
)

Constructs a new Simulation.

Parameters
pcThe ParticleContainer containing the simulation molecules.
argsThe Arguments struct containing the simulation metadata.
tThe Thermostat used for temperature regulation.
analyzerThe Anlayzer used for statistics computation.

◆ ~Simulation()

virtual Simulation::~Simulation ( )
virtual

Destroys the current Simulation object.

Member Function Documentation

◆ getParticles()

ParticleContainer & Simulation::getParticles ( )

Gets a reference to the ParticleContainer storing the simulation's particles.

Returns
A reference to the simulation's ParticleContainer.

◆ initializeBase()

void Simulation::initializeBase ( )
protected

Base function for initializing Simulation parameters.

◆ runSimulation()

virtual void Simulation::runSimulation ( )
virtual

Main function for running the simulation.

Reimplemented in SimulationLC.

◆ runSimulationLoop()

void Simulation::runSimulationLoop ( CellContainer lc = nullptr)
protected

Runs a basic simulation loop.

The particle container must not be empty.

Parameters
lcAn optional parameter for linked cell algorithms.

Member Data Documentation

◆ m_analyzer

FlowSimulationAnalyzer& Simulation::m_analyzer
protected

Reference to the FlowSimulationAnalyzer, for statistics computation.

◆ m_args

Arguments& Simulation::m_args
protected

Reference to the Arguments struct containing simulation parameters.

◆ m_calculateF

StrategyFactory::FFunc Simulation::m_calculateF
protected

Function for calculating the force effective on each Particle.

◆ m_calculateV

TimeIntegrationFuncs::VFunc Simulation::m_calculateV
protected

Function for calculating the Particle velocities.

◆ m_calculateX

TimeIntegrationFuncs::XFunc Simulation::m_calculateX
protected

Function for calculating the Particle positions.

◆ m_particles

ParticleContainer& Simulation::m_particles
protected

Reference to the ParticleContainer containing the particles used in the simulation.

◆ m_thermostat

Thermostat& Simulation::m_thermostat
protected

Reference to the Thermostat, for temperature regulation.

◆ m_timer

Timer Simulation::m_timer
protected

Timer used to measure simulation runtime and log molecule updates per second (MUPS).

◆ m_totalIt

int Simulation::m_totalIt
protected

The total number of iterations for which the simulation will run.

◆ m_writer

std::unique_ptr<FileWriter> Simulation::m_writer
protected

A pointer to the FileWriter object used for writing file output.


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