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

Method addAdjacent

src/base/Solution.cpp:94–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void 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
113AnyMap Solution::parameters(bool withInput) const
114{

Callers 1

newSolutionFunction · 0.80

Calls 4

CanteraErrorClass · 0.85
nDimMethod · 0.80
nameMethod · 0.45
thermoMethod · 0.45

Tested by

no test coverage detected