Skip to content

Commit

Permalink
Refine one plot driver
Browse files Browse the repository at this point in the history
* add mesh size option to plotEnergyVsCompositionThreePhase
* also add temperature to output file
  • Loading branch information
jeanlucf22 committed Dec 13, 2024
1 parent e00e782 commit ede77eb
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions drivers/plotEnergyVsCompositionThreePhase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ int main(int argc, char* argv[])
{
std::string databasename(argv[1]);
double temperature = atof(argv[2]);
double cmin = 0.;
double cmax = 1.;
if (argc > 3)
const int npts = atof(argv[3]);

double cmin = 0.;
double cmax = 1.;
if (argc > 4)
{
cmin = atof(argv[3]);
cmax = atof(argv[4]);
Expand Down Expand Up @@ -43,8 +45,11 @@ int main(int argc, char* argv[])

boost::optional<pt::ptree&> newton_db;

const int npts = 100;
std::ofstream os("FvsC.csv", std::ios::out);
std::stringstream ss;
ss << std::fixed;
ss << std::setprecision(2);
ss << temperature;
std::ofstream os("FvsC" + ss.str() + ".csv", std::ios::out);
std::cout << " Compute energies..." << std::endl;

if (Thermo4PFM::checkSublattice(calphad_db))
Expand Down

0 comments on commit ede77eb

Please sign in to comment.