Continuum Membrane 719025a62b1e384a6ff80e2f2a223ef4012153dc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Record Class Reference

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 &currentEnergy, const double currentMeanForce)
 Adds a new record to the data vectors.
 
void set (const int iteration, const double currentArea, const Energy &currentEnergy, 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< EnergyenergyVec
 Vector of energy values.
 
std::vector< double > meanForce
 Vector of mean force values.
 

Detailed Description

Bookkeeps simulation data throughout iterations.

This class stores vectors of surface area, energy, and mean force values for each iteration of a simulation.

Constructor & Destructor Documentation

◆ Record() [1/2]

Record::Record ( )

Constructor for Record class.

◆ Record() [2/2]

Record::Record ( const int  numIterations)

Constructor for Record class that pre-allocates memory for the data vectors.

Parameters
numIterationsThe number of iterations to allocate memory for.

Member Function Documentation

◆ add()

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.

Parameters
currentAreaThe current surface area of the mesh.
currentEnergyThe current energy of the mesh.
currentMeanForceThe current mean force on the mesh vertices.

◆ print_iteration()

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).

Parameters
iterationThe step number of the iteration to print information about.

◆ set()

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.

Parameters
iterationThe index of the record to set.
currentAreaThe surface area for the record.
currentEnergyThe energy for the record.
currentMeanForceThe mean force for the record.

Member Data Documentation

◆ areaTotal

std::vector<double> Record::areaTotal

Vector of total surface area values.

◆ energyVec

std::vector<Energy> Record::energyVec

Vector of energy values.

◆ meanForce

std::vector<double> Record::meanForce

Vector of mean force values.


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