Changed the logger instantiation. This apparently made a difference on SUSE.
Changed the runtest script to default to the correct location of CANTERA_DATA.
This commit is contained in:
parent
88f4866882
commit
f9c03fdf4b
3 changed files with 15 additions and 5 deletions
|
|
@ -6,6 +6,7 @@ DH_NaCl_acommon.csv
|
|||
DH_NaCl_bdotak.csv
|
||||
DH_NaCl_dilute.csv
|
||||
DH_graph_1
|
||||
DH_graph_1.log
|
||||
DH_graph_1.d
|
||||
DH_graph_1.out
|
||||
csvCode.txt
|
||||
|
|
|
|||
|
|
@ -26,11 +26,12 @@ class fileLog: public Logger {
|
|||
public:
|
||||
fileLog(string fName) {
|
||||
m_fName = fName;
|
||||
m_fs.open(fName.c_str());
|
||||
m_fs.open(fName.c_str());
|
||||
}
|
||||
|
||||
virtual void write(const string& msg) {
|
||||
m_fs << msg;
|
||||
m_fs << endl;
|
||||
}
|
||||
|
||||
virtual ~fileLog() {
|
||||
|
|
@ -38,7 +39,7 @@ public:
|
|||
}
|
||||
|
||||
string m_fName;
|
||||
fstream m_fs;
|
||||
ofstream m_fs;
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -73,7 +74,8 @@ int main(int argc, char **argv)
|
|||
|
||||
int retn = 0;
|
||||
int i;
|
||||
string commandFile = "vcs_Cantera.inp";
|
||||
string fName = "DH_graph_1.log";
|
||||
fileLog *fl = new fileLog(fName);
|
||||
try {
|
||||
|
||||
char iFile[80];
|
||||
|
|
@ -81,7 +83,6 @@ int main(int argc, char **argv)
|
|||
if (argc > 1) {
|
||||
strcpy(iFile, argv[1]);
|
||||
}
|
||||
fileLog *fl = new fileLog("DH_graph_1.log");
|
||||
setLogger(fl);
|
||||
|
||||
DebyeHuckel *DH = new DebyeHuckel(iFile, "NaCl_electrolyte");
|
||||
|
|
@ -137,8 +138,10 @@ int main(int argc, char **argv)
|
|||
return retn;
|
||||
|
||||
} catch (CanteraError) {
|
||||
|
||||
showErrors();
|
||||
if (fl) {
|
||||
delete fl;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ fi
|
|||
temp_success="0"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
##########################################################################
|
||||
CANTERA_DATA=${CANTERA_DATA:=../../../data/inputs}; export CANTERA_DATA
|
||||
|
||||
CANTERA_BIN=${CANTERA_BIN:=../../../bin}
|
||||
|
||||
prog=DH_graph_1
|
||||
if test ! -x $prog ; then
|
||||
echo $prog ' does not exist'
|
||||
|
|
@ -22,6 +26,7 @@ fi
|
|||
/bin/rm -f test.out test.diff DH_graph_1.out
|
||||
|
||||
echo 'Testing the DH dilute act calculation - act vs I'
|
||||
/bin/rm -f DH_graph_1.out
|
||||
$prog DH_NaCl_dilute.xml > DH_graph_1.out
|
||||
retnStat=$?
|
||||
echo 'Making a comparison with the good saved solution: '
|
||||
|
|
@ -46,6 +51,7 @@ fi
|
|||
/bin/rm -f test.out test.diff DH_NaCl_acommon.csv
|
||||
|
||||
echo 'Testing the DH dilute act calculation - act vs I'
|
||||
/bin/rm DH_NaCl_acommon.csv
|
||||
$prog DH_NaCl_acommon.xml > DH_NaCl_acommon.csv
|
||||
retnStat=$?
|
||||
echo 'Making a comparison with the good saved solution: '
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue