Skip to content
Snippets Groups Projects
Commit 79488f6d authored by Andrew Heather's avatar Andrew Heather
Browse files

added missing globalGasIds_ in constructor initialisers + error msg

parent e1cb1a37
No related merge requests found
......@@ -128,6 +128,25 @@ void Foam::phaseProperties::setGlobalGasIds
break;
}
}
if (globalGasIds_[i] == -1)
{
wordList gasNames(YGas.size());
forAll(YGas, gasI)
{
gasNames[gasI] = YGas[gasI].name();
}
FatalErrorIn
(
"void Foam::phaseProperties::setGlobalGasIds"
"("
"const PtrList<volScalarField>&"
")"
) << "Could not find gas specie " << names_[i]
<< " in species list" << nl
<< "Available species are: " << nl << gasNames << nl
<< exit(FatalError);
}
}
}
......@@ -195,7 +214,8 @@ Foam::phaseProperties::phaseProperties()
stateLabel_("(unknown)"),
names_(0),
Y_(0),
globalIds_(0)
globalIds_(0),
globalGasIds_(0)
{}
......@@ -205,7 +225,8 @@ Foam::phaseProperties::phaseProperties(const phaseProperties& pp)
stateLabel_(pp.stateLabel_),
names_(pp.names_),
Y_(pp.Y_),
globalIds_(pp.globalIds_)
globalIds_(pp.globalIds_),
globalGasIds_(pp.globalGasIds_)
{}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment