mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[kinetics] Track undeclared third body usage
This commit is contained in:
parent
e00c23ffc3
commit
693beb6de8
@ -1625,6 +1625,9 @@ protected:
|
|||||||
//! See skipUndeclaredThirdBodies()
|
//! See skipUndeclaredThirdBodies()
|
||||||
bool m_skipUndeclaredThirdBodies = false;
|
bool m_skipUndeclaredThirdBodies = false;
|
||||||
|
|
||||||
|
//! Flag indicating whether reactions include undeclared third bodies
|
||||||
|
bool m_hasUndeclaredThirdBodies = false;
|
||||||
|
|
||||||
//! reference to Solution
|
//! reference to Solution
|
||||||
std::weak_ptr<Solution> m_root;
|
std::weak_ptr<Solution> m_root;
|
||||||
};
|
};
|
||||||
|
@ -88,6 +88,8 @@ void BulkKinetics::addThirdBody(shared_ptr<Reaction> r)
|
|||||||
throw CanteraError("BulkKinetics::addThirdBody", "Found third-body"
|
throw CanteraError("BulkKinetics::addThirdBody", "Found third-body"
|
||||||
" efficiency for undefined species '{}' while adding reaction '{}'",
|
" efficiency for undefined species '{}' while adding reaction '{}'",
|
||||||
name, r->equation());
|
name, r->equation());
|
||||||
|
} else {
|
||||||
|
m_hasUndeclaredThirdBodies = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_multi_concm.install(nReactions() - 1, efficiencies,
|
m_multi_concm.install(nReactions() - 1, efficiencies,
|
||||||
|
@ -643,6 +643,9 @@ AnyMap Kinetics::parameters()
|
|||||||
if (nReactions() == 0) {
|
if (nReactions() == 0) {
|
||||||
out["reactions"] = "none";
|
out["reactions"] = "none";
|
||||||
}
|
}
|
||||||
|
if (m_hasUndeclaredThirdBodies) {
|
||||||
|
out["skip-undeclared-third-bodies"] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user