| 153 | } |
| 154 | |
| 155 | void ReactorBase::syncState() |
| 156 | { |
| 157 | m_thermo->saveState(m_state); |
| 158 | m_enthalpy = m_thermo->enthalpy_mass(); |
| 159 | try { |
| 160 | m_intEnergy = m_thermo->intEnergy_mass(); |
| 161 | } catch (NotImplementedError&) { |
| 162 | m_intEnergy = NAN; |
| 163 | } |
| 164 | m_pressure = m_thermo->pressure(); |
| 165 | m_mass = m_thermo->density() * m_vol; |
| 166 | if (m_net) { |
| 167 | m_net->setNeedsReinit(); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | ReactorNet& ReactorBase::network() |
| 172 | { |