From 79488f6df8be52f702d4b7e7579e6a1d2be2dc74 Mon Sep 17 00:00:00 2001 From: andy <a.heather@opencfd.co.uk> Date: Tue, 14 Apr 2009 14:06:45 +0100 Subject: [PATCH] added missing globalGasIds_ in constructor initialisers + error msg --- .../phaseProperties/phaseProperties.C | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C index 99d6fcfd0de..c753d31d569 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C @@ -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_) {} -- GitLab