diff --git a/include/cantera/zeroD/ReactorNet.h b/include/cantera/zeroD/ReactorNet.h index ffb1dfcad..c849deaaa 100644 --- a/include/cantera/zeroD/ReactorNet.h +++ b/include/cantera/zeroD/ReactorNet.h @@ -79,11 +79,6 @@ public: return m_atols; } - /** - * Initialize the reactor network. - */ - void initialize(doublereal t0 = 0.0); - /** * Advance the state of all reactors in time. * @param time Time to advance to (s). @@ -152,6 +147,11 @@ public: } protected: + /** + * Initialize the reactor network. Called automatically the first time + * advance or step is called. + */ + void initialize(); std::vector m_r; std::vector m_reactors; diff --git a/src/zeroD/ReactorNet.cpp b/src/zeroD/ReactorNet.cpp index ea309d55f..5bdf19730 100644 --- a/src/zeroD/ReactorNet.cpp +++ b/src/zeroD/ReactorNet.cpp @@ -44,7 +44,7 @@ ReactorNet::~ReactorNet() deleteIntegrator(m_integ); } -void ReactorNet::initialize(doublereal t0) +void ReactorNet::initialize() { size_t n, nv; char buf[100]; @@ -59,7 +59,7 @@ void ReactorNet::initialize(doublereal t0) "no reactors in network!"); for (n = 0; n < m_nr; n++) { if (m_r[n]->type() >= ReactorType) { - m_r[n]->initialize(t0); + m_r[n]->initialize(m_time); Reactor* r = (Reactor*)m_r[n]; m_reactors.push_back(r); nv = r->neq(); @@ -132,7 +132,7 @@ void ReactorNet::initialize(doublereal t0) sprintf(buf, "Maximum time step: %14.6g\n", m_maxstep); writelog(buf); } - m_integ->initialize(t0, *this); + m_integ->initialize(m_time, *this); m_init = true; }