All tests using class fileLog now use a shared copy

This commit is contained in:
Ray Speth 2012-02-22 00:17:01 +00:00
parent 01e63f004e
commit ce5abaca0e
13 changed files with 31 additions and 293 deletions

View file

@ -2,7 +2,7 @@
* @file DH_graph_1
*/
#include "cantera/base/logger.h"
#include "fileLog.h"
#include "cantera/thermo/DebyeHuckel.h"
#include <cstdio>
@ -12,28 +12,6 @@ using namespace Cantera;
typedef double doublereal;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
m_fs << endl;
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
ofstream m_fs;
};
void printUsage()
{
cout << "usage: DH_test " << endl;

View file

@ -2,7 +2,7 @@
* @file DH_graph_1
*/
#include "cantera/base/logger.h"
#include "fileLog.h"
#include "cantera/thermo/DebyeHuckel.h"
#include <cstdio>
@ -10,28 +10,6 @@
using namespace std;
using namespace Cantera;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
m_fs << endl;
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
ofstream m_fs;
};
void printUsage()
{
cout << "usage: DH_test " << endl;

View file

@ -2,7 +2,7 @@
* @file DH_graph_1
*/
#include "cantera/base/logger.h"
#include "fileLog.h"
#include "cantera/thermo/DebyeHuckel.h"
#include <cstdio>
@ -10,28 +10,6 @@
using namespace std;
using namespace Cantera;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
m_fs << endl;
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
ofstream m_fs;
};
void printUsage()
{
cout << "usage: DH_test " << endl;

View file

@ -2,7 +2,7 @@
* @file DH_graph_1
*/
#include "cantera/base/logger.h"
#include "fileLog.h"
#include "cantera/thermo/DebyeHuckel.h"
#include <cstdio>
@ -10,28 +10,6 @@
using namespace std;
using namespace Cantera;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
m_fs << endl;
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
ofstream m_fs;
};
void printUsage()
{
cout << "usage: DH_test " << endl;

View file

@ -2,7 +2,7 @@
* @file DH_graph_1
*/
#include "cantera/base/logger.h"
#include "fileLog.h"
#include "cantera/thermo/DebyeHuckel.h"
#include <cstdio>
@ -10,28 +10,6 @@
using namespace std;
using namespace Cantera;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
m_fs << endl;
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
ofstream m_fs;
};
void printUsage()
{
cout << "usage: DH_test " << endl;

View file

@ -3,7 +3,6 @@
* @file HMW_graph_1.cpp
*/
#include "cantera/base/logger.h"
#include "cantera/thermo.h"
#include "TemperatureTable.h"
#include "cantera/thermo/HMWSoln.h"
@ -13,28 +12,6 @@
using namespace std;
using namespace Cantera;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
m_fs.flush();
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
ofstream m_fs;
};
void printUsage()
{
cout << "usage: HMW_test " << endl;
@ -42,7 +19,6 @@ void printUsage()
}
int main(int argc, char** argv)
{
@ -58,12 +34,8 @@ int main(int argc, char** argv)
}
double Cp0_R[20], pmCp[20];
//fileLog *fl = new fileLog("HMW_graph_1.log");
//setLogger(fl);
HMWSoln* HMW = new HMWSoln(iFile, "NaCl_electrolyte");
/*
* Load in and initialize the
*/

View file

@ -2,9 +2,9 @@
* @file HMW_graph_1.cpp
*/
#include "cantera/base/logger.h"
#include "cantera/thermo.h"
#include "TemperatureTable.h"
#include "cantera/thermo.h"
#include "cantera/thermo/HMWSoln.h"
#include <cstdio>
@ -12,28 +12,6 @@
using namespace std;
using namespace Cantera;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
m_fs.flush();
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
ofstream m_fs;
};
void printUsage()
{
cout << "usage: HMW_test " << endl;
@ -78,9 +56,6 @@ int main(int argc, char** argv)
}
double Cp0_R[20], pmCp[20];
//fileLog *fl = new fileLog("HMW_graph_1.log");
//setLogger(fl);
HMWSoln* HMW = new HMWSoln(iFile, "NaCl_electrolyte");

View file

@ -10,23 +10,6 @@
using namespace std;
using namespace Cantera;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
fstream m_fs;
};
void printUsage()
{
cout << "usage: HMW_test " << endl;
@ -85,9 +68,6 @@ int main(int argc, char** argv)
aTemp[5] = 273.15 + 275.;
aTemp[6] = 273.15 + 300.;
//fileLog *fl = new fileLog("HMW_graph_1.log");
//setLogger(fl);
HMWSoln* HMW = new HMWSoln(iFile, "NaCl_electrolyte");
int nsp = HMW->nSpecies();

View file

@ -4,7 +4,6 @@
*/
#include "cantera/thermo/ThermoPhase.h"
#include "cantera/base/logger.h"
#include "cantera/thermo.h"
#include "cantera/thermo/HMWSoln.h"
@ -15,28 +14,6 @@
using namespace std;
using namespace Cantera;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
m_fs.flush();
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
ofstream m_fs;
};
void printUsage()
{
cout << "usage: HMW_test " << endl;
@ -87,9 +64,6 @@ int main(int argc, char** argv)
strcpy(iFile, argv[1]);
}
//fileLog *fl = new fileLog("HMW_graph_1.log");
//setLogger(fl);
HMWSoln* HMW = new HMWSoln(iFile, "NaCl_electrolyte");

View file

@ -4,7 +4,6 @@
#include "cantera/thermo.h"
#include "cantera/thermo/HMWSoln.h"
#include "cantera/base/logger.h"
#include "TemperatureTable.h"
@ -13,28 +12,6 @@
using namespace std;
using namespace Cantera;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
m_fs.flush();
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
ofstream m_fs;
};
void printUsage()
{
cout << "usage: HMW_test " << endl;
@ -86,9 +63,6 @@ int main(int argc, char** argv)
}
double Enth0_RT[20], pmEnth[20], molarEnth;
//fileLog *fl = new fileLog("HMW_graph_1.log");
//setLogger(fl);
HMWSoln* HMW = new HMWSoln(iFile, "NaCl_electrolyte");

View file

@ -2,7 +2,6 @@
* @file HMW_graph_VvT
*/
#include "cantera/base/logger.h"
#include "cantera/thermo.h"
#include "TemperatureTable.h"
#include "cantera/thermo/HMWSoln.h"
@ -12,28 +11,6 @@
using namespace std;
using namespace Cantera;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
m_fs.flush();
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
ofstream m_fs;
};
void printUsage()
{
cout << "usage: HMW_test " << endl;
@ -77,9 +54,6 @@ int main(int argc, char** argv)
}
double V0[20], pmV[20];
//fileLog *fl = new fileLog("HMW_graph_1.log");
//setLogger(fl);
HMWSoln* HMW = new HMWSoln(iFile, "NaCl_electrolyte");

View file

@ -5,7 +5,6 @@
#include "cantera/thermo.h"
#include "cantera/thermo/StoichSubstanceSSTP.h"
#include "cantera/base/logger.h"
#include "TemperatureTable.h"
@ -14,28 +13,6 @@
using namespace std;
using namespace Cantera;
class fileLog: public Logger
{
public:
fileLog(string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const string& msg) {
m_fs << msg;
m_fs.flush();
}
virtual ~fileLog() {
m_fs.close();
}
string m_fName;
ofstream m_fs;
};
void printUsage()
{
cout << "usage: stoichSubSSTP " << endl;
@ -58,8 +35,6 @@ int main(int argc, char** argv)
strcpy(iFile, argv[1]);
}
//fileLog *fl = new fileLog("HMW_graph_1.log");
//setLogger(fl);
sprintf(file_ID,"%s#NaCl(S)", iFile);
XML_Node* xm = get_XML_NameID("phase", file_ID, 0);
StoichSubstanceSSTP* solid = new StoichSubstanceSSTP(*xm);

View file

@ -0,0 +1,24 @@
#include "cantera/base/logger.h"
#include <string>
#include <fstream>
class fileLog: public Cantera::Logger
{
public:
fileLog(std::string fName) {
m_fName = fName;
m_fs.open(fName.c_str());
}
virtual void write(const std::string& msg) {
m_fs << msg << std::endl;
}
virtual ~fileLog() {
m_fs.close();
}
std::string m_fName;
std::fstream m_fs;
};