| 111 | } |
| 112 | |
| 113 | AnyMap Solution::parameters(bool withInput) const |
| 114 | { |
| 115 | AnyMap out = m_thermo->parameters(false); |
| 116 | AnyValue empty("<NULL>"); |
| 117 | if (m_kinetics) { |
| 118 | out.update(m_kinetics->parameters()); |
| 119 | } |
| 120 | if (!m_transport) { |
| 121 | out["transport"] = empty; |
| 122 | } else if (m_transport->transportModel() == "none") { |
| 123 | out["transport"] = empty; |
| 124 | } else { |
| 125 | out.update(m_transport->parameters()); |
| 126 | } |
| 127 | if (withInput) { |
| 128 | auto transport = out["transport"]; |
| 129 | AnyMap input = m_thermo->input(); |
| 130 | if (input.hasKey("reactions")) { |
| 131 | // all reactions are listed in the standard 'reactions' section |
| 132 | input.erase("reactions"); |
| 133 | } |
| 134 | out.update(input); |
| 135 | if (input.hasKey("transport")) { |
| 136 | // revert changes / ensure that correct model is referenced |
| 137 | out["transport"] = transport; |
| 138 | } |
| 139 | } |
| 140 | if (out["transport"] == empty) { |
| 141 | out.erase("transport"); |
| 142 | } |
| 143 | return out; |
| 144 | } |
| 145 | |
| 146 | const AnyMap& Solution::header() const |
| 147 | { |
no test coverage detected