[Reactor] Check that contents are assigned before starting integration
This commit is contained in:
parent
eca79a5332
commit
ab2beb4c64
1 changed files with 4 additions and 0 deletions
|
|
@ -67,6 +67,10 @@ void Reactor::getSurfaceInitialConditions(double* y)
|
|||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue