diff --git a/.gitattributes b/.gitattributes index d7c17bf9db..eac3fe624f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,5 @@ *.hdf binary *.hdf5 binary *.h5 binary +# SCM syntax highlighting & preventing 3-way merges +pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff diff --git a/.gitignore b/.gitignore index 8c8ba65bae..d616ae5bba 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,6 @@ environment.y* coverage/ coverage.info .coverage +# pixi environments +.pixi/* +!.pixi/config.toml diff --git a/SConstruct b/SConstruct index 459b95c82f..222baa86a6 100644 --- a/SConstruct +++ b/SConstruct @@ -992,7 +992,10 @@ def get_processor_name(): elif platform.system() == "Darwin": os.environ['PATH'] = os.environ['PATH'] + os.pathsep + '/usr/sbin' command ="sysctl -n machdep.cpu.brand_string" - return subprocess.check_output(command, shell=True).decode().strip() + try: + return subprocess.check_output(command, shell=True).decode().strip() + except subprocess.CalledProcessError: + return "" elif platform.system() == "Linux": command = "lscpu || cat /proc/cpuinfo" all_info = subprocess.check_output(command, shell=True).decode().strip() diff --git a/include/cantera/equil/vcs_VolPhase.h b/include/cantera/equil/vcs_VolPhase.h index 2e01ffc220..97d32cc451 100644 --- a/include/cantera/equil/vcs_VolPhase.h +++ b/include/cantera/equil/vcs_VolPhase.h @@ -368,8 +368,8 @@ class vcs_VolPhase //! Get a constant form of the Species Formula Matrix /*! - * Returns a `double**` pointer such that `fm[e][f]` is the formula - * matrix entry for element `e` for species `k` + * Returns a matrix `M` where `M(k, e)` is the entry for element `e` and + * species `k`. */ const Array2D& getFormulaMatrix() const; diff --git a/include/cantera/kinetics/Group.h b/include/cantera/kinetics/Group.h index 78f3cd8689..a3f1bea2bb 100644 --- a/include/cantera/kinetics/Group.h +++ b/include/cantera/kinetics/Group.h @@ -127,9 +127,6 @@ class Group std::ostream& fmt(std::ostream& s, const vector& esymbols) const; - friend std::ostream& operator<<(std::ostream& s, - const Group& g); - private: vector m_comp; int m_sign; diff --git a/src/base/stringUtils.cpp b/src/base/stringUtils.cpp index b7f4d82326..1590b1dd80 100644 --- a/src/base/stringUtils.cpp +++ b/src/base/stringUtils.cpp @@ -121,8 +121,9 @@ Composition parseCompString(const string& ss, const vector& names) double fpValue(const string& val) { double rval; + static const auto locale = std::locale("C"); std::stringstream ss(val); - ss.imbue(std::locale("C")); + ss.imbue(locale); ss >> rval; return rval; } diff --git a/src/kinetics/Group.cpp b/src/kinetics/Group.cpp index fdd18caaf2..fc4b6e8a08 100644 --- a/src/kinetics/Group.cpp +++ b/src/kinetics/Group.cpp @@ -57,14 +57,4 @@ std::ostream& Group::fmt(std::ostream& s, const vector& esymbols) const return s; } -std::ostream& operator<<(std::ostream& s, const Group& g) -{ - if (g.valid()) { - s << g.m_comp; - } else { - s << ""; - } - return s; -} - }