|
Continuum Membrane 719025a62b1e384a6ff80e2f2a223ef4012153dc
|
Bookkeeps simulation data throughout iterations. More...
#include <Record.hpp>
Public Member Functions | |
| Record () | |
| Constructor for Record class. | |
| Record (const int numIterations) | |
| Constructor for Record class that pre-allocates memory for the data vectors. | |
| void | add (const double currentArea, const Energy ¤tEnergy, const double currentMeanForce) |
| Adds a new record to the data vectors. | |
| void | set (const int iteration, const double currentArea, const Energy ¤tEnergy, const double currentMeanForce) |
| Sets the values for a specific record in the data vectors. | |
| void | print_iteration (const int iteration) |
| Prints information about a single iteration of the optimization algorithm. | |
Public Attributes | |
| std::vector< double > | areaTotal |
| Vector of total surface area values. | |
| std::vector< Energy > | energyVec |
| Vector of energy values. | |
| std::vector< double > | meanForce |
| Vector of mean force values. | |
Bookkeeps simulation data throughout iterations.
This class stores vectors of surface area, energy, and mean force values for each iteration of a simulation.
| Record::Record | ( | ) |
Constructor for Record class.
| Record::Record | ( | const int | numIterations | ) |
Constructor for Record class that pre-allocates memory for the data vectors.
| numIterations | The number of iterations to allocate memory for. |
| void Record::add | ( | const double | currentArea, |
| const Energy & | currentEnergy, | ||
| const double | currentMeanForce | ||
| ) |
Adds a new record to the data vectors.
This function adds a new record to each of the areaTotal, energyVec, and meanForce vectors. The values added correspond to the current area, energy, and mean force, respectively.
| currentArea | The current surface area of the mesh. |
| currentEnergy | The current energy of the mesh. |
| currentMeanForce | The current mean force on the mesh vertices. |
| void Record::print_iteration | ( | const int | iteration | ) |
Prints information about a single iteration of the optimization algorithm.
This function prints information about a single iteration of the optimization algorithm, including the current step number (iteration), the total energy of the mesh at that step (energyVec[iteration].energyTotal), the mean force on the mesh vertices at that step (meanForce[iteration]), and the surface area of the mesh at that step (areaTotal[iteration]).
The output is sent to standard output (i.e., to the terminal).
| iteration | The step number of the iteration to print information about. |
| void Record::set | ( | const int | iteration, |
| const double | currentArea, | ||
| const Energy & | currentEnergy, | ||
| const double | currentMeanForce | ||
| ) |
Sets the values for a specific record in the data vectors.
This function sets the values for a specific record in each of the areaTotal, energyVec, and meanForce vectors. The index of the record to set is given by the iteration parameter, and the values to set are given by the currentArea, currentEnergy, and currentMeanForce parameters.
| iteration | The index of the record to set. |
| currentArea | The surface area for the record. |
| currentEnergy | The energy for the record. |
| currentMeanForce | The mean force for the record. |
| std::vector<double> Record::areaTotal |
Vector of total surface area values.
| std::vector<Energy> Record::energyVec |
Vector of energy values.
| std::vector<double> Record::meanForce |
Vector of mean force values.