mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
Applied consistent formatting to all C++ code
Done using astyle: astyle --style=kr --add-brackets --indent=spaces=4 --indent-col1-comments --unpad-paren --pad-header --align-pointer=type --lineend=linux
This commit is contained in:
@@ -16,30 +16,30 @@
|
||||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
_set_output_format(_TWO_DIGIT_EXPONENT);
|
||||
#endif
|
||||
try {
|
||||
IdealGasMix g("bad_air.xml", "air");
|
||||
double pres = 1.0E5;
|
||||
g.setState_TPX(1000.1, pres, "O2:0.4, N2:0.6");
|
||||
equilibrate(g, "TP", -1);
|
||||
cout << g;
|
||||
double enth = g.enthalpy_mass();
|
||||
printf(" enth = %g\n", enth);
|
||||
enth -= 2.0E2;
|
||||
printf("attempted equil at (H,P) = %10.5g, %10.5g\n", enth, pres);
|
||||
g.setState_HP(enth, pres);
|
||||
equilibrate(g, "HP", -1);
|
||||
cout << g;
|
||||
try {
|
||||
IdealGasMix g("bad_air.xml", "air");
|
||||
double pres = 1.0E5;
|
||||
g.setState_TPX(1000.1, pres, "O2:0.4, N2:0.6");
|
||||
equilibrate(g, "TP", -1);
|
||||
cout << g;
|
||||
double enth = g.enthalpy_mass();
|
||||
printf(" enth = %g\n", enth);
|
||||
enth -= 2.0E2;
|
||||
printf("attempted equil at (H,P) = %10.5g, %10.5g\n", enth, pres);
|
||||
g.setState_HP(enth, pres);
|
||||
equilibrate(g, "HP", -1);
|
||||
cout << g;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (CanteraError) {
|
||||
showErrors(cerr);
|
||||
cerr << "program terminating." << endl;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
} catch (CanteraError) {
|
||||
showErrors(cerr);
|
||||
cerr << "program terminating." << endl;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user