[Test] Eliminated usage of class PrintCtrl
This commit is contained in:
parent
7c8d0824f3
commit
33eb924f59
2 changed files with 8 additions and 7 deletions
|
|
@ -6,7 +6,6 @@
|
||||||
#include "cantera/equilibrium.h"
|
#include "cantera/equilibrium.h"
|
||||||
#include "cantera/thermo/IdealSolnGasVPSS.h"
|
#include "cantera/thermo/IdealSolnGasVPSS.h"
|
||||||
#include "cantera/thermo/ThermoFactory.h"
|
#include "cantera/thermo/ThermoFactory.h"
|
||||||
#include "cantera/base/PrintCtrl.h"
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace Cantera;
|
using namespace Cantera;
|
||||||
|
|
@ -17,7 +16,6 @@ int main(int argc, char** argv)
|
||||||
_set_output_format(_TWO_DIGIT_EXPONENT);
|
_set_output_format(_TWO_DIGIT_EXPONENT);
|
||||||
#endif
|
#endif
|
||||||
try {
|
try {
|
||||||
PrintCtrl::GlobalCrop = PrintCtrl::GCT_CROP;
|
|
||||||
Cantera::IdealSolnGasVPSS gg("silane.xml", "silane");
|
Cantera::IdealSolnGasVPSS gg("silane.xml", "silane");
|
||||||
ThermoPhase* g = ≫
|
ThermoPhase* g = ≫
|
||||||
//ThermoPhase *g = newPhase("silane.xml", "silane");
|
//ThermoPhase *g = newPhase("silane.xml", "silane");
|
||||||
|
|
|
||||||
|
|
@ -3,20 +3,22 @@
|
||||||
#include "cantera/thermo/MargulesVPSSTP.h"
|
#include "cantera/thermo/MargulesVPSSTP.h"
|
||||||
#include "cantera/thermo/IonsFromNeutralVPSSTP.h"
|
#include "cantera/thermo/IonsFromNeutralVPSSTP.h"
|
||||||
#include "cantera/IdealGasMix.h"
|
#include "cantera/IdealGasMix.h"
|
||||||
#include "cantera/base/PrintCtrl.h"
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <iomanip>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
using namespace Cantera;
|
using namespace Cantera;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
Cantera::PrintCtrl pc;
|
std::stringstream ss;
|
||||||
|
|
||||||
void printValue(const std::string& label, double value)
|
void printValue(const std::string& label, double value)
|
||||||
{
|
{
|
||||||
std::cout << label;
|
ss.str("");
|
||||||
pc.pr_de(value, 4, 13);
|
ss.clear();
|
||||||
std::cout << std::endl;
|
ss << std::setw(13) << value;
|
||||||
|
std::cout << label << ss.str() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void printRates(InterfaceKinetics& iKin)
|
void printRates(InterfaceKinetics& iKin)
|
||||||
|
|
@ -40,6 +42,7 @@ void printRates(InterfaceKinetics& iKin)
|
||||||
|
|
||||||
void testProblem()
|
void testProblem()
|
||||||
{
|
{
|
||||||
|
ss << std::scientific << std::setprecision(3) << std::uppercase;
|
||||||
XML_Node xc;
|
XML_Node xc;
|
||||||
ctml::get_CTML_Tree(&xc, "ReactionSurf.xml");
|
ctml::get_CTML_Tree(&xc, "ReactionSurf.xml");
|
||||||
XML_Node* xg = xc.findNameID("phase", "reaction_surface");
|
XML_Node* xg = xc.findNameID("phase", "reaction_surface");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue