diff --git a/include/cantera/base/AnyMap.h b/include/cantera/base/AnyMap.h index c0a6bb55c..74ab2d515 100644 --- a/include/cantera/base/AnyMap.h +++ b/include/cantera/base/AnyMap.h @@ -248,12 +248,12 @@ public: AnyValue& operator=(const std::unordered_map items); template - AnyValue& operator=(const std::map items); + AnyValue& operator=(const map items); - //! Return the held `AnyMap` as a `std::map` where all of the values have + //! Return the held `AnyMap` as a `map` where all of the values have //! the specified type. template - std::map asMap() const; + map asMap() const; //! Access a `vector` as a mapping using the value of `name` from //! each item as the key in the new mapping. @@ -372,7 +372,7 @@ vector& AnyValue::asVector(size_t nMin, size_t nMax); * breakfast["beans"]["baked"] = v; * * // Create a nested AnyMap with values of the same type - * std::map breads{{"wheat", 4.0}, {"white", 2.5}}; + * map breads{{"wheat", 4.0}, {"white", 2.5}}; * breakfast["toast"] = breads; * // Equivalent to: * breakfast["toast"]["wheat"] = 4.0 @@ -386,7 +386,7 @@ vector& AnyValue::asVector(size_t nMin, size_t nMax); * std::string val2 = breakfast["eggs"].asString(); * vector val3 = breakfast["beans"]["baked"].asVector(); * - * std::map = breakfast["toast"].asMap(); + * map = breakfast["toast"].asMap(); * ``` * * ## Checking for elements diff --git a/include/cantera/base/AnyMap.inl.h b/include/cantera/base/AnyMap.inl.h index dabe3ce5a..cf1818b32 100644 --- a/include/cantera/base/AnyMap.inl.h +++ b/include/cantera/base/AnyMap.inl.h @@ -131,7 +131,7 @@ AnyValue& AnyValue::operator=(const std::unordered_map items) { } template -AnyValue& AnyValue::operator=(const std::map items) { +AnyValue& AnyValue::operator=(const map items) { m_value = AnyMap(); m_equals = eq_comparer; AnyMap& dest = as(); @@ -159,9 +159,9 @@ inline AnyMap& AnyValue::as() { } template -std::map AnyValue::asMap() const +map AnyValue::asMap() const { - std::map dest; + map dest; for (const auto& item : as()) { dest[item.first] = item.second.as(); } diff --git a/include/cantera/base/Delegator.h b/include/cantera/base/Delegator.h index c815bb78a..38942c9c0 100644 --- a/include/cantera/base/Delegator.h +++ b/include/cantera/base/Delegator.h @@ -520,34 +520,34 @@ protected: //! @{ // Delegates with no return value - std::map*> m_funcs_v; - std::map*> m_funcs_v_b; - std::map*> m_funcs_v_d; + map*> m_funcs_v; + map*> m_funcs_v_b; + map*> m_funcs_v_d; map*> m_funcs_v_AMr; - std::map*> m_funcs_v_cAMr_cUSr; map*> m_funcs_v_csr_vp; - std::map, double*)>*> m_funcs_v_dp; - std::map, double, double*)>*> m_funcs_v_d_dp; - std::map, double, double*, double*)>*> m_funcs_v_d_dp_dp; - std::map, double*, double*, double*)>*> m_funcs_v_dp_dp_dp; // Delegates with a return value - std::map> m_base_d_vp; - std::map*> m_funcs_d_vp; + map> m_base_d_vp; + map*> m_funcs_d_vp; - std::map> m_base_s_sz; - std::map*> m_funcs_s_sz; - std::map> m_base_sz_csr; - std::map*> m_funcs_sz_csr; //! @} diff --git a/include/cantera/base/ExtensionManager.h b/include/cantera/base/ExtensionManager.h index 5f7bace8e..3e1c83fc6 100644 --- a/include/cantera/base/ExtensionManager.h +++ b/include/cantera/base/ExtensionManager.h @@ -108,11 +108,11 @@ public: protected: //! Functions for wrapping and linking ReactionData objects - static std::map> s_ReactionData_linkers; //! Functions for wrapping and linking Solution objects - static std::map(shared_ptr)>> s_Solution_linkers; //! Mapping from user-defined rate types to Solution wrapper types diff --git a/include/cantera/base/Solution.h b/include/cantera/base/Solution.h index f28cd0848..5059feed2 100644 --- a/include/cantera/base/Solution.h +++ b/include/cantera/base/Solution.h @@ -155,13 +155,13 @@ protected: vector> m_adjacent; //! Adjacent phases, for access by name - std::map> m_adjacentByName; + map> m_adjacentByName; AnyMap m_header; //!< Additional input fields; usually from a YAML input file //! Wrappers for this Solution object in extension languages, for evaluation //! of user-defined reaction rates - std::map> m_externalHandles; + map> m_externalHandles; //! Callback functions that are invoked when the therm, kinetics, or transport //! members of the Solution are replaced. @@ -229,7 +229,7 @@ shared_ptr newSolution( const AnyMap& phaseNode, const AnyMap& rootNode=AnyMap(), const std::string& transport="", const vector>& adjacent={}, - const std::map>& related={}); + const map>& related={}); } diff --git a/include/cantera/base/Units.h b/include/cantera/base/Units.h index f7b014f7b..68ae62357 100644 --- a/include/cantera/base/Units.h +++ b/include/cantera/base/Units.h @@ -176,7 +176,7 @@ public: UnitSystem() : UnitSystem({}) {} //! Return default units used by the unit system - std::map defaults() const; + map defaults() const; //! Set the default units to convert from when explicit units are not //! provided. Defaults can be set for mass, length, time, quantity, energy, @@ -193,14 +193,14 @@ public: //! Cantera's default units: //! ``` //! UnitSystem system; - //! std::map defaults{ + //! map defaults{ //! {"length", "m"}, {"mass", "kg"}, {"time", "s"}, //! {"quantity", "kmol"}, {"pressure", "Pa"}, {"energy", "J"}, //! {"activation-energy", "J/kmol"} //! }; //! setDefaults(defaults); //! ``` - void setDefaults(const std::map& units); + void setDefaults(const map& units); //! Set the default units to convert from when using the //! `convertActivationEnergy` function. @@ -295,7 +295,7 @@ private: //! Map of dimensions (mass, length, etc.) to names of specified default //! units - std::map m_defaults; + map m_defaults; }; } diff --git a/include/cantera/base/ValueCache.h b/include/cantera/base/ValueCache.h index e994f1637..65b973c3c 100644 --- a/include/cantera/base/ValueCache.h +++ b/include/cantera/base/ValueCache.h @@ -176,10 +176,10 @@ public: protected: //! Cached scalar values - std::map > m_scalarCache; + map > m_scalarCache; //! Cached array values - std::map> > m_arrayCache; + map> > m_arrayCache; //! The last assigned id. Automatically incremented by the getId() method. static int m_last_id; diff --git a/include/cantera/base/YamlWriter.h b/include/cantera/base/YamlWriter.h index 046f0ed2c..36c7865dd 100644 --- a/include/cantera/base/YamlWriter.h +++ b/include/cantera/base/YamlWriter.h @@ -66,7 +66,7 @@ public: //! @param units A map where keys are dimensions (mass, length, time, //! quantity, pressure, energy, activation-energy) and the values are //! corresponding units supported by the UnitSystem class. - void setUnits(const std::map& units={}); + void setUnits(const map& units={}); //! Set the units to be used in the output file. Dimensions not specified //! will use Cantera's defaults. diff --git a/include/cantera/base/utilities.h b/include/cantera/base/utilities.h index b535d852b..cc7ec2653 100644 --- a/include/cantera/base/utilities.h +++ b/include/cantera/base/utilities.h @@ -182,14 +182,14 @@ void checkFinite(const double tmp); */ void checkFinite(const std::string& name, double* values, size_t N); -//! Const accessor for a value in a std::map. +//! Const accessor for a value in a map. /* - * Similar to std::map.at(key), but returns *default_val* if the key is not + * Similar to map.at(key), but returns *default_val* if the key is not * found instead of throwing an exception. */ template -const U& getValue(const std::map& m, const T& key, const U& default_val) { - typename std::map::const_iterator iter = m.find(key); +const U& getValue(const map& m, const T& key, const U& default_val) { + typename map::const_iterator iter = m.find(key); return (iter == m.end()) ? default_val : iter->second; } diff --git a/include/cantera/equil/MultiPhase.h b/include/cantera/equil/MultiPhase.h index 0218588f7..fa92e972b 100644 --- a/include/cantera/equil/MultiPhase.h +++ b/include/cantera/equil/MultiPhase.h @@ -612,7 +612,7 @@ private: /*! * -> used in the construction. However, wonder if it needs to be global. */ - std::map m_enamemap; + map m_enamemap; //! Current value of the temperature (kelvin) double m_temp = 298.15; diff --git a/include/cantera/kinetics/InterfaceKinetics.h b/include/cantera/kinetics/InterfaceKinetics.h index 30fc07854..aaa0a320a 100644 --- a/include/cantera/kinetics/InterfaceKinetics.h +++ b/include/cantera/kinetics/InterfaceKinetics.h @@ -354,7 +354,7 @@ protected: //! Vector of rate handlers for interface reactions vector> m_interfaceRates; - std::map m_interfaceTypes; //!< Rate handler mapping + map m_interfaceTypes; //!< Rate handler mapping //! Vector of irreversible reaction numbers /*! diff --git a/include/cantera/kinetics/Kinetics.h b/include/cantera/kinetics/Kinetics.h index 9d88d9d38..8aa106900 100644 --- a/include/cantera/kinetics/Kinetics.h +++ b/include/cantera/kinetics/Kinetics.h @@ -1512,8 +1512,8 @@ protected: * @return 0.0 if the stoichiometries are not multiples of one another * Otherwise, it returns the ratio of the stoichiometric coefficients. */ - double checkDuplicateStoich(std::map& r1, - std::map& r2) const; + double checkDuplicateStoich(map& r1, + map& r2) const; //! @name Stoichiometry management //! @@ -1580,7 +1580,7 @@ protected: * function, phaseIndex() decrements by one before returning the index * value, so that missing phases return -1. */ - std::map m_phaseindex; + map m_phaseindex; //! Index in the list of phases of the one surface phase. //! @deprecated To be removed after %Cantera 3.0. diff --git a/include/cantera/kinetics/MultiRate.h b/include/cantera/kinetics/MultiRate.h index d7d002ddc..42b54f9f5 100644 --- a/include/cantera/kinetics/MultiRate.h +++ b/include/cantera/kinetics/MultiRate.h @@ -210,7 +210,7 @@ protected: //! Vector of pairs of reaction rates indices and reaction rates vector> m_rxn_rates; - std::map m_indices; //! Mapping of indices + map m_indices; //! Mapping of indices DataType m_shared; }; diff --git a/include/cantera/kinetics/PlogRate.h b/include/cantera/kinetics/PlogRate.h index e811b0045..e3b990db3 100644 --- a/include/cantera/kinetics/PlogRate.h +++ b/include/cantera/kinetics/PlogRate.h @@ -182,7 +182,7 @@ public: protected: //! log(p) to (index range) in the rates_ vector - std::map> pressures_; + map> pressures_; // Rate expressions which are referenced by the indices stored in pressures_ vector rates_; diff --git a/include/cantera/kinetics/ReactionPath.h b/include/cantera/kinetics/ReactionPath.h index a61206eb3..dfa2e0984 100644 --- a/include/cantera/kinetics/ReactionPath.h +++ b/include/cantera/kinetics/ReactionPath.h @@ -81,7 +81,7 @@ protected: class Path { public: - typedef std::map rxn_path_map; + typedef map rxn_path_map; /** * Constructor. Construct a one-way path from \c begin to \c end. @@ -147,7 +147,7 @@ public: void writeLabel(std::ostream& s, double threshold = 0.005); protected: - std::map m_label; + map m_label; SpeciesNode* m_a, *m_b; rxn_path_map m_rxn; double m_total = 0.0; @@ -281,7 +281,7 @@ public: protected: double m_flxmax = 0.0; - std::map > m_paths; + map > m_paths; //! map of species index to SpeciesNode map m_nodes; @@ -329,11 +329,11 @@ protected: //! m_transfer[reaction][reactant number][product number] where "reactant //! number" means the number of the reactant in the reaction equation. For example, //! for "A+B -> C+D", "B" is reactant number 1 and "C" is product number 0. - std::map > > m_transfer; + map > > m_transfer; vector m_determinate; Array2D m_atoms; - std::map m_enamemap; + map m_enamemap; }; } diff --git a/include/cantera/kinetics/StoichManager.h b/include/cantera/kinetics/StoichManager.h index 346f99acb..7f9975379 100644 --- a/include/cantera/kinetics/StoichManager.h +++ b/include/cantera/kinetics/StoichManager.h @@ -156,7 +156,7 @@ public: R[m_rxn] -= S[m_ic0]; } - void resizeCoeffs(const std::map, size_t>& indices) + void resizeCoeffs(const map, size_t>& indices) { m_jc0 = indices.at({m_rxn, m_ic0}); } @@ -218,7 +218,7 @@ public: R[m_rxn] -= (S[m_ic0] + S[m_ic1]); } - void resizeCoeffs(const std::map, size_t>& indices) + void resizeCoeffs(const map, size_t>& indices) { m_jc0 = indices.at({m_rxn, m_ic0}); m_jc1 = indices.at({m_rxn, m_ic1}); @@ -289,7 +289,7 @@ public: R[m_rxn] -= (S[m_ic0] + S[m_ic1] + S[m_ic2]); } - void resizeCoeffs(const std::map, size_t>& indices) + void resizeCoeffs(const map, size_t>& indices) { m_jc0 = indices.at({m_rxn, m_ic0}); m_jc1 = indices.at({m_rxn, m_ic1}); @@ -392,7 +392,7 @@ public: } } - void resizeCoeffs(const std::map, size_t>& indices) + void resizeCoeffs(const map, size_t>& indices) { for (size_t i = 0; i < m_n; i++) { m_jc[i] = indices.at({m_rxn, m_ic[i]}); @@ -622,7 +622,7 @@ public: m_values.resize(nCoeffs, 0.); // Set up index pairs for derivatives - std::map, size_t> indices; + map, size_t> indices; size_t n = 0; for (int i = 0; i < tmp.outerSize(); i++) { for (Eigen::SparseMatrix::InnerIterator it(tmp, i); it; ++it) { diff --git a/include/cantera/kinetics/ThirdBodyCalc.h b/include/cantera/kinetics/ThirdBodyCalc.h index 2440899c0..ff79aea07 100644 --- a/include/cantera/kinetics/ThirdBodyCalc.h +++ b/include/cantera/kinetics/ThirdBodyCalc.h @@ -20,7 +20,7 @@ class ThirdBodyCalc { public: //! Install reaction that uses third-body effects in ThirdBodyCalc manager - void install(size_t rxnNumber, const std::map& efficiencies, + void install(size_t rxnNumber, const map& efficiencies, double default_efficiency, bool mass_action) { m_reaction_index.push_back(rxnNumber); m_default.push_back(default_efficiency); diff --git a/include/cantera/numerics/ResidEval.h b/include/cantera/numerics/ResidEval.h index 5624dfe7b..613f1784a 100644 --- a/include/cantera/numerics/ResidEval.h +++ b/include/cantera/numerics/ResidEval.h @@ -172,7 +172,7 @@ protected: * DAE, and zero if it is not. */ vector m_alg; - std::map m_constrain; + map m_constrain; }; } diff --git a/include/cantera/oneD/refine.h b/include/cantera/oneD/refine.h index b6a73c999..59261f100 100644 --- a/include/cantera/oneD/refine.h +++ b/include/cantera/oneD/refine.h @@ -99,7 +99,7 @@ public: protected: //! Indices of grid points that need new grid points added after them set m_loc; - std::map m_keep; + map m_keep; //! Names of components that require the addition of new grid points set m_c; vector m_active; diff --git a/include/cantera/thermo/CoverageDependentSurfPhase.h b/include/cantera/thermo/CoverageDependentSurfPhase.h index 54ba78e01..807f699da 100644 --- a/include/cantera/thermo/CoverageDependentSurfPhase.h +++ b/include/cantera/thermo/CoverageDependentSurfPhase.h @@ -270,9 +270,9 @@ public: //! a target species size_t j; //! map of pairs - std::map enthalpy_map; + map enthalpy_map; //! map of pairs - std::map entropy_map; + map entropy_map; //! boolean indicating whether the dependency is piecewise-linear bool isPiecewise; }; diff --git a/include/cantera/thermo/Elements.h b/include/cantera/thermo/Elements.h index 8c638f32c..f07122d35 100644 --- a/include/cantera/thermo/Elements.h +++ b/include/cantera/thermo/Elements.h @@ -100,7 +100,7 @@ const vector& elementNames(); * * @since New in version 3.0 */ -const std::map& elementWeights(); +const map& elementWeights(); //! Get the atomic weight of an element. /*! diff --git a/include/cantera/thermo/LatticePhase.h b/include/cantera/thermo/LatticePhase.h index 37c72db8e..8ece6b75a 100644 --- a/include/cantera/thermo/LatticePhase.h +++ b/include/cantera/thermo/LatticePhase.h @@ -200,7 +200,7 @@ public: return false; } - std::map nativeState() const { + map nativeState() const { return { {"T", 0}, {"P", 1}, {"X", 2} }; } diff --git a/include/cantera/thermo/LatticeSolidPhase.h b/include/cantera/thermo/LatticeSolidPhase.h index 6dc4aa8d1..25aec81ca 100644 --- a/include/cantera/thermo/LatticeSolidPhase.h +++ b/include/cantera/thermo/LatticeSolidPhase.h @@ -123,7 +123,7 @@ public: return false; } - std::map nativeState() const { + map nativeState() const { return { {"T", 0}, {"P", 1}, {"X", 2} }; } diff --git a/include/cantera/thermo/Mu0Poly.h b/include/cantera/thermo/Mu0Poly.h index 181f882da..1408bd11f 100644 --- a/include/cantera/thermo/Mu0Poly.h +++ b/include/cantera/thermo/Mu0Poly.h @@ -107,7 +107,7 @@ public: * energy [J/kmol] as the values. Must contain one point at * 298.15 K. */ - void setParameters(double h0, const std::map& T_mu); + void setParameters(double h0, const map& T_mu); virtual int reportType() const { return MU0_INTERP; diff --git a/include/cantera/thermo/MultiSpeciesThermo.h b/include/cantera/thermo/MultiSpeciesThermo.h index 884ea47e8..89a251cee 100644 --- a/include/cantera/thermo/MultiSpeciesThermo.h +++ b/include/cantera/thermo/MultiSpeciesThermo.h @@ -204,8 +204,8 @@ protected: void markInstalled(size_t k); typedef pair > index_STIT; - typedef std::map > STIT_map; - typedef std::map> tpoly_map; + typedef map > STIT_map; + typedef map> tpoly_map; //! This is the main data structure, which contains the //! SpeciesThermoInterpType objects, sorted by the parameterization type. @@ -219,7 +219,7 @@ protected: //! Map from species index to location within #m_sp, such that //! `m_sp[m_speciesLoc[k].first][m_speciesLoc[k].second]` is the //! SpeciesThermoInterpType object for species `k`. - std::map > m_speciesLoc; + map > m_speciesLoc; //! Maximum value of the lowest temperature double m_tlow_max = 0.0; diff --git a/include/cantera/thermo/Nasa9PolyMultiTempRegion.h b/include/cantera/thermo/Nasa9PolyMultiTempRegion.h index a1d0f90ed..706451fb2 100644 --- a/include/cantera/thermo/Nasa9PolyMultiTempRegion.h +++ b/include/cantera/thermo/Nasa9PolyMultiTempRegion.h @@ -74,7 +74,7 @@ public: * region and each value is the array of 9 polynomial * coefficients for that region. */ - void setParameters(const std::map>& regions); + void setParameters(const map>& regions); virtual int reportType() const; diff --git a/include/cantera/thermo/PDSS_IonsFromNeutral.h b/include/cantera/thermo/PDSS_IonsFromNeutral.h index 00e512123..35f30b5b0 100644 --- a/include/cantera/thermo/PDSS_IonsFromNeutral.h +++ b/include/cantera/thermo/PDSS_IonsFromNeutral.h @@ -99,7 +99,7 @@ protected: //! Pointer to the Neutral Molecule ThermoPhase object shared_ptr neutralMoleculePhase_; - std::map neutralSpeciesMultipliers_; + map neutralSpeciesMultipliers_; //! Number of neutral molecule species that make up the stoichiometric //! vector for this species, in terms of calculating thermodynamic functions diff --git a/include/cantera/thermo/PengRobinson.h b/include/cantera/thermo/PengRobinson.h index 654c2a676..4e7ab6f05 100644 --- a/include/cantera/thermo/PengRobinson.h +++ b/include/cantera/thermo/PengRobinson.h @@ -273,7 +273,7 @@ protected: Array2D m_aAlpha_binary; //! Explicitly-specified binary interaction parameters, to enable serialization - std::map> m_binaryParameters; + map> m_binaryParameters; int m_NSolns = 0; diff --git a/include/cantera/thermo/Phase.h b/include/cantera/thermo/Phase.h index 1e0f42ff5..55dc9b788 100644 --- a/include/cantera/thermo/Phase.h +++ b/include/cantera/thermo/Phase.h @@ -290,7 +290,7 @@ public: //! 2, respectively. Mass fractions "Y" are omitted for pure species. //! In all cases, offsets into the state vector are used by saveState() //! and restoreState(). - virtual std::map nativeState() const; + virtual map nativeState() const; //! Return string acronym representing the native state of a Phase. //! Examples: "TP", "TDY", "TPY". @@ -969,7 +969,7 @@ protected: vector m_speciesCharge; //!< Vector of species charges. length m_kk. - std::map > m_species; + map > m_species; //! Flag determining behavior when adding species with an undefined element UndefElement::behavior m_undefinedElementBehavior = UndefElement::add; @@ -1021,10 +1021,10 @@ private: vector m_speciesNames; //! Map of species names to indices - std::map m_speciesIndices; + map m_speciesIndices; //! Map of lower-case species names to indices - std::map m_speciesLower; + map m_speciesLower; size_t m_mm = 0; //!< Number of elements. vector m_atomicWeights; //!< element atomic weights (kg kmol-1) diff --git a/include/cantera/thermo/RedlichKwongMFTP.h b/include/cantera/thermo/RedlichKwongMFTP.h index eed412009..1c361e234 100644 --- a/include/cantera/thermo/RedlichKwongMFTP.h +++ b/include/cantera/thermo/RedlichKwongMFTP.h @@ -238,7 +238,7 @@ protected: Array2D a_coeff_vec; //! Explicitly-specified binary interaction parameters - std::map>> m_binaryParameters; + map>> m_binaryParameters; enum class CoeffSource { EoS, CritProps, Database }; //! For each species, specifies the source of the a and b coefficients diff --git a/include/cantera/transport/TransportFactory.h b/include/cantera/transport/TransportFactory.h index ff38b4c53..8896e00a5 100644 --- a/include/cantera/transport/TransportFactory.h +++ b/include/cantera/transport/TransportFactory.h @@ -83,7 +83,7 @@ private: TransportFactory(); //! Models included in this map are initialized in CK compatibility mode - std::map m_CK_mode; + map m_CK_mode; }; //! @copydoc TransportFactory::newTransport(const std::string&, ThermoPhase*, int) diff --git a/samples/cxx/rankine/rankine.cpp b/samples/cxx/rankine/rankine.cpp index 8781140db..e62be4873 100644 --- a/samples/cxx/rankine/rankine.cpp +++ b/samples/cxx/rankine/rankine.cpp @@ -17,7 +17,7 @@ using namespace Cantera; -std::map h, s, T, P, x; +map h, s, T, P, x; vector states; template diff --git a/src/base/Solution.cpp b/src/base/Solution.cpp index 09895b568..48ddb1439 100644 --- a/src/base/Solution.cpp +++ b/src/base/Solution.cpp @@ -223,7 +223,7 @@ shared_ptr newSolution(const AnyMap& phaseNode, const AnyMap& rootNode, const std::string& transport, const vector>& adjacent, - const std::map>& related) + const map>& related) { // thermo phase auto thermo = newThermo(phaseNode, rootNode); diff --git a/src/base/Units.cpp b/src/base/Units.cpp index 3d678287e..3979c12e4 100644 --- a/src/base/Units.cpp +++ b/src/base/Units.cpp @@ -14,7 +14,7 @@ namespace { using namespace Cantera; -const std::map knownUnits{ +const map knownUnits{ {"", Units(1.0)}, {"1", Units(1.0)}, @@ -80,7 +80,7 @@ const std::map knownUnits{ {"J/kmol", Units(1.0, 1, 2, -2, 0, 0, -1)}, }; -const std::map prefixes{ +const map prefixes{ {"Y", 1e24}, {"Z", 1e21}, {"E", 1e18}, @@ -233,7 +233,7 @@ Units Units::pow(double exponent) const std::string Units::str(bool skip_unity) const { - std::map dims{ + map dims{ {"kg", m_mass_dim}, {"m", m_length_dim}, {"s", m_time_dim}, @@ -395,10 +395,10 @@ UnitSystem::UnitSystem(std::initializer_list units) setDefaults(units); } -std::map UnitSystem::defaults() const +map UnitSystem::defaults() const { // Unit system defaults - std::map units{ + map units{ {"mass", "kg"}, {"length", "m"}, {"time", "s"}, @@ -469,7 +469,7 @@ void UnitSystem::setDefaults(std::initializer_list units) } } -void UnitSystem::setDefaults(const std::map& units) +void UnitSystem::setDefaults(const map& units) { for (const auto& [dimension, name] : units) { Units unit(name); diff --git a/src/base/YamlWriter.cpp b/src/base/YamlWriter.cpp index 2de69e9b2..62655054f 100644 --- a/src/base/YamlWriter.cpp +++ b/src/base/YamlWriter.cpp @@ -122,7 +122,7 @@ std::string YamlWriter::toYamlString() const output["species"] = speciesDefs; // build reaction definitions for all phases - std::map> allReactions; + map> allReactions; for (const auto& phase : m_phases) { const auto kin = phase->kinetics(); if (!kin || !kin->nReactions()) { @@ -140,7 +140,7 @@ std::string YamlWriter::toYamlString() const // key: canonical phase in allReactions // value: phases using this reaction set - std::map> phaseGroups; + map> phaseGroups; for (const auto& phase : m_phases) { const auto kin = phase->kinetics(); @@ -192,7 +192,7 @@ void YamlWriter::toYamlFile(const std::string& filename) const out << toYamlString(); } -void YamlWriter::setUnits(const std::map& units) +void YamlWriter::setUnits(const map& units) { m_output_units = UnitSystem(); m_output_units.setDefaults(units); diff --git a/src/base/application.h b/src/base/application.h index e92717ce3..312de134f 100644 --- a/src/base/application.h +++ b/src/base/application.h @@ -180,7 +180,7 @@ protected: void removeThreadMessages(); //! Typedef for map between a thread and the message - typedef std::map threadMsgMap_t; + typedef map threadMsgMap_t; private: //! Thread Msg Map diff --git a/src/base/global.cpp b/src/base/global.cpp index 4497cd1a3..e416eaff3 100644 --- a/src/base/global.cpp +++ b/src/base/global.cpp @@ -213,7 +213,7 @@ vector FactoryBase::s_vFactoryRegistry; std::string demangle(const std::type_info& type) { - static std::map typenames = { + static map typenames = { {typeid(void).name(), "void"}, {typeid(double).name(), "double"}, {typeid(long int).name(), "long int"}, diff --git a/src/kinetics/Kinetics.cpp b/src/kinetics/Kinetics.cpp index de62d55fe..95cbab878 100644 --- a/src/kinetics/Kinetics.cpp +++ b/src/kinetics/Kinetics.cpp @@ -107,8 +107,8 @@ void Kinetics::checkSpeciesArraySize(size_t kk) const pair Kinetics::checkDuplicates(bool throw_err) const { //! Map of (key indicating participating species) to reaction numbers - std::map > participants; - vector > net_stoich; + map > participants; + vector > net_stoich; std::unordered_set unmatched_duplicates; for (size_t i = 0; i < m_reactions.size(); i++) { if (m_reactions[i]->duplicate) { @@ -121,7 +121,7 @@ pair Kinetics::checkDuplicates(bool throw_err) const unsigned long int key = 0; Reaction& R = *m_reactions[i]; net_stoich.emplace_back(); - std::map& net = net_stoich.back(); + map& net = net_stoich.back(); for (const auto& [name, stoich] : R.reactants) { int k = static_cast(kineticsSpeciesIndex(name)); key += k*(k+1); @@ -197,8 +197,8 @@ pair Kinetics::checkDuplicates(bool throw_err) const return {npos, npos}; } -double Kinetics::checkDuplicateStoich(std::map& r1, - std::map& r2) const +double Kinetics::checkDuplicateStoich(map& r1, + map& r2) const { std::unordered_set keys; // species keys (k+1 or -k-1) for (auto& [speciesKey, stoich] : r1) { diff --git a/src/oneD/Sim1D.cpp b/src/oneD/Sim1D.cpp index 8c2e80095..57af85f3d 100644 --- a/src/oneD/Sim1D.cpp +++ b/src/oneD/Sim1D.cpp @@ -207,7 +207,7 @@ AnyMap legacyH5(shared_ptr arr, const AnyMap& header={}) auto meta = arr->meta(); AnyMap out; - std::map meta_pairs = { + map meta_pairs = { {"type", "Domain1D_type"}, {"name", "name"}, {"emissivity-left", "emissivity_left"}, @@ -219,7 +219,7 @@ AnyMap legacyH5(shared_ptr arr, const AnyMap& header={}) } } - std::map tol_pairs = { + map tol_pairs = { {"transient-abstol", "transient_abstol"}, {"steady-abstol", "steady_abstol"}, {"transient-reltol", "transient_reltol"}, @@ -240,7 +240,7 @@ AnyMap legacyH5(shared_ptr arr, const AnyMap& header={}) return out; } - std::map header_pairs = { + map header_pairs = { {"transport-model", "transport_model"}, {"radiation-enabled", "radiation_enabled"}, {"energy-enabled", "energy_enabled"}, @@ -253,7 +253,7 @@ AnyMap legacyH5(shared_ptr arr, const AnyMap& header={}) } } - std::map refiner_pairs = { + map refiner_pairs = { {"ratio", "ratio"}, {"slope", "slope"}, {"curve", "curve"}, @@ -303,7 +303,7 @@ AnyMap Sim1D::restore(const std::string& fname, const std::string& name) } AnyMap header; if (extension == "h5" || extension == "hdf" || extension == "hdf5") { - std::map> arrs; + map> arrs; header = SolutionArray::readHeader(fname, name); for (auto dom : m_dom) { @@ -323,7 +323,7 @@ AnyMap Sim1D::restore(const std::string& fname, const std::string& name) finalize(); } else if (extension == "yaml" || extension == "yml") { AnyMap root = AnyMap::fromYamlFile(fname); - std::map> arrs; + map> arrs; header = SolutionArray::readHeader(root, name); for (auto dom : m_dom) { diff --git a/src/thermo/Mu0Poly.cpp b/src/thermo/Mu0Poly.cpp index a398278e8..2b0f2bc37 100644 --- a/src/thermo/Mu0Poly.cpp +++ b/src/thermo/Mu0Poly.cpp @@ -25,7 +25,7 @@ Mu0Poly::Mu0Poly(double tlow, double thigh, double pref, const double* coeffs) : m_numIntervals(0), m_H298(0.0) { - std::map T_mu; + map T_mu; size_t nPoints = (size_t) coeffs[0]; for (size_t i = 0; i < nPoints; i++) { T_mu[coeffs[2*i+2]] = coeffs[2*i+3]; @@ -33,7 +33,7 @@ Mu0Poly::Mu0Poly(double tlow, double thigh, double pref, const double* coeffs) : setParameters(coeffs[1], T_mu); } -void Mu0Poly::setParameters(double h0, const std::map& T_mu) +void Mu0Poly::setParameters(double h0, const map& T_mu) { size_t nPoints = T_mu.size(); if (nPoints < 2) { diff --git a/src/thermo/Nasa9PolyMultiTempRegion.cpp b/src/thermo/Nasa9PolyMultiTempRegion.cpp index 7e38292ff..26bd195e8 100644 --- a/src/thermo/Nasa9PolyMultiTempRegion.cpp +++ b/src/thermo/Nasa9PolyMultiTempRegion.cpp @@ -79,7 +79,7 @@ Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(double tlow, double thigh, do } } -void Nasa9PolyMultiTempRegion::setParameters(const std::map>& regions) +void Nasa9PolyMultiTempRegion::setParameters(const map>& regions) { m_regionPts.clear(); m_lowerTempBounds.clear(); diff --git a/src/thermo/Phase.cpp b/src/thermo/Phase.cpp index 1eab36a67..621158de1 100644 --- a/src/thermo/Phase.cpp +++ b/src/thermo/Phase.cpp @@ -179,7 +179,7 @@ std::string Phase::speciesSPName(int k) const return m_name + ":" + speciesName(k); } -std::map Phase::nativeState() const +map Phase::nativeState() const { if (isPure()) { if (isCompressible()) { diff --git a/test/general/test_containers.cpp b/test/general/test_containers.cpp index 359261e74..f6bcd480c 100644 --- a/test/general/test_containers.cpp +++ b/test/general/test_containers.cpp @@ -190,7 +190,7 @@ TEST(AnyMap, map_conversion) { EXPECT_EQ(keys.size(), (size_t) 13); EXPECT_EQ(m["empty"].as().keys_str(), ""); - std::map zz{{"a", 9.1}, {"b", 13.5}}; + map zz{{"a", 9.1}, {"b", 13.5}}; m["foo"] = zz; EXPECT_TRUE(m["foo"].hasKey("a")); EXPECT_DOUBLE_EQ(m["foo"]["b"].asDouble(), 13.5); @@ -246,7 +246,7 @@ TEST(AnyMap, vector_length) TEST(AnyMap, getters_with_defaults) { AnyMap m; - std::map zz{{"a", 9.0}, {"b", 13.5}}; + map zz{{"a", 9.0}, {"b", 13.5}}; m["foo"] = zz; m["foo"]["c"] = 4; m["bar"] = "baz"; diff --git a/test/general/test_serialization.cpp b/test/general/test_serialization.cpp index e07c02c96..ac3c5bd45 100644 --- a/test/general/test_serialization.cpp +++ b/test/general/test_serialization.cpp @@ -197,7 +197,7 @@ TEST(YamlWriter, reaction_units_from_Yaml) writer.addPhase(original); writer.setPrecision(14); auto units = UnitSystem(); - std::map defaults{ + map defaults{ {"activation-energy", "K"}, {"quantity", "mol"}, {"length", "cm"} diff --git a/test/general/test_units.cpp b/test/general/test_units.cpp index 6e89c5a9e..c96892280 100644 --- a/test/general/test_units.cpp +++ b/test/general/test_units.cpp @@ -93,7 +93,7 @@ TEST(Units, with_defaults2) { } TEST(Units, with_defaults_map) { - std::map defaults{ + map defaults{ {"length", "cm"}, {"mass", "g"}, {"quantity", "mol"}, {"pressure", "atm"}, {"energy", "J"} }; @@ -111,9 +111,9 @@ TEST(Units, with_defaults_map) { TEST(Units, bad_defaults) { UnitSystem U; - std::map bad_key{{"length", "m"}, {"joy", "MJ"}}; + map bad_key{{"length", "m"}, {"joy", "MJ"}}; EXPECT_THROW(U.setDefaults(bad_key), CanteraError); - std::map bad_value{{"length", "m"}, {"time", "J"}}; + map bad_value{{"length", "m"}, {"time", "J"}}; EXPECT_THROW(U.setDefaults(bad_value), CanteraError); } @@ -153,7 +153,7 @@ TEST(Units, activation_energies4) { TEST(Units, activation_energies5) { UnitSystem U; - std::map defaults{ + map defaults{ {"quantity", "mol"}, {"energy", "cal"}, {"activation-energy", "K"} }; U.setDefaults(defaults); @@ -163,7 +163,7 @@ TEST(Units, activation_energies5) { TEST(Units, activation_energies6) { UnitSystem U; - std::map defaults{ + map defaults{ {"activation-energy", "eV"} }; U.setDefaults(defaults); diff --git a/test/kinetics/kineticsFromScratch.cpp b/test/kinetics/kineticsFromScratch.cpp index 7760a3fbb..80455a513 100644 --- a/test/kinetics/kineticsFromScratch.cpp +++ b/test/kinetics/kineticsFromScratch.cpp @@ -621,7 +621,7 @@ public: BulkKinetics kin; shared_ptr kin_ref; vector> reactions; - std::map> species; + map> species; void check_rates(size_t N, const std::string& X) { for (size_t i = 0; i < kin_ref->nReactions(); i++) {