Revision: 3419
Author:
yar...@gmail.com
Date: Sat Feb 28 00:24:38 2015 UTC
Log: [Reactor] Check that contents are assigned before starting
integration
https://code.google.com/p/cantera/source/detail?r=3419
Modified:
/cantera/trunk/src/zeroD/Reactor.cpp
=======================================
--- /cantera/trunk/src/zeroD/Reactor.cpp Thu Feb 26 21:58:42 2015 UTC
+++ /cantera/trunk/src/zeroD/Reactor.cpp Sat Feb 28 00:24:38 2015 UTC
@@ -67,6 +67,10 @@
void Reactor::initialize(doublereal t0)
{
+ if (!m_thermo || !m_kin) {
+ throw CanteraError("Reactor::initialize", "Reactor contents not
set"
+ " for reactor '" + m_name + "'.");
+ }
m_thermo->restoreState(m_state);
m_sdot.resize(m_nsp, 0.0);
m_wdot.resize(m_nsp, 0.0);