From e04e59cdd3a154e205ac9562e5476e8e8acafd01 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 14 Feb 2013 01:03:48 +0000 Subject: [PATCH] Removed extraneous parentheses around arguments to 'return' 'return' is a keyword, not a function, so these parens are unnecessary. --- include/cantera/thermo/ThermoPhase.h | 2 +- src/apps/csvdiff.cpp | 6 +- src/apps/tok_input_util.cpp | 92 ++++++++++++++-------------- src/base/PrintCtrl.cpp | 2 +- src/base/application.cpp | 2 +- src/base/clockWC.cpp | 2 +- src/base/stringUtils.cpp | 6 +- src/equil/vcs_VolPhase.cpp | 2 +- src/equil/vcs_prob.cpp | 2 +- src/equil/vcs_solve_TP.cpp | 2 +- src/kinetics/AqueousKinetics.cpp | 2 +- src/kinetics/GasKinetics.cpp | 2 +- src/kinetics/InterfaceKinetics.cpp | 2 +- src/kinetics/solveSP.cpp | 4 +- src/numerics/NonlinearSolver.cpp | 2 +- src/numerics/solveProb.cpp | 4 +- src/spectra/rotor.cpp | 2 +- src/thermo/Elements.cpp | 8 +-- src/thermo/GeneralSpeciesThermo.cpp | 2 +- src/thermo/HMWSoln.cpp | 2 +- src/thermo/IdealSolidSolnPhase.cpp | 6 +- src/thermo/IdealSolnGasVPSS.cpp | 2 +- src/thermo/MixtureFugacityTP.cpp | 4 +- src/thermo/PDSS.cpp | 40 ++++++------ src/thermo/PDSS_ConstVol.cpp | 40 ++++++------ src/thermo/PDSS_HKFT.cpp | 16 ++--- src/thermo/PDSS_IdealGas.cpp | 44 ++++++------- src/thermo/PDSS_IonsFromNeutral.cpp | 18 +++--- src/thermo/PDSS_SSVol.cpp | 42 ++++++------- src/thermo/PDSS_Water.cpp | 20 +++--- src/thermo/Phase.cpp | 4 +- src/thermo/RedlichKwongMFTP.cpp | 6 +- src/thermo/ThermoFactory.cpp | 4 +- src/thermo/ThermoPhase.cpp | 2 +- src/thermo/WaterPropsIAPWS.cpp | 28 ++++----- src/thermo/WaterPropsIAPWSphi.cpp | 4 +- src/transport/DustyGasTransport.cpp | 2 +- src/transport/SolidTransport.cpp | 2 +- 38 files changed, 216 insertions(+), 216 deletions(-) diff --git a/include/cantera/thermo/ThermoPhase.h b/include/cantera/thermo/ThermoPhase.h index e92cb3840..c8bea18fc 100644 --- a/include/cantera/thermo/ThermoPhase.h +++ b/include/cantera/thermo/ThermoPhase.h @@ -187,7 +187,7 @@ public: * @return Returns the current value of the Heat of Formation at 298K and 1 bar */ doublereal Hf298SS(const int k) const { - return (m_spthermo->reportOneHf298(k)); + return m_spthermo->reportOneHf298(k); } //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) diff --git a/src/apps/csvdiff.cpp b/src/apps/csvdiff.cpp index bf7624402..626ef9517 100644 --- a/src/apps/csvdiff.cpp +++ b/src/apps/csvdiff.cpp @@ -178,7 +178,7 @@ static double calc_rdiff(double d1, double d2, double rtol, double atol) double rhs, lhs; rhs = fabs(d1-d2); lhs = atol + rtol * 0.5 * (fabs(d1) + fabs(d2)); - return (rhs/lhs); + return rhs/lhs; } /*****************************************************************************/ @@ -535,7 +535,7 @@ static double get_atol(const double* values, const int nvals, } sum /= nvals; retn = sqrt(sum); - return ((retn + 1.0) * atol); + return (retn + 1.0) * atol; } /*****************************************************************************/ @@ -1032,7 +1032,7 @@ int main(int argc, char* argv[]) } - return(testPassed); + return testPassed; } /************END of main() *************************************************/ /*****************************************************************************/ diff --git a/src/apps/tok_input_util.cpp b/src/apps/tok_input_util.cpp index d02360a72..7d414558d 100644 --- a/src/apps/tok_input_util.cpp +++ b/src/apps/tok_input_util.cpp @@ -185,7 +185,7 @@ bool get_next_keyLine(FILE* ifp, TOKEN* keyLineTok, TOKEN* keyArgTok) */ if (ifp == NULL || keyLineTok == NULL || keyArgTok == NULL) { fprintf(stderr, "get_next_keyLine ERROR, arguments are bad\n"); - return(false); + return false; } /* @@ -195,7 +195,7 @@ bool get_next_keyLine(FILE* ifp, TOKEN* keyLineTok, TOKEN* keyArgTok) do_it_again: do { if ((retn_value = read_string(ifp, save_input, '\n')) < 0) { - return(false); + return false; } if (PrintInputFile) { if (retn_value <=0) { @@ -281,13 +281,13 @@ int tok_to_int(const TOKEN* tokPtr, const int maxVal, const int minVal, */ { if (tokPtr->ntokes == 0) { - return(str_to_int(DEFAULT_STR, maxVal, minVal, defaultVal, error)); + return str_to_int(DEFAULT_STR, maxVal, minVal, defaultVal, error); } else if (tokPtr->ntokes > 1) { (void) fprintf(stderr, "ERROR: tok_to_int, ntokes > 1: %s\n", tokPtr->orig_str); *error = true; } - return(str_to_int(tokPtr->tok_ptr[0], maxVal, minVal, defaultVal, error)); + return str_to_int(tokPtr->tok_ptr[0], maxVal, minVal, defaultVal, error); } /**************************************************************************/ /**************************************************************************/ @@ -350,7 +350,7 @@ int str_to_int(const char* int_string, const int maxVal, const int minVal, } else { *error = true; } - return (retn_value); + return retn_value; } /**************************************************************************/ /**************************************************************************/ @@ -400,13 +400,13 @@ double tok_to_double(const TOKEN* tokPtr, const double maxVal, */ { if (tokPtr->ntokes == 0) { - return(str_to_double(DEFAULT_STR, maxVal, minVal, defaultVal, error)); + return str_to_double(DEFAULT_STR, maxVal, minVal, defaultVal, error); } else if (tokPtr->ntokes > 1) { (void) fprintf(stderr, "ERROR: tok_to_double, ntokes > 1: %s\n", tokPtr->orig_str); *error = true; } - return(str_to_double(tokPtr->tok_ptr[0], maxVal, minVal, defaultVal, error)); + return str_to_double(tokPtr->tok_ptr[0], maxVal, minVal, defaultVal, error); } /**************************************************************************/ /**************************************************************************/ @@ -474,7 +474,7 @@ double str_to_double(const char* dbl_string, const double maxVal, } else { *error = true; } - return (retn_value); + return retn_value; } /*****************************************************************************/ /*****************************************************************************/ @@ -505,13 +505,13 @@ bool tok_to_boolean(const TOKEN* tokPtr, const int default_value, */ { if (tokPtr->ntokes == 0) { - return(str_to_boolean(DEFAULT_STR, default_value, error)); + return str_to_boolean(DEFAULT_STR, default_value, error); } else if (tokPtr->ntokes > 1) { (void) fprintf(stderr, "ERROR: tok_to_boolean, ntokes > 1: %s\n", tokPtr->orig_str); *error = true; } - return(str_to_boolean(tokPtr->tok_ptr[0], default_value, error)); + return str_to_boolean(tokPtr->tok_ptr[0], default_value, error); } /******************************************************************************/ /******************************************************************************/ @@ -589,7 +589,7 @@ char* tok_to_string(const TOKEN* tokPtr, const int maxTok, (void) fprintf(stderr,"\tmaxTok = %d, minTok = %d\n", maxTok, minTok); *error = true; } - return (str); + return str; } /*****************************************************************************/ /*****************************************************************************/ @@ -618,18 +618,18 @@ char* str_to_string(const char* str, const char* defaultVal, if (str == NULL) { *error = true; (void) fprintf(stderr,"ERROR str_to_string: str is uninialized\n"); - return(NULL); + return NULL; } if (strmatch(str, DEFAULT_STR)) { if (strmatch(defaultVal, NO_DEFAULT_STR)) { *error = true; (void) fprintf(stderr,"ERROR str_to_string: no default allowed\n"); - return(copy_string(NO_DEFAULT_STR)); + return copy_string(NO_DEFAULT_STR); } else { - return(copy_string(defaultVal)); + return copy_string(defaultVal); } } - return(copy_string(str)); + return copy_string(str); } /**************************************************************************/ /**************************************************************************/ @@ -671,7 +671,7 @@ int scan_for_int(FILE* ifp, const char* str, const int maxVal, fprintf(stderr,"\tmax = %d, min = %d\n", maxVal, minVal); exit(-1); } else { - return(retn_value); + return retn_value; } } } @@ -768,7 +768,7 @@ double scan_for_double(FILE* ifp, const char* string, const double maxVal, (void) fprintf(stderr,"\tmax = %e, min = %e\n", maxVal, minVal); exit(-1); } else { - return(retn_value); + return retn_value; } } } @@ -807,7 +807,7 @@ char* scan_for_string(FILE* ifp, const char* string, const int maxVal, (void) fprintf(stderr, "\tlength max = %d, min = %d\n", maxVal, minVal); exit(-1); } - return (copy_string(input)); + return copy_string(input); } /**************************************************************************/ /**************************************************************************/ @@ -850,7 +850,7 @@ int scan_for_line(FILE* ifp, const char* str, char input[], if (strlen(str) > MAX_INPUT_STR_LN) { fprintf(stderr,"%sMatch string is too long:\n\t%s\n", ename, str); - return(-1); + return -1; } /* @@ -862,7 +862,7 @@ int scan_for_line(FILE* ifp, const char* str, char input[], if (str[i] == COM_CHAR || str[i] == COM_CHAR2) { fprintf(stderr, "%s Comment in match string\n\t%s\n", ename, str); - return(-1); + return -1; } } @@ -873,7 +873,7 @@ int scan_for_line(FILE* ifp, const char* str, char input[], if ((retn_value = strip(strcpy(match_string, str))) <= 0) { fprintf(stderr, "%sMatch string is white space: \"%s\"\n", ename, str); - return(-1); + return -1; } /* @@ -890,7 +890,7 @@ int scan_for_line(FILE* ifp, const char* str, char input[], fprintf(stderr, "%sEOF found in input file while searching for:\n", ename); fprintf(stderr, "\t\"%s\"\n", match_string); - return(retn_value); + return retn_value; } /* @@ -981,7 +981,7 @@ int read_line(FILE* ifp, char input[], const int print_flag) */ if (retn_value == 0) { - return (strip(input)); + return strip(input); } /* @@ -990,7 +990,7 @@ int read_line(FILE* ifp, char input[], const int print_flag) */ (void) strip(input); - return (retn_value); + return retn_value; } /**************************************************************************/ /**************************************************************************/ @@ -1056,7 +1056,7 @@ int read_string(FILE* ifp, char string[], const char ch) * Make sure the string is null terminated and return */ string[i] = '\0'; - return (rtn_value); + return rtn_value; } /**************************************************************************/ @@ -1083,7 +1083,7 @@ static bool interpret_boolean(const char* token, int* ret_value, *ret_value = false; break; default: - return (false); + return false; } } else { if (strmatch(token,"true") || strmatch(token,"yes")) { @@ -1093,7 +1093,7 @@ static bool interpret_boolean(const char* token, int* ret_value, } else if (strmatch(token,DEFAULT_STR) == 0) { *ret_value = default_value; } else { - return (false); + return false; } } return (true); @@ -1147,10 +1147,10 @@ static bool interpret_int(const char* token, int* retn_value, } else { if ((retn = sscanf(token, "%d", retn_value)) != 1) { *retn_value = retn; - return (false); + return false; } } - return (true); + return true; } /******************************************************************************/ /******************************************************************************/ @@ -1219,12 +1219,12 @@ static bool interpret_double(const char* token, double* retn_value, } else { if ((retn = sscanf(token, "%e", &retn_float)) != 1) { *retn_value = (double) retn; - return (false); + return false; } else { *retn_value = (double) retn_float; } } - return(true); + return true; } /******************************************************************************/ /******************************************************************************/ @@ -1255,7 +1255,7 @@ int strip(char str[]) */ if ((str == NULL) || (str[0] == '\0')) { - return (0); + return 0; } /* Find first non-space character character */ @@ -1287,7 +1287,7 @@ int strip(char str[]) } j++; str[j] = '\0'; - return (j); + return j; } /**************************************************************************/ /**************************************************************************/ @@ -1338,7 +1338,7 @@ char* TokToStrng(const TOKEN* keyptr) for (i = 0, fstr[0]= '\0'; i < (keyptr->ntokes - 1); i++, str++) { (void) strcat(strcat(fstr, *str), " "); } - return(strcat(fstr, *str)); + return strcat(fstr, *str); } /******************************************************************************/ /******************************************************************************/ @@ -1384,7 +1384,7 @@ int stokenize(char* string, const char* delimiters, char* tok_ptr[], } } while ((tok_ptr[i] = strtok(NULL, delimiters)) != NULL); } - return (i); + return i; } /*****************************************************************************/ /*****************************************************************************/ @@ -1399,9 +1399,9 @@ static bool outofbnds(const double value, const double maxVal, */ { if ((value <= maxVal) && (value >= minVal)) { - return (false); + return false; } - return(true); + return true; } /****************************************************************************** * @@ -1419,20 +1419,20 @@ bool strmatch(const char* s1, const char* s2) while (*s1 != '\0') { # if defined (_INCLUDE_XOPEN_SOURCE) && ! defined(__lint) if (_tolower((*s1++)) != _tolower((*s2++))) { - return (false); + return false; } # else if (tolower(*s1) != tolower(*s2)) { - return (false); + return false; } s1++; s2++; # endif } if (*s2 != '\0') { - return (false); + return false; } - return (true); + return true; } /***************************************************************************** @@ -1447,7 +1447,7 @@ bool strstrmatch(const char* s1, const char* s2) struct TOKEN tmpKeyStruct1, tmpKeyStruct2; fillTokStruct(&tmpKeyStruct1, s1); fillTokStruct(&tmpKeyStruct2, s2); - return (toktokmatch(&tmpKeyStruct2, &tmpKeyStruct1)); + return toktokmatch(&tmpKeyStruct2, &tmpKeyStruct1); } /******************************************************************************* @@ -1464,7 +1464,7 @@ bool strtokmatch(const TOKEN* keyptr, const char* s2) { struct TOKEN tmpKeyStruct; fillTokStruct(&tmpKeyStruct, s2); - return (toktokmatch(keyptr, &tmpKeyStruct)); + return toktokmatch(keyptr, &tmpKeyStruct); } /************************************************************************** @@ -1569,9 +1569,9 @@ int in_char_list(const char* const str1, const char** const list, { int i; for (i = 0; i < num_list; i++) if (strstrmatch(str1, list[i])) { - return(i); + return i; } - return (-1); + return -1; } /*****************************************************************************/ /*****************************************************************************/ @@ -1593,7 +1593,7 @@ char* copy_string(const char* string) } else { (void) strcpy(new_string, string); } - return (new_string); + return new_string; } /****************************************************************************** diff --git a/src/base/PrintCtrl.cpp b/src/base/PrintCtrl.cpp index 897f518ff..b2da92cd5 100644 --- a/src/base/PrintCtrl.cpp +++ b/src/base/PrintCtrl.cpp @@ -218,7 +218,7 @@ double PrintCtrl::cropSigDigits(const double d, int nSig) const } double paltabs = (double) nfabs; double daltabs = paltabs * pow(10.0, (double) -E10); - return (sgn * daltabs); + return sgn * daltabs; } // Set the default value of N decade diff --git a/src/base/application.cpp b/src/base/application.cpp index 459787b01..f639aa5bd 100644 --- a/src/base/application.cpp +++ b/src/base/application.cpp @@ -304,7 +304,7 @@ Application::Messages* Application::ThreadMessages::operator ->() cthreadId_t curId = getThisThreadId() ; threadMsgMap_t::iterator iter = m_threadMsgMap.find(curId) ; if (iter != m_threadMsgMap.end()) { - return (iter->second.get()) ; + return iter->second.get(); } pMessages_t pMsgs(new Messages()) ; m_threadMsgMap.insert(std::pair< cthreadId_t, pMessages_t >(curId, pMsgs)) ; diff --git a/src/base/clockWC.cpp b/src/base/clockWC.cpp index 23fedef6c..e09ee6e79 100644 --- a/src/base/clockWC.cpp +++ b/src/base/clockWC.cpp @@ -60,6 +60,6 @@ double clockWC::secondsWC() value += clock_rollovers * clock_width; } last_num_ticks = num_ticks; - return(value); + return value; } } diff --git a/src/base/stringUtils.cpp b/src/base/stringUtils.cpp index da29d0cbd..34c80f9a6 100644 --- a/src/base/stringUtils.cpp +++ b/src/base/stringUtils.cpp @@ -420,7 +420,7 @@ int stripLTWScstring(char str[]) * Quick Returns */ if ((str == 0) || (str[0] == '\0')) { - return (0); + return 0; } /* Find first non-space character character */ @@ -448,7 +448,7 @@ int stripLTWScstring(char str[]) } j++; str[j] = '\0'; - return (j); + return j; } //================================================================================================ // Translate a char string into a single double @@ -556,7 +556,7 @@ doublereal strSItoDbl(const std::string& strSI) fp = toSI(v[1]); } doublereal val = atofCheck(v[0].c_str()); - return (val * fp); + return val * fp; } //================================================================================================ //! Find the first white space in a string diff --git a/src/equil/vcs_VolPhase.cpp b/src/equil/vcs_VolPhase.cpp index bdd86bcaf..9a0fd2e7c 100644 --- a/src/equil/vcs_VolPhase.cpp +++ b/src/equil/vcs_VolPhase.cpp @@ -377,7 +377,7 @@ double vcs_VolPhase::AC_calc_one(size_t kspec) const if (! m_UpToDate_AC) { _updateActCoeff(); } - return(ActCoeff[kspec]); + return ActCoeff[kspec]; } /***************************************************************************/ diff --git a/src/equil/vcs_prob.cpp b/src/equil/vcs_prob.cpp index 66a3e632e..18cb50c54 100644 --- a/src/equil/vcs_prob.cpp +++ b/src/equil/vcs_prob.cpp @@ -447,7 +447,7 @@ size_t VCS_PROB::addElement(const char* elNameNew, int elType, int elactive) ElName[ne-1] = elNameNew; m_elType[ne-1] = elType; ElActive[ne-1] = elactive; - return (ne - 1); + return ne - 1; } // This routines adds entries for the formula matrix for one species diff --git a/src/equil/vcs_solve_TP.cpp b/src/equil/vcs_solve_TP.cpp index 663d7a3cb..8df611af1 100644 --- a/src/equil/vcs_solve_TP.cpp +++ b/src/equil/vcs_solve_TP.cpp @@ -4594,7 +4594,7 @@ double VCS_SOLVE::l2normdg(double dgLocal[]) const } } } - return (std::sqrt(tmp / m_numRxnRdc)); + return std::sqrt(tmp / m_numRxnRdc); } /*****************************************************************************/ diff --git a/src/kinetics/AqueousKinetics.cpp b/src/kinetics/AqueousKinetics.cpp index 91ea9a39d..ce08bd09d 100644 --- a/src/kinetics/AqueousKinetics.cpp +++ b/src/kinetics/AqueousKinetics.cpp @@ -609,7 +609,7 @@ void AqueousKinetics::finalize() bool AqueousKinetics::ready() const { - return (m_finalized); + return m_finalized; } } diff --git a/src/kinetics/GasKinetics.cpp b/src/kinetics/GasKinetics.cpp index fda70b1ea..4b21c6f3c 100644 --- a/src/kinetics/GasKinetics.cpp +++ b/src/kinetics/GasKinetics.cpp @@ -853,7 +853,7 @@ void GasKinetics::finalize() //==================================================================================================================== bool GasKinetics::ready() const { - return (m_finalized); + return m_finalized; } //==================================================================================================================== } diff --git a/src/kinetics/InterfaceKinetics.cpp b/src/kinetics/InterfaceKinetics.cpp index 0d840c998..bfd01042f 100644 --- a/src/kinetics/InterfaceKinetics.cpp +++ b/src/kinetics/InterfaceKinetics.cpp @@ -1311,7 +1311,7 @@ doublereal InterfaceKinetics::electrochem_beta(size_t irxn) const //================================================================================================ bool InterfaceKinetics::ready() const { - return (m_finalized); + return m_finalized; } //================================================================================================ // Advance the surface coverages in time diff --git a/src/kinetics/solveSP.cpp b/src/kinetics/solveSP.cpp index 67db682b5..72007b6ae 100644 --- a/src/kinetics/solveSP.cpp +++ b/src/kinetics/solveSP.cpp @@ -775,7 +775,7 @@ static doublereal calcWeightedNorm(const doublereal wtX[], const doublereal dx[] tmp = dx[i] / wtX[i]; norm += tmp * tmp; } - return (sqrt(norm/dim)); + return sqrt(norm/dim); } /* @@ -891,7 +891,7 @@ calc_t(doublereal netProdRateSolnSP[], doublereal XMolSolnSP[], *label_factor = 1.0; } inv_timeScale = inv_timeScale / *label_factor; - return (inv_timeScale); + return inv_timeScale; } /* calc_t */ diff --git a/src/numerics/NonlinearSolver.cpp b/src/numerics/NonlinearSolver.cpp index def1749c0..e8100849a 100644 --- a/src/numerics/NonlinearSolver.cpp +++ b/src/numerics/NonlinearSolver.cpp @@ -1992,7 +1992,7 @@ void NonlinearSolver::residualComparisonLeg(const doublereal time_curr, const do doublereal NonlinearSolver::trustRegionLength() const { norm_deltaX_trust_ = solnErrorNorm(DATA_PTR(deltaX_trust_)); - return (trustDelta_ * norm_deltaX_trust_); + return trustDelta_ * norm_deltaX_trust_; } //==================================================================================================================== void NonlinearSolver::setDefaultDeltaBoundsMagnitudes() diff --git a/src/numerics/solveProb.cpp b/src/numerics/solveProb.cpp index 34493e675..3814f17dd 100644 --- a/src/numerics/solveProb.cpp +++ b/src/numerics/solveProb.cpp @@ -570,7 +570,7 @@ static doublereal calcWeightedNorm(const doublereal wtX[], const doublereal dx[] tmp = dx[i] / wtX[i]; norm += tmp * tmp; } - return (sqrt(norm/dim)); + return sqrt(norm/dim); } //================================================================================================ /* @@ -662,7 +662,7 @@ calc_t(doublereal netProdRateSolnSP[], doublereal Csoln[], } #endif - return (inv_timeScale); + return inv_timeScale; } //==================================================================================================================== diff --git a/src/spectra/rotor.cpp b/src/spectra/rotor.cpp index 486d1862c..9ae5180dc 100644 --- a/src/spectra/rotor.cpp +++ b/src/spectra/rotor.cpp @@ -91,7 +91,7 @@ doublereal Rotor::relPopulation(int J, doublereal T) */ doublereal Rotor::frequency(int J_lower, int J_upper) { - return (energy_w(J_upper) - energy_w(J_lower)); + return energy_w(J_upper) - energy_w(J_lower); } /** diff --git a/src/thermo/Elements.cpp b/src/thermo/Elements.cpp index d7d6e2949..d631af7ab 100644 --- a/src/thermo/Elements.cpp +++ b/src/thermo/Elements.cpp @@ -167,7 +167,7 @@ doublereal Elements::LookupWtElements(const std::string& ename) string s3 = ename.substr(0,3); for (int i = 0; i < num; i++) { if (s3 == aWTable[i].name) { - return (aWTable[i].atomicWeight); + return aWTable[i].atomicWeight; } } throw CanteraError("LookupWtElements", "element not found"); @@ -180,7 +180,7 @@ doublereal LookupWtElements(const std::string& ename) string s3 = ename.substr(0,3); for (int i = 0; i < num; i++) { if (s3 == aWTable[i].name) { - return (aWTable[i].atomicWeight); + return aWTable[i].atomicWeight; } } throw CanteraError("LookupWtElements", "element not found"); @@ -313,7 +313,7 @@ doublereal Elements::entropyElement298(int m) const "Elements::entropy298", "Entropy at 298 K of element is unknown"); AssertTrace(m >= 0 && m < m_mm); - return (m_entropy298[m]); + return m_entropy298[m]; } //==================================================================================================================== //! Return the element constraint type @@ -516,7 +516,7 @@ void Elements::clear() */ bool Elements::ready() const { - return (m_elementsFrozen); + return m_elementsFrozen; } diff --git a/src/thermo/GeneralSpeciesThermo.cpp b/src/thermo/GeneralSpeciesThermo.cpp index 359aaacd3..a66fcc233 100644 --- a/src/thermo/GeneralSpeciesThermo.cpp +++ b/src/thermo/GeneralSpeciesThermo.cpp @@ -363,7 +363,7 @@ doublereal GeneralSpeciesThermo::refPressure(size_t k) const SpeciesThermoInterpType* GeneralSpeciesThermo::provideSTIT(size_t k) { - return (m_sp[k]); + return m_sp[k]; } #ifdef H298MODIFY_CAPABILITY diff --git a/src/thermo/HMWSoln.cpp b/src/thermo/HMWSoln.cpp index 77f9ff3bb..af9334c2a 100644 --- a/src/thermo/HMWSoln.cpp +++ b/src/thermo/HMWSoln.cpp @@ -589,7 +589,7 @@ doublereal HMWSoln::relative_enthalpy() const m_gamma_tmp[k] *= RT; } double h0bar = mean_X(DATA_PTR(m_gamma_tmp)); - return (hbar - h0bar); + return hbar - h0bar; } doublereal HMWSoln::relative_molal_enthalpy() const diff --git a/src/thermo/IdealSolidSolnPhase.cpp b/src/thermo/IdealSolidSolnPhase.cpp index a428430ad..b44df81bf 100644 --- a/src/thermo/IdealSolidSolnPhase.cpp +++ b/src/thermo/IdealSolidSolnPhase.cpp @@ -125,7 +125,7 @@ enthalpy_mole() const { const double* eptr = &(enthalpy_RT_ref()[0]); doublereal htp = (GasConstant * temperature() * mean_X(eptr)); - return (htp + (pressure() - m_Pref)/molarDensity()); + return htp + (pressure() - m_Pref)/molarDensity(); } doublereal IdealSolidSolnPhase::intEnergy_mole() const @@ -133,7 +133,7 @@ doublereal IdealSolidSolnPhase::intEnergy_mole() const const double* eptr = DATA_PTR(enthalpy_RT_ref().begin()); doublereal htp = (GasConstant * temperature() * mean_X(eptr)); - return (htp - m_Pref / molarDensity()); + return htp - m_Pref / molarDensity(); } doublereal IdealSolidSolnPhase::entropy_mole() const @@ -146,7 +146,7 @@ doublereal IdealSolidSolnPhase::gibbs_mole() const { const double* dptr = DATA_PTR(gibbs_RT_ref()); doublereal g = mean_X(dptr); - return (GasConstant * temperature() * (g + sum_xlogx())); + return GasConstant * temperature() * (g + sum_xlogx()); } doublereal IdealSolidSolnPhase::cp_mole() const diff --git a/src/thermo/IdealSolnGasVPSS.cpp b/src/thermo/IdealSolnGasVPSS.cpp index be84a1287..5ce390b16 100644 --- a/src/thermo/IdealSolnGasVPSS.cpp +++ b/src/thermo/IdealSolnGasVPSS.cpp @@ -107,7 +107,7 @@ doublereal IdealSolnGasVPSS::intEnergy_mole() const { doublereal p0 = pressure(); doublereal md = molarDensity(); - return (enthalpy_mole() - p0 / md); + return enthalpy_mole() - p0 / md; } doublereal IdealSolnGasVPSS::entropy_mole() const diff --git a/src/thermo/MixtureFugacityTP.cpp b/src/thermo/MixtureFugacityTP.cpp index 4a7652f8d..0c48ecb35 100644 --- a/src/thermo/MixtureFugacityTP.cpp +++ b/src/thermo/MixtureFugacityTP.cpp @@ -967,11 +967,11 @@ doublereal MixtureFugacityTP::calculatePsat(doublereal TKelvin, doublereal& mola } if (!foundGas || !foundLiquid) { printf("error coundn't find a starting pressure\n"); - return (0.0); + return 0.0; } if (presGas != presLiquid) { printf("error coundn't find a starting pressure\n"); - return (0.0); + return 0.0; } pres = presGas; diff --git a/src/thermo/PDSS.cpp b/src/thermo/PDSS.cpp index 518bdadad..f2e28e6ff 100644 --- a/src/thermo/PDSS.cpp +++ b/src/thermo/PDSS.cpp @@ -248,13 +248,13 @@ void PDSS::initPtrs() doublereal PDSS::enthalpy_mole() const { err("enthalpy_mole()"); - return (0.0); + return 0.0; } doublereal PDSS::enthalpy_RT() const { double RT = GasConstant * m_temp; - return (enthalpy_mole()/RT); + return enthalpy_mole()/RT; } // Return the molar internal Energy in units of J kmol-1 @@ -267,7 +267,7 @@ doublereal PDSS::enthalpy_RT() const doublereal PDSS::intEnergy_mole() const { err("intEnergy_mole()"); - return (0.0); + return 0.0; } // Return the molar entropy in units of J kmol-1 K-1 @@ -280,12 +280,12 @@ doublereal PDSS::intEnergy_mole() const doublereal PDSS::entropy_mole() const { err("entropy_mole()"); - return (0.0); + return 0.0; } doublereal PDSS::entropy_R() const { - return(entropy_mole()/GasConstant); + return entropy_mole()/GasConstant; } // Return the molar gibbs free energy in units of J kmol-1 @@ -298,13 +298,13 @@ doublereal PDSS::entropy_R() const doublereal PDSS::gibbs_mole() const { err("gibbs_mole()"); - return (0.0); + return 0.0; } doublereal PDSS::gibbs_RT() const { double RT = GasConstant * m_temp; - return (gibbs_mole()/RT); + return gibbs_mole()/RT; } // Return the molar const pressure heat capacity in units of J kmol-1 K-1 @@ -317,12 +317,12 @@ doublereal PDSS::gibbs_RT() const doublereal PDSS::cp_mole() const { err("cp_mole()"); - return (0.0); + return 0.0; } doublereal PDSS::cp_R() const { - return (cp_mole()/GasConstant); + return cp_mole()/GasConstant; } doublereal PDSS::molarVolume() const @@ -347,7 +347,7 @@ doublereal PDSS::density() const doublereal PDSS::cv_mole() const { err("cv_mole()"); - return (0.0); + return 0.0; } doublereal PDSS::gibbs_RT_ref() const @@ -390,7 +390,7 @@ enthalpyDelp_mole() const { doublereal RT = m_temp * GasConstant; doublereal tmp = enthalpy_RT_ref(); - return(enthalpy_mole() - RT * tmp); + return enthalpy_mole() - RT * tmp; } @@ -402,7 +402,7 @@ enthalpyDelp_mole() const doublereal PDSS::entropyDelp_mole() const { doublereal tmp = entropy_R_ref(); - return(entropy_mole() - GasConstant * tmp); + return entropy_mole() - GasConstant * tmp; } @@ -415,7 +415,7 @@ doublereal PDSS::gibbsDelp_mole() const { doublereal RT = m_temp * GasConstant; doublereal tmp = gibbs_RT_ref(); - return(gibbs_mole() - RT * tmp); + return gibbs_mole() - RT * tmp; } // Return the molar const volume heat capacity in units of J kmol-1 K-1 @@ -428,7 +428,7 @@ doublereal PDSS::gibbsDelp_mole() const doublereal PDSS::cpDelp_mole() const { doublereal tmp = cp_R_ref(); - return(cp_mole() - GasConstant * tmp); + return cp_mole() - GasConstant * tmp; } /** @@ -438,7 +438,7 @@ doublereal PDSS::cpDelp_mole() const */ doublereal PDSS::pressure() const { - return (m_pres); + return m_pres; } // Return the volumetric thermal expansion coefficient. Units: 1/K. @@ -451,28 +451,28 @@ doublereal PDSS::pressure() const doublereal PDSS::thermalExpansionCoeff() const { throw CanteraError("PDSS::thermalExpansionCoeff()", "unimplemented"); - return (0.0); + return 0.0; } /// critical temperature doublereal PDSS::critTemperature() const { err("critTemperature()"); - return (0.0); + return 0.0; } /// critical pressure doublereal PDSS::critPressure() const { err("critPressure()"); - return (0.0); + return 0.0; } /// critical density doublereal PDSS::critDensity() const { err("critDensity()"); - return (0.0); + return 0.0; } void PDSS::setPressure(doublereal pres) @@ -520,7 +520,7 @@ void PDSS::setState_TR(doublereal temp, doublereal rho) doublereal PDSS::satPressure(doublereal t) { err("satPressure()"); - return (0.0); + return 0.0; } diff --git a/src/thermo/PDSS_ConstVol.cpp b/src/thermo/PDSS_ConstVol.cpp index 8489ed555..29d0c8253 100644 --- a/src/thermo/PDSS_ConstVol.cpp +++ b/src/thermo/PDSS_ConstVol.cpp @@ -209,14 +209,14 @@ PDSS_ConstVol::enthalpy_mole() const { doublereal val = enthalpy_RT(); doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } doublereal PDSS_ConstVol::enthalpy_RT() const { doublereal val = m_hss_RT_ptr[m_spindex]; - return (val); + return val; } @@ -226,7 +226,7 @@ PDSS_ConstVol::intEnergy_mole() const doublereal pVRT = (m_pres * m_Vss_ptr[m_spindex]) / (GasConstant * m_temp); doublereal val = m_h0_RT_ptr[m_spindex] - pVRT; doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } @@ -234,14 +234,14 @@ doublereal PDSS_ConstVol::entropy_mole() const { doublereal val = entropy_R(); - return (val * GasConstant); + return val * GasConstant; } doublereal PDSS_ConstVol::entropy_R() const { doublereal val = m_sss_R_ptr[m_spindex]; - return (val); + return val; } /* @@ -253,68 +253,68 @@ PDSS_ConstVol::gibbs_mole() const { doublereal val = gibbs_RT(); doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } doublereal PDSS_ConstVol::gibbs_RT() const { doublereal val = m_gss_RT_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_ConstVol::cp_mole() const { doublereal val = m_cpss_R_ptr[m_spindex]; - return (val * GasConstant); + return val * GasConstant; } doublereal PDSS_ConstVol::cp_R() const { doublereal val = m_cpss_R_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_ConstVol::cv_mole() const { doublereal val = (cp_mole() - m_V0_ptr[m_spindex]); - return (val); + return val; } doublereal PDSS_ConstVol::molarVolume() const { doublereal val = m_Vss_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_ConstVol::density() const { doublereal val = m_Vss_ptr[m_spindex]; - return (m_mw/val); + return m_mw/val; } doublereal PDSS_ConstVol::gibbs_RT_ref() const { doublereal val = m_g0_RT_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_ConstVol::enthalpy_RT_ref() const { doublereal val = m_h0_RT_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_ConstVol::entropy_R_ref() const { doublereal val = m_s0_R_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_ConstVol::cp_R_ref() const @@ -326,7 +326,7 @@ doublereal PDSS_ConstVol::cp_R_ref() const doublereal PDSS_ConstVol::molarVolume_ref() const { doublereal val = m_V0_ptr[m_spindex]; - return (val); + return val; } @@ -335,21 +335,21 @@ doublereal PDSS_ConstVol::molarVolume_ref() const doublereal PDSS_ConstVol::critTemperature() const { throw CanteraError("PDSS_ConstVol::critTemperature()", "unimplemented"); - return (0.0); + return 0.0; } // critical pressure doublereal PDSS_ConstVol::critPressure() const { throw CanteraError("PDSS_ConstVol::critPressure()", "unimplemented"); - return (0.0); + return 0.0; } // critical density doublereal PDSS_ConstVol::critDensity() const { throw CanteraError("PDSS_ConstVol::critDensity()", "unimplemented"); - return (0.0); + return 0.0; } void PDSS_ConstVol::setPressure(doublereal p) @@ -397,7 +397,7 @@ void PDSS_ConstVol::setState_TR(doublereal temp, doublereal rho) // saturation pressure doublereal PDSS_ConstVol::satPressure(doublereal t) { - return (1.0E-200); + return 1.0E-200; } } diff --git a/src/thermo/PDSS_HKFT.cpp b/src/thermo/PDSS_HKFT.cpp index 9f8fae7b3..c40c834a0 100644 --- a/src/thermo/PDSS_HKFT.cpp +++ b/src/thermo/PDSS_HKFT.cpp @@ -260,7 +260,7 @@ doublereal PDSS_HKFT::intEnergy_mole() const { doublereal hh = enthalpy_RT(); doublereal mv = molarVolume(); - return (hh - mv * m_pres); + return hh - mv * m_pres; } /* @@ -270,7 +270,7 @@ doublereal PDSS_HKFT::intEnergy_mole() const doublereal PDSS_HKFT::entropy_mole() const { doublereal delS = deltaS(); - return (m_Entrop_tr_pr * 1.0E3 * 4.184 + delS); + return m_Entrop_tr_pr * 1.0E3 * 4.184 + delS; } /* @@ -280,7 +280,7 @@ doublereal PDSS_HKFT::entropy_mole() const doublereal PDSS_HKFT::gibbs_mole() const { doublereal delG = deltaG(); - return (m_Mu0_tr_pr + delG); + return m_Mu0_tr_pr + delG; } /* @@ -391,7 +391,7 @@ doublereal PDSS_HKFT::cv_mole() const { throw CanteraError("PDSS_HKFT::cv_mole()", "unimplemented"); - return (0.0); + return 0.0; } doublereal PDSS_HKFT::molarVolume() const @@ -454,7 +454,7 @@ doublereal PDSS_HKFT::density() const { doublereal val = molarVolume(); - return (m_mw/val); + return m_mw/val; } doublereal @@ -545,21 +545,21 @@ doublereal PDSS_HKFT::critTemperature() const { throw CanteraError("PDSS_HKFT::critTemperature()", "unimplemented"); - return (0.0); + return 0.0; } // critical pressure doublereal PDSS_HKFT::critPressure() const { throw CanteraError("PDSS_HKFT::critPressure()", "unimplemented"); - return (0.0); + return 0.0; } // critical density doublereal PDSS_HKFT::critDensity() const { throw CanteraError("PDSS_HKFT::critDensity()", "unimplemented"); - return (0.0); + return 0.0; } diff --git a/src/thermo/PDSS_IdealGas.cpp b/src/thermo/PDSS_IdealGas.cpp index b7184417b..2056dd57b 100644 --- a/src/thermo/PDSS_IdealGas.cpp +++ b/src/thermo/PDSS_IdealGas.cpp @@ -169,14 +169,14 @@ PDSS_IdealGas::enthalpy_mole() const { doublereal val = enthalpy_RT(); doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } doublereal PDSS_IdealGas::enthalpy_RT() const { doublereal val = m_h0_RT_ptr[m_spindex]; - return (val); + return val; } @@ -189,7 +189,7 @@ PDSS_IdealGas::intEnergy_mole() const { doublereal val = m_h0_RT_ptr[m_spindex] - 1.0; doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } /* @@ -200,14 +200,14 @@ doublereal PDSS_IdealGas::entropy_mole() const { doublereal val = entropy_R(); - return (val * GasConstant); + return val * GasConstant; } doublereal PDSS_IdealGas::entropy_R() const { doublereal val = m_s0_R_ptr[m_spindex] - log(m_pres/m_p0); - return (val); + return val; } /* @@ -219,14 +219,14 @@ PDSS_IdealGas::gibbs_mole() const { doublereal val = gibbs_RT(); doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } doublereal PDSS_IdealGas::gibbs_RT() const { doublereal val = m_g0_RT_ptr[m_spindex] + log(m_pres/m_p0); - return (val); + return val; } /* @@ -237,27 +237,27 @@ doublereal PDSS_IdealGas::cp_mole() const { doublereal val = cp_R(); - return (val * GasConstant); + return val * GasConstant; } doublereal PDSS_IdealGas::cp_R() const { doublereal val = m_cp0_R_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_IdealGas::molarVolume() const { - return (GasConstant * m_temp / m_pres); + return GasConstant * m_temp / m_pres; } doublereal PDSS_IdealGas::density() const { - return (m_pres * m_mw / (GasConstant * m_temp)); + return m_pres * m_mw / (GasConstant * m_temp); } /* @@ -267,7 +267,7 @@ PDSS_IdealGas::density() const doublereal PDSS_IdealGas::cv_mole() const { - return (cp_mole() - GasConstant); + return cp_mole() - GasConstant; } @@ -275,29 +275,29 @@ doublereal PDSS_IdealGas::gibbs_RT_ref() const { doublereal val = m_g0_RT_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_IdealGas::enthalpy_RT_ref() const { doublereal val = m_h0_RT_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_IdealGas::entropy_R_ref() const { doublereal val = m_s0_R_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_IdealGas::cp_R_ref() const { - return (cp_R()); + return cp_R(); } doublereal PDSS_IdealGas::molarVolume_ref() const { - return (GasConstant * m_temp / m_p0); + return GasConstant * m_temp / m_p0; } /* @@ -308,7 +308,7 @@ doublereal PDSS_IdealGas::molarVolume_ref() const doublereal PDSS_IdealGas::pressure() const { throw CanteraError("PDSS_IdealGas::pressure()", "unimplemented"); - return (0.0); + return 0.0; } void PDSS_IdealGas::setPressure(doublereal p) @@ -323,21 +323,21 @@ void PDSS_IdealGas::setPressure(doublereal p) doublereal PDSS_IdealGas::critTemperature() const { throw CanteraError("PDSS_IdealGas::critTemperature()", "unimplemented"); - return (0.0); + return 0.0; } // critical pressure doublereal PDSS_IdealGas::critPressure() const { throw CanteraError("PDSS_IdealGas::critPressure()", "unimplemented"); - return (0.0); + return 0.0; } // critical density doublereal PDSS_IdealGas::critDensity() const { throw CanteraError("PDSS_IdealGas::critDensity()", "unimplemented"); - return (0.0); + return 0.0; } @@ -386,7 +386,7 @@ doublereal PDSS_IdealGas::satPressure(doublereal t) { throw CanteraError("PDSS_IdealGas::satPressure()", "unimplemented"); /*NOTREACHED*/ - return (0.0); + return 0.0; } diff --git a/src/thermo/PDSS_IonsFromNeutral.cpp b/src/thermo/PDSS_IonsFromNeutral.cpp index 9478794de..70d0e23cb 100644 --- a/src/thermo/PDSS_IonsFromNeutral.cpp +++ b/src/thermo/PDSS_IonsFromNeutral.cpp @@ -283,7 +283,7 @@ PDSS_IonsFromNeutral::enthalpy_mole() const { doublereal val = enthalpy_RT(); doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } //======================================================================================================= doublereal @@ -307,7 +307,7 @@ PDSS_IonsFromNeutral::intEnergy_mole() const { doublereal val = m_h0_RT_ptr[m_spindex] - 1.0; doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } //======================================================================================================= /* @@ -318,7 +318,7 @@ doublereal PDSS_IonsFromNeutral::entropy_mole() const { doublereal val = entropy_R(); - return (val * GasConstant); + return val * GasConstant; } //======================================================================================================= doublereal @@ -345,7 +345,7 @@ PDSS_IonsFromNeutral::gibbs_mole() const { doublereal val = gibbs_RT(); doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } //======================================================================================================= doublereal @@ -371,7 +371,7 @@ doublereal PDSS_IonsFromNeutral::cp_mole() const { doublereal val = cp_R(); - return (val * GasConstant); + return val * GasConstant; } //======================================================================================================= doublereal @@ -498,21 +498,21 @@ void PDSS_IonsFromNeutral::setPressure(doublereal p) doublereal PDSS_IonsFromNeutral::critTemperature() const { throw CanteraError("PDSS_IonsFromNeutral::critTemperature()", "unimplemented"); - return (0.0); + return 0.0; } //==================================================================================================================== // critical pressure doublereal PDSS_IonsFromNeutral::critPressure() const { throw CanteraError("PDSS_IonsFromNeutral::critPressure()", "unimplemented"); - return (0.0); + return 0.0; } //==================================================================================================================== // critical density doublereal PDSS_IonsFromNeutral::critDensity() const { throw CanteraError("PDSS_IonsFromNeutral::critDensity()", "unimplemented"); - return (0.0); + return 0.0; } //==================================================================================================================== @@ -549,7 +549,7 @@ doublereal PDSS_IonsFromNeutral::satPressure(doublereal t) { throw CanteraError("PDSS_IonsFromNeutral::satPressure()", "unimplemented"); /*NOTREACHED*/ - return (0.0); + return 0.0; } //==================================================================================================================== diff --git a/src/thermo/PDSS_SSVol.cpp b/src/thermo/PDSS_SSVol.cpp index 0900beaa5..78d8adeca 100644 --- a/src/thermo/PDSS_SSVol.cpp +++ b/src/thermo/PDSS_SSVol.cpp @@ -236,14 +236,14 @@ PDSS_SSVol::enthalpy_mole() const { doublereal val = enthalpy_RT(); doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } doublereal PDSS_SSVol::enthalpy_RT() const { doublereal val = m_hss_RT_ptr[m_spindex]; - return (val); + return val; } doublereal @@ -252,7 +252,7 @@ PDSS_SSVol::intEnergy_mole() const doublereal pVRT = (m_pres * m_Vss_ptr[m_spindex]) / (GasConstant * m_temp); doublereal val = m_h0_RT_ptr[m_spindex] - pVRT; doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } @@ -260,14 +260,14 @@ doublereal PDSS_SSVol::entropy_mole() const { doublereal val = entropy_R(); - return (val * GasConstant); + return val * GasConstant; } doublereal PDSS_SSVol::entropy_R() const { doublereal val = m_sss_R_ptr[m_spindex]; - return (val); + return val; } /** @@ -279,80 +279,80 @@ PDSS_SSVol::gibbs_mole() const { doublereal val = gibbs_RT(); doublereal RT = GasConstant * m_temp; - return (val * RT); + return val * RT; } doublereal PDSS_SSVol::gibbs_RT() const { doublereal val = m_gss_RT_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_SSVol::cp_mole() const { doublereal val = m_cpss_R_ptr[m_spindex]; - return (val * GasConstant); + return val * GasConstant; } doublereal PDSS_SSVol::cp_R() const { doublereal val = m_cpss_R_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_SSVol::cv_mole() const { doublereal val = (cp_mole() - m_V0_ptr[m_spindex]); - return (val); + return val; } doublereal PDSS_SSVol::molarVolume() const { doublereal val = m_Vss_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_SSVol::density() const { doublereal val = m_Vss_ptr[m_spindex]; - return (m_mw/val); + return m_mw/val; } doublereal PDSS_SSVol::gibbs_RT_ref() const { doublereal val = m_g0_RT_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_SSVol::enthalpy_RT_ref() const { doublereal val = m_h0_RT_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_SSVol::entropy_R_ref() const { doublereal val = m_s0_R_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_SSVol::cp_R_ref() const { doublereal val = m_cp0_R_ptr[m_spindex]; - return (val); + return val; } doublereal PDSS_SSVol::molarVolume_ref() const { doublereal val = m_V0_ptr[m_spindex]; - return (val); + return val; } void PDSS_SSVol::calcMolarVolume() const @@ -381,21 +381,21 @@ void PDSS_SSVol::calcMolarVolume() const doublereal PDSS_SSVol::critTemperature() const { throw CanteraError("PDSS_SSVol::critTemperature()", "unimplemented"); - return (0.0); + return 0.0; } /// critical pressure doublereal PDSS_SSVol::critPressure() const { throw CanteraError("PDSS_SSVol::critPressure()", "unimplemented"); - return (0.0); + return 0.0; } /// critical density doublereal PDSS_SSVol::critDensity() const { throw CanteraError("PDSS_SSVol::critDensity()", "unimplemented"); - return (0.0); + return 0.0; } @@ -462,7 +462,7 @@ void PDSS_SSVol::setState_TR(doublereal temp, doublereal rho) /// saturation pressure doublereal PDSS_SSVol::satPressure(doublereal t) { - return (1.0E-200); + return 1.0E-200; } } diff --git a/src/thermo/PDSS_Water.cpp b/src/thermo/PDSS_Water.cpp index 2ca6d77c9..6939b3f9b 100644 --- a/src/thermo/PDSS_Water.cpp +++ b/src/thermo/PDSS_Water.cpp @@ -314,25 +314,25 @@ void PDSS_Water::initThermoXML(const XML_Node& phaseNode, const std::string& id) doublereal PDSS_Water::enthalpy_mole() const { doublereal h = m_sub->enthalpy(); - return (h + EW_Offset); + return h + EW_Offset; } doublereal PDSS_Water::intEnergy_mole() const { doublereal u = m_sub->intEnergy(); - return (u + EW_Offset); + return u + EW_Offset; } doublereal PDSS_Water::entropy_mole() const { doublereal s = m_sub->entropy(); - return (s + SW_Offset); + return s + SW_Offset; } doublereal PDSS_Water::gibbs_mole() const { doublereal g = m_sub->Gibbs(); - return (g + EW_Offset - SW_Offset*m_temp); + return g + EW_Offset - SW_Offset*m_temp; } doublereal PDSS_Water::cp_mole() const @@ -350,7 +350,7 @@ doublereal PDSS_Water::cv_mole() const doublereal PDSS_Water::molarVolume() const { doublereal mv = m_sub->molarVolume(); - return (mv); + return mv; } doublereal PDSS_Water::gibbs_RT_ref() const @@ -359,7 +359,7 @@ doublereal PDSS_Water::gibbs_RT_ref() const m_sub->density(T, m_p0); doublereal h = m_sub->enthalpy(); m_sub->setState_TR(m_temp, m_dens); - return ((h + EW_Offset - SW_Offset*T)/(T * GasConstant)); + return (h + EW_Offset - SW_Offset*T)/(T * GasConstant); } doublereal PDSS_Water::enthalpy_RT_ref() const @@ -368,7 +368,7 @@ doublereal PDSS_Water::enthalpy_RT_ref() const m_sub->density(T, m_p0); doublereal h = m_sub->enthalpy(); m_sub->setState_TR(m_temp, m_dens); - return ((h + EW_Offset)/(T * GasConstant)); + return (h + EW_Offset)/(T * GasConstant); } doublereal PDSS_Water::entropy_R_ref() const @@ -377,7 +377,7 @@ doublereal PDSS_Water::entropy_R_ref() const m_sub->density(T, m_p0); doublereal s = m_sub->entropy(); m_sub->setState_TR(m_temp, m_dens); - return ((s + SW_Offset)/GasConstant); + return (s + SW_Offset)/GasConstant; } doublereal PDSS_Water::cp_R_ref() const @@ -386,7 +386,7 @@ doublereal PDSS_Water::cp_R_ref() const m_sub->density(T, m_p0); doublereal cp = m_sub->cp(); m_sub->setState_TR(m_temp, m_dens); - return (cp/GasConstant); + return cp/GasConstant; } doublereal PDSS_Water::molarVolume_ref() const @@ -395,7 +395,7 @@ doublereal PDSS_Water::molarVolume_ref() const m_sub->density(T, m_p0); doublereal mv = m_sub->molarVolume(); m_sub->setState_TR(m_temp, m_dens); - return (mv); + return mv; } diff --git a/src/thermo/Phase.cpp b/src/thermo/Phase.cpp index b3367fe62..ce2136074 100644 --- a/src/thermo/Phase.cpp +++ b/src/thermo/Phase.cpp @@ -187,7 +187,7 @@ doublereal Phase::entropyElement298(size_t m) const "Elements::entropy298", "Entropy at 298 K of element is unknown"); AssertTrace(m < m_mm); - return (m_entropy298[m]); + return m_entropy298[m]; } const vector_fp& Phase::atomicWeights() const @@ -271,7 +271,7 @@ void Phase::checkSpeciesArraySize(size_t kk) const std::string Phase::speciesSPName(int k) const { std::string sn = speciesName(k); - return(m_name + ":" + sn); + return m_name + ":" + sn; } void Phase::saveState(vector_fp& state) const diff --git a/src/thermo/RedlichKwongMFTP.cpp b/src/thermo/RedlichKwongMFTP.cpp index 2f7e436b5..c8ac7d132 100644 --- a/src/thermo/RedlichKwongMFTP.cpp +++ b/src/thermo/RedlichKwongMFTP.cpp @@ -241,14 +241,14 @@ doublereal RedlichKwongMFTP::enthalpy_mole() const doublereal rt = _RT(); doublereal h_ideal = rt * mean_X(DATA_PTR(m_h0_RT)); doublereal h_nonideal = hresid(); - return (h_ideal + h_nonideal); + return h_ideal + h_nonideal; } doublereal RedlichKwongMFTP::intEnergy_mole() const { doublereal p0 = pressure(); doublereal md = molarDensity(); - return (enthalpy_mole() - p0 / md); + return enthalpy_mole() - p0 / md; } doublereal RedlichKwongMFTP::entropy_mole() const @@ -257,7 +257,7 @@ doublereal RedlichKwongMFTP::entropy_mole() const doublereal sr_ideal = GasConstant * (mean_X(DATA_PTR(m_s0_R)) - sum_xlogx() - std::log(pressure()/m_spthermo->refPressure())); doublereal sr_nonideal = sresid(); - return (sr_ideal + sr_nonideal); + return sr_ideal + sr_nonideal; } doublereal RedlichKwongMFTP::gibbs_mole() const diff --git a/src/thermo/ThermoFactory.cpp b/src/thermo/ThermoFactory.cpp index fbfcdc293..38ae3d69c 100644 --- a/src/thermo/ThermoFactory.cpp +++ b/src/thermo/ThermoFactory.cpp @@ -796,7 +796,7 @@ const XML_Node* speciesXML_Node(const std::string& kname, const XML_Node* phaseSpeciesData) { if (!phaseSpeciesData) { - return ((const XML_Node*) 0); + return 0; } string jname = phaseSpeciesData->name(); if (jname != "speciesData") { @@ -812,7 +812,7 @@ const XML_Node* speciesXML_Node(const std::string& kname, return &sp; } } - return ((const XML_Node*) 0); + return 0; } } diff --git a/src/thermo/ThermoPhase.cpp b/src/thermo/ThermoPhase.cpp index a4f341238..27631a176 100644 --- a/src/thermo/ThermoPhase.cpp +++ b/src/thermo/ThermoPhase.cpp @@ -805,7 +805,7 @@ bool ThermoPhase::getElementPotentials(doublereal* lambda) const lambda[m] = m_lambdaRRT[m] * rt; } } - return (m_hasElementPotentials); + return m_hasElementPotentials; } void ThermoPhase::getdlnActCoeffdlnN(const size_t ld, doublereal* const dlnActCoeffdlnN) diff --git a/src/thermo/WaterPropsIAPWS.cpp b/src/thermo/WaterPropsIAPWS.cpp index 50ba57e20..37cae13e7 100644 --- a/src/thermo/WaterPropsIAPWS.cpp +++ b/src/thermo/WaterPropsIAPWS.cpp @@ -119,7 +119,7 @@ doublereal WaterPropsIAPWS::helmholtzFE() const doublereal retn = m_phi->phi(tau, delta); doublereal temperature = T_c/tau; doublereal RT = Rgas * temperature; - return (retn * RT); + return retn * RT; } /* @@ -133,7 +133,7 @@ doublereal WaterPropsIAPWS::pressure() const doublereal retn = m_phi->pressureM_rhoRT(tau, delta); doublereal rho = delta * Rho_c; doublereal temperature = T_c / tau; - return (retn * rho * Rgas * temperature/M_water); + return retn * rho * Rgas * temperature/M_water; } /* @@ -307,7 +307,7 @@ doublereal WaterPropsIAPWS::density_const(doublereal pressure, */ doublereal WaterPropsIAPWS::density() const { - return (delta * Rho_c); + return delta * Rho_c; } // Returns the temperature (Kelvin) @@ -316,7 +316,7 @@ doublereal WaterPropsIAPWS::density() const */ doublereal WaterPropsIAPWS::temperature() const { - return (T_c / tau); + return T_c / tau; } /* @@ -375,7 +375,7 @@ doublereal WaterPropsIAPWS::isothermalCompressibility() const { doublereal dpdrho_val = dpdrho(); doublereal dens = delta * Rho_c; - return (1.0 / (dens * dpdrho_val)); + return 1.0 / (dens * dpdrho_val); } // Returns the value of dp / drho at constant T at the current @@ -405,7 +405,7 @@ doublereal WaterPropsIAPWS::dpdrho() const doublereal WaterPropsIAPWS:: coeffPresExp() const { doublereal retn = m_phi->dimdpdT(tau, delta); - return (retn); + return retn; } // Returns the coefficient of thermal expansion. @@ -419,7 +419,7 @@ doublereal WaterPropsIAPWS:: coeffThermExp() const doublereal kappa = isothermalCompressibility(); doublereal beta = coeffPresExp(); doublereal dens = delta * Rho_c; - return (kappa * dens * Rgas * beta / M_water); + return kappa * dens * Rgas * beta / M_water; } // Calculate the Gibbs free energy in mks units of J kmol-1 K-1. @@ -428,7 +428,7 @@ doublereal WaterPropsIAPWS::Gibbs() const { doublereal gRT = m_phi->gibbs_RT(); doublereal temperature = T_c/tau; - return (gRT * Rgas * temperature); + return gRT * Rgas * temperature; } @@ -840,7 +840,7 @@ doublereal WaterPropsIAPWS::enthalpy() const { doublereal temperature = T_c/tau; doublereal hRT = m_phi->enthalpy_RT(); - return (hRT * Rgas * temperature); + return hRT * Rgas * temperature; } /* @@ -851,7 +851,7 @@ doublereal WaterPropsIAPWS::intEnergy() const { doublereal temperature = T_c / tau; doublereal uRT = m_phi->intEnergy_RT(); - return (uRT * Rgas * temperature); + return uRT * Rgas * temperature; } /* @@ -861,7 +861,7 @@ doublereal WaterPropsIAPWS::intEnergy() const doublereal WaterPropsIAPWS::entropy() const { doublereal sR = m_phi->entropy_R(); - return (sR * Rgas); + return sR * Rgas; } /* @@ -871,7 +871,7 @@ doublereal WaterPropsIAPWS::entropy() const doublereal WaterPropsIAPWS::cv() const { doublereal cvR = m_phi->cv_R(); - return (cvR * Rgas); + return cvR * Rgas; } // Calculate the constant pressure heat capacity in mks units of J kmol-1 K-1 @@ -879,7 +879,7 @@ doublereal WaterPropsIAPWS::cv() const doublereal WaterPropsIAPWS::cp() const { doublereal cpR = m_phi->cp_R(); - return (cpR * Rgas); + return cpR * Rgas; } // Calculate the molar volume (kmol m-3) @@ -887,7 +887,7 @@ doublereal WaterPropsIAPWS::cp() const doublereal WaterPropsIAPWS::molarVolume() const { doublereal rho = delta * Rho_c; - return (M_water / rho); + return M_water / rho; } } diff --git a/src/thermo/WaterPropsIAPWSphi.cpp b/src/thermo/WaterPropsIAPWSphi.cpp index 7c4d412de..3355e28b3 100644 --- a/src/thermo/WaterPropsIAPWSphi.cpp +++ b/src/thermo/WaterPropsIAPWSphi.cpp @@ -633,7 +633,7 @@ doublereal WaterPropsIAPWSphi::phiR_d() const doublereal WaterPropsIAPWSphi::phi0_d() const { doublereal delta = DELTAsave; - return (1.0/delta); + return 1.0/delta; } /* @@ -782,7 +782,7 @@ doublereal WaterPropsIAPWSphi::phiR_dd() const doublereal WaterPropsIAPWSphi::phi0_dd() const { doublereal delta = DELTAsave; - return (-1.0/(delta*delta)); + return -1.0/(delta*delta); } /* diff --git a/src/transport/DustyGasTransport.cpp b/src/transport/DustyGasTransport.cpp index c620514be..4413f05ca 100644 --- a/src/transport/DustyGasTransport.cpp +++ b/src/transport/DustyGasTransport.cpp @@ -118,7 +118,7 @@ DustyGasTransport::~DustyGasTransport() Transport* DustyGasTransport::duplMyselfAsTransport() const { DustyGasTransport* tr = new DustyGasTransport(*this); - return (dynamic_cast(tr)); + return dynamic_cast(tr); } //==================================================================================================================== // Specifies the %ThermPhase object. diff --git a/src/transport/SolidTransport.cpp b/src/transport/SolidTransport.cpp index 9158e11dc..863f782be 100644 --- a/src/transport/SolidTransport.cpp +++ b/src/transport/SolidTransport.cpp @@ -79,7 +79,7 @@ SolidTransport& SolidTransport::operator=(const SolidTransport& b) Transport* SolidTransport::duplMyselfAsTransport() const { SolidTransport* tr = new SolidTransport(*this); - return (dynamic_cast(tr)); + return dynamic_cast(tr); } //====================================================================================================================