changes to make these applications link. I do not know what the issue is, atm.

This commit is contained in:
Harry Moffat 2009-07-11 17:25:05 +00:00
parent 7d15ee51b9
commit 7747b7004a
4 changed files with 10 additions and 8 deletions

View file

@ -23,6 +23,7 @@
#include "example_utils.h"
using namespace Cantera;
using namespace Cantera_CXX;
using namespace CanteraZeroD;
using namespace std;
// Kinetics example. This is written as a function so that one
@ -87,8 +88,8 @@ int kinetics_example1(int job) {
// create a container object to run the simulation
// and add the reactor to it
ReactorNet sim;
sim.addReactor(&r);
CanteraZeroD::ReactorNet *sim_ptr = new CanteraZeroD::ReactorNet();
sim_ptr->addReactor(&r);
double tm;
double dt = 1.e-5; // interval at which output is written
@ -103,7 +104,7 @@ int kinetics_example1(int job) {
clock_t t0 = clock();
for (int i = 1; i <= nsteps; i++) {
tm = i*dt;
sim.advance(tm);
sim_ptr->advance(tm);
saveSoln(tm, gas, soln);
}
clock_t t1 = clock();
@ -120,8 +121,8 @@ int kinetics_example1(int job) {
cout << " Tfinal = " << r.temperature() << endl;
cout << " time = " << tmm << endl;
cout << " number of residual function evaluations = "
<< sim.integrator().nEvals() << endl;
cout << " time per evaluation = " << tmm/sim.integrator().nEvals()
<< sim_ptr->integrator().nEvals() << endl;
cout << " time per evaluation = " << tmm/sim_ptr->integrator().nEvals()
<< endl << endl;
cout << "Output files:" << endl
<< " kin1.csv (Excel CSV file)" << endl

View file

@ -77,7 +77,8 @@ int kinetics_example2(int job) {
// create a container object to run the simulation
// and add the reactor to it
ReactorNet sim;
CanteraZeroD::ReactorNet * sim_ptr = new ReactorNet ();
CanteraZeroD::ReactorNet &sim = *sim_ptr;
sim.addReactor(&r);
double tm;

View file

@ -83,7 +83,7 @@ int kinetics_example3(int job) {
// create a container object to run the simulation
// and add the reactor to it
ReactorNet sim;
CanteraZeroD::ReactorNet& sim = *(new ReactorNet());
sim.addReactor(&r);
double tm;

View file

@ -132,7 +132,7 @@ int rxnpath_example1(int job) {
// create a container object to run the simulation
// and add the reactor to it
ReactorNet sim;
CanteraZeroD::ReactorNet& sim = *(new ReactorNet ());
sim.addReactor(&r);
// create a reaction path diagram builder