Class modeling and analyzer that computes statistics about the state of a nano-scale flow simulation.
More...
#include <FlowSimulationAnalyzer.h>
|
| | FlowSimulationAnalyzer (ParticleContainer &particles) |
| | Constructs an uninitialized FlowSimulationAnalyzer.
|
| |
| | FlowSimulationAnalyzer (ParticleContainer &particles, int binNumber, double leftWallPosX, double rightWallPosX, int n_analyzer, const std::string &dirname="statistics", const std::string &basename="MD_csv") |
| | Creates and initializes a FlowSimulationAnalyzer.
|
| |
| void | initialize (int binNumber, double leftWallPosX, double rightWallPosX, int n_analyzer, const std::string &dirname="statistics", const std::string &basename="MD_csv") |
| | Initializes the current object with the given parameters.
|
| |
| void | calculateDensitiesAndVelocities () |
| | Computes the densities and average velocities of the particles resided in each bin.
|
| |
| void | analyzeFlow (int currentStep) |
| | The main function that analyzes the simulation.
|
| |
| int | writeToCSV (int fileNumber) |
| | Writes the gathered information from the density and velocity vectors into the corresponding .csv file as statistics based on the simulation's state.
|
| |
| int | getBinNumber () const |
| | Gets the bin number of the analyzer.
|
| |
| double | getLeftWallPosX () const |
| | Gets the X coordinate of the left wall of the simulation.
|
| |
| double | getRightWallPosX () const |
| | Gets the X coordinate of the right wall of the simulation.
|
| |
| double | getBinSize () const |
| | Gets the size of the bins used in the computation of statistics.
|
| |
| int | getFrequency () const |
| | Gets the output frequency.
|
| |
| const std::string & | getDirname () const |
| | Gets the name of the output directory.
|
| |
| ParticleContainer & | getParticles () const |
| | Gets a reference to the analyzed ParticleContainer.
|
| |
| const std::vector< double > & | getDensities () const |
| | Gets the vector containing the number of particles in each bin (const).
|
| |
| const std::vector< double > & | getVelocities () const |
| | Gets the vector containing the the average velocities of the particles from each bin (const).
|
| |
|
| ParticleContainer & | particles |
| | A reference to the Particle system.
|
| |
| int | binNumber |
| | The number of bins analyzed.
|
| |
| double | leftWallPosX |
| | The X coordinate of the left wall of the simulation.
|
| |
| double | rightWallPosX |
| | The X coordinate of the right wall of the simulation.
|
| |
| double | binSize |
| | The size of each bin analyzed.
|
| |
| std::vector< double > | densities |
| | The vector corresponding to the number of particles in each bin.
|
| |
| std::vector< double > | velocities |
| | The vector corresponding to the average velocity on the y axis of the particles resided in this bin.
|
| |
| int | n_analyzer {1000} |
| | The number of simulation iterations after which to apply the Analyzer functionality (default: 1000).
|
| |
| std::string | dirname {"statistics"} |
| | The name of the directory containing the generated .csv files (default: "statistics").
|
| |
| std::string | basename {"MD_csv"} |
| | The base name of the generated .csv files (default: "MD_csv").
|
| |
Class modeling and analyzer that computes statistics about the state of a nano-scale flow simulation.
◆ FlowSimulationAnalyzer() [1/2]
◆ FlowSimulationAnalyzer() [2/2]
| FlowSimulationAnalyzer::FlowSimulationAnalyzer |
( |
ParticleContainer & |
particles, |
|
|
int |
binNumber, |
|
|
double |
leftWallPosX, |
|
|
double |
rightWallPosX, |
|
|
int |
n_analyzer, |
|
|
const std::string & |
dirname = "statistics", |
|
|
const std::string & |
basename = "MD_csv" |
|
) |
| |
Creates and initializes a FlowSimulationAnalyzer.
- Parameters
-
| particles | A reference to the Particle system. |
| binNumber | The number of bins analyzed. |
| leftWallPosX | The X coordinate of the left wall of the simulation. |
| rightWallPosX | The X coordinate of the right wall of the simulation. |
| n_analyzer | The number of simulation iterations after which to apply the analyzer functionality. |
| dirname | The name of the directory containing the generated .csv files. |
| basename | The base name of the generated .csv files. |
◆ analyzeFlow()
| void FlowSimulationAnalyzer::analyzeFlow |
( |
int |
currentStep | ) |
|
The main function that analyzes the simulation.
- Parameters
-
| currentStep | The current iteration of the simulation, determines whether the Analyzer is applied or not. |
◆ calculateDensitiesAndVelocities()
| void FlowSimulationAnalyzer::calculateDensitiesAndVelocities |
( |
| ) |
|
Computes the densities and average velocities of the particles resided in each bin.
The function iterates over each bin and looks at each particle in order to modify the density and velocity vectors accordingly.
◆ getBinNumber()
| int FlowSimulationAnalyzer::getBinNumber |
( |
| ) |
const |
Gets the bin number of the analyzer.
- Returns
- The bin number of the analyzer.
◆ getBinSize()
| double FlowSimulationAnalyzer::getBinSize |
( |
| ) |
const |
Gets the size of the bins used in the computation of statistics.
- Returns
- The size of the bins used in the computation of statistics.
◆ getDensities()
| const std::vector< double > & FlowSimulationAnalyzer::getDensities |
( |
| ) |
const |
Gets the vector containing the number of particles in each bin (const).
- Returns
- The const vector containing the number of particles in each bin.
◆ getDirname()
| const std::string & FlowSimulationAnalyzer::getDirname |
( |
| ) |
const |
Gets the name of the output directory.
- Returns
- The name of the output directory.
◆ getFrequency()
| int FlowSimulationAnalyzer::getFrequency |
( |
| ) |
const |
Gets the output frequency.
- Returns
- The output frequency.
◆ getLeftWallPosX()
| double FlowSimulationAnalyzer::getLeftWallPosX |
( |
| ) |
const |
Gets the X coordinate of the left wall of the simulation.
- Returns
- The X coordinate of the left wall of the simulation.
◆ getParticles()
◆ getRightWallPosX()
| double FlowSimulationAnalyzer::getRightWallPosX |
( |
| ) |
const |
Gets the X coordinate of the right wall of the simulation.
- Returns
- The X coordinate of the right wall of the simulation.
◆ getVelocities()
| const std::vector< double > & FlowSimulationAnalyzer::getVelocities |
( |
| ) |
const |
Gets the vector containing the the average velocities of the particles from each bin (const).
- Returns
- The const vector containing the the average velocities of the particles from each bin.
◆ initialize()
| void FlowSimulationAnalyzer::initialize |
( |
int |
binNumber, |
|
|
double |
leftWallPosX, |
|
|
double |
rightWallPosX, |
|
|
int |
n_analyzer, |
|
|
const std::string & |
dirname = "statistics", |
|
|
const std::string & |
basename = "MD_csv" |
|
) |
| |
Initializes the current object with the given parameters.
- Parameters
-
| binNumber | The number of bins analyzed. |
| leftWallPosX | The X coordinate of the left wall of the simulation. |
| rightWallPosX | The X coordinate of the right wall of the simulation. |
| n_analyzer | The number of simulation iterations after which to apply the analyzer functionality. |
| dirname | The name of the directory containing the generated .csv files. |
| basename | The base name of the generated .csv files. |
◆ writeToCSV()
| int FlowSimulationAnalyzer::writeToCSV |
( |
int |
fileNumber | ) |
|
Writes the gathered information from the density and velocity vectors into the corresponding .csv file as statistics based on the simulation's state.
- Parameters
-
| fileNumber | The iteration number to be appended to the filename. |
- Returns
EXIT_SUCCESS if the file was successfully written, EXIT_FAILURE otherwise.
◆ basename
| std::string FlowSimulationAnalyzer::basename {"MD_csv"} |
|
private |
The base name of the generated .csv files (default: "MD_csv").
During initialization using an XML input, if the substring "vtk" or "xyz" is found in the base name of the output files, it will automatically be replaced with "csv" and used as the base name for the .csv files.
◆ binNumber
| int FlowSimulationAnalyzer::binNumber |
|
private |
The number of bins analyzed.
◆ binSize
| double FlowSimulationAnalyzer::binSize |
|
private |
The size of each bin analyzed.
◆ densities
| std::vector<double> FlowSimulationAnalyzer::densities |
|
private |
The vector corresponding to the number of particles in each bin.
◆ dirname
| std::string FlowSimulationAnalyzer::dirname {"statistics"} |
|
private |
The name of the directory containing the generated .csv files (default: "statistics").
◆ leftWallPosX
| double FlowSimulationAnalyzer::leftWallPosX |
|
private |
The X coordinate of the left wall of the simulation.
◆ n_analyzer
| int FlowSimulationAnalyzer::n_analyzer {1000} |
|
private |
The number of simulation iterations after which to apply the Analyzer functionality (default: 1000).
◆ particles
◆ rightWallPosX
| double FlowSimulationAnalyzer::rightWallPosX |
|
private |
The X coordinate of the right wall of the simulation.
◆ velocities
| std::vector<double> FlowSimulationAnalyzer::velocities |
|
private |
The vector corresponding to the average velocity on the y axis of the particles resided in this bin.
The documentation for this class was generated from the following file: