| 92 | } |
| 93 | |
| 94 | void Solution::addAdjacent(shared_ptr<Solution> adjacent) { |
| 95 | if (m_adjacentByName.count(adjacent->name())) { |
| 96 | throw CanteraError("Solution::addAdjacent", |
| 97 | "Solution '{}' already contains an adjacent phase named '{}'.", |
| 98 | name(), adjacent->name()); |
| 99 | } |
| 100 | if (m_thermo && adjacent->thermo() |
| 101 | && adjacent->thermo()->nDim() <= m_thermo->nDim()) |
| 102 | { |
| 103 | throw CanteraError("Solution::addAdjacent", |
| 104 | "Adjacent phases should have higher dimensionality than the reacting ", |
| 105 | "phase.\n'{}' is {}-dimensional while '{}' is {}-dimensional", |
| 106 | adjacent->thermo()->name(), adjacent->thermo()->nDim(), |
| 107 | m_thermo->name(), m_thermo->nDim()); |
| 108 | } |
| 109 | m_adjacent.push_back(adjacent); |
| 110 | m_adjacentByName[adjacent->name()] = adjacent; |
| 111 | } |
| 112 | |
| 113 | AnyMap Solution::parameters(bool withInput) const |
| 114 | { |
no test coverage detected