From ede77eb7f2dd8daaa213e8040ec60d9c5233ec11 Mon Sep 17 00:00:00 2001 From: Jean-Luc Fattebert Date: Thu, 12 Dec 2024 21:10:37 -0500 Subject: [PATCH] Refine one plot driver * add mesh size option to plotEnergyVsCompositionThreePhase * also add temperature to output file --- drivers/plotEnergyVsCompositionThreePhase.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/plotEnergyVsCompositionThreePhase.cc b/drivers/plotEnergyVsCompositionThreePhase.cc index 99b28e9..6ad2e83 100644 --- a/drivers/plotEnergyVsCompositionThreePhase.cc +++ b/drivers/plotEnergyVsCompositionThreePhase.cc @@ -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]); @@ -43,8 +45,11 @@ int main(int argc, char* argv[]) boost::optional 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))