Reaction: Corrected handling of null beta list

This commit is contained in:
Henry Weller
2018-06-28 18:45:30 +01:00
parent cb1237dd4c
commit 16ddfa3cb4

View File

@ -699,13 +699,16 @@ void Foam::Reaction<ReactionThermo>::dwdc
// When third-body species are involved, additional terms are added
// beta function returns an empty list when third-body are not involved
if (this->beta().size() > 0)
const List<Tuple2<label, scalar>>& beta = this->beta();
if (notNull(beta))
{
scalarField dcidc(this->beta().size());
// This temporary array needs to be cached for efficiency
scalarField dcidc(beta.size());
this->dcidc(p, T, c, dcidc);
forAll(this->beta(), j)
forAll(beta, j)
{
label sj = this->beta()[j].first();
label sj = beta[j].first();
sj = reduced ? c2s[sj] : sj;
if (sj != -1)
{