Reaction: Corrected handling of null beta list
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user