Fix Coverity CID 38607

This commit is contained in:
mikekaganski
2015-03-06 23:38:37 +10:00
parent c32f05312a
commit 358757df84
3 changed files with 3 additions and 5 deletions

View File

@@ -251,8 +251,7 @@ void FlashRoutines::QT_flash(HelmholtzEOSMixtureBackend &HEOS)
else if (!(HEOS.components[0].EOS().pseudo_pure))
{
// Set some imput options
SaturationSolvers::saturation_T_pure_Akasaka_options options;
options.use_guesses = false;
SaturationSolvers::saturation_T_pure_Akasaka_options options(false);
// Actually call the solver
SaturationSolvers::saturation_T_pure_Maxwell(HEOS, HEOS._T, options);

View File

@@ -725,9 +725,8 @@ void SaturationSolvers::saturation_D_pure(HelmholtzEOSMixtureBackend &HEOS, Cool
void SaturationSolvers::saturation_T_pure(HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl T, saturation_T_pure_options &options)
{
// Set some imput options
SaturationSolvers::saturation_T_pure_Akasaka_options _options;
SaturationSolvers::saturation_T_pure_Akasaka_options _options(false);
_options.omega = 1.0;
_options.use_guesses = false;
try{
// Actually call the solver
SaturationSolvers::saturation_T_pure_Maxwell(HEOS, T, _options);

View File

@@ -11,7 +11,7 @@ namespace SaturationSolvers
struct saturation_T_pure_Akasaka_options{
bool use_guesses; ///< true to start off at the values specified by rhoL, rhoV
CoolPropDbl omega, rhoL, rhoV, pL, pV;
saturation_T_pure_Akasaka_options(){omega = _HUGE; rhoV = _HUGE; rhoL = _HUGE; pV = _HUGE, pL = _HUGE;}
saturation_T_pure_Akasaka_options(bool use_guesses=false):use_guesses(use_guesses),omega(_HUGE),rhoV(_HUGE),rhoL(_HUGE),pV(_HUGE),pL(_HUGE){}
};
struct saturation_T_pure_options{
bool use_guesses; ///< true to start off at the values specified by rhoL, rhoV