Program Listing for File ThermochemistryVariable.h¶
↰ Return to documentation for file (include/classes/ThermochemistryVariable.h)
// _______. ______ __ ___ .__ __. .___________. __ ___ ___ //
// / | / || | / \ | \ | | | || | \ \ / / //
// | (----`| ,----'| | / ^ \ | \| | `---| |----`| | \ V / //
// \ \ | | | | / /_\ \ | . ` | | | | | > < //
// .----) | | `----.| | / _____ \ | |\ | | | | | / . \ //
// |_______/ \______||__| /__/ \__\ |__| \__| |__| |__| /__/ \__\ //
// //
// Originally developed by D. Pizzocri & T. Barani //
// //
// Version: 2.5 //
// Year: 2026 //
// Authors: D. Pizzocri, G. Zullo, E. Cappellari. //
// //
#ifndef THERMOCHEMISTRY_VARIABLE_H
#define THERMOCHEMISTRY_VARIABLE_H
#include "SciantixVariable.h"
#include <map>
class ThermochemistryVariable : public SciantixVariable
{
protected:
int index;
std::string location;
std::string phase;
std::map<std::string, double> composition;
std::map<int, std::map<std::string, double>> sublattice_composition;
double theoretical_density;
public:
ThermochemistryVariable(int index,
std::string name,
std::string uom,
double initial_value,
double final_value,
std::string phase,
std::string location,
bool output,
double theoretical_density = 0.0)
: SciantixVariable(name, uom, initial_value, final_value, output)
{
this->index = index;
this->phase = phase;
this->location = location;
this->theoretical_density = theoretical_density;
}
void setIndex(int i)
{
index = i;
}
int getIndex()
{
return index;
}
void setLocation(std::string loc);
std::string getLocation();
void setPhase(std::string ph);
std::string getPhase();
void setComposition(std::map<std::string, double> composition_map);
std::map<std::string, double> getComposition();
void setSublatticeComposition(std::map<int, std::map<std::string, double>> composition_map);
std::map<int, std::map<std::string, double>> getSublatticeComposition();
double getMolarMass();
double getMass();
void setTheoreticalDensity(double density)
{
theoretical_density = density;
}
double getTheoreticalDensity()
{
return theoretical_density;
}
ThermochemistryVariable()
{
}
~ThermochemistryVariable()
{
}
};
#endif