MCPcopy Create free account
hub / github.com/Cantera/cantera / parameters

Method parameters

src/base/Solution.cpp:113–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113AnyMap 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
146const AnyMap& Solution::header() const
147{

Callers 8

setupMethod · 0.45
TEST_FFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
duplicateReactionMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
toYamlStringMethod · 0.45

Calls 4

hasKeyMethod · 0.80
eraseMethod · 0.80
updateMethod · 0.45
transportModelMethod · 0.45

Tested by

no test coverage detected