| 547 | } |
| 548 | |
| 549 | void InterfaceKinetics::setPhaseExistence(const size_t iphase, const int exists) |
| 550 | { |
| 551 | checkPhaseIndex(iphase); |
| 552 | if (exists) { |
| 553 | if (!m_phaseExists[iphase]) { |
| 554 | m_phaseExistsCheck--; |
| 555 | m_phaseExistsCheck = std::max(m_phaseExistsCheck, 0); |
| 556 | m_phaseExists[iphase] = true; |
| 557 | } |
| 558 | m_phaseIsStable[iphase] = true; |
| 559 | } else { |
| 560 | if (m_phaseExists[iphase]) { |
| 561 | m_phaseExistsCheck++; |
| 562 | m_phaseExists[iphase] = false; |
| 563 | } |
| 564 | m_phaseIsStable[iphase] = false; |
| 565 | } |
| 566 | } |
| 567 | |
| 568 | int InterfaceKinetics::phaseExistence(const size_t iphase) const |
| 569 | { |