Use map instead of unordered_map.

This is because downstream code can benefit from the ordering guarantee.
This commit is contained in:
Atgeirr Flø Rasmussen 2016-09-07 13:37:09 +02:00
parent 37938bbf5e
commit 81a9f0521f
2 changed files with 7 additions and 7 deletions

View File

@ -210,11 +210,11 @@ namespace Opm {
} }
const std::unordered_map<std::string, std::vector<double>>& SimulationDataContainer::cellData() const { const std::map<std::string, std::vector<double>>& SimulationDataContainer::cellData() const {
return m_cell_data; return m_cell_data;
} }
std::unordered_map<std::string, std::vector<double>>& SimulationDataContainer::cellData() { std::map<std::string, std::vector<double>>& SimulationDataContainer::cellData() {
return m_cell_data; return m_cell_data;
} }

View File

@ -22,7 +22,7 @@
#include <cstddef> #include <cstddef>
#include <string> #include <string>
#include <unordered_map> #include <map>
#include <vector> #include <vector>
namespace Opm { namespace Opm {
@ -118,8 +118,8 @@ namespace Opm {
const std::vector<double>& facepressure() const; const std::vector<double>& facepressure() const;
const std::vector<double>& faceflux () const; const std::vector<double>& faceflux () const;
const std::unordered_map<std::string, std::vector<double>>& cellData() const; const std::map<std::string, std::vector<double>>& cellData() const;
std::unordered_map<std::string, std::vector<double>>& cellData(); std::map<std::string, std::vector<double>>& cellData();
private: private:
void addDefaultFields(); void addDefaultFields();
@ -129,8 +129,8 @@ namespace Opm {
size_t m_num_faces; size_t m_num_faces;
size_t m_num_phases; size_t m_num_phases;
std::unordered_map< std::string , std::vector<double> > m_cell_data; std::map< std::string , std::vector<double> > m_cell_data;
std::unordered_map< std::string , std::vector<double> > m_face_data; std::map< std::string , std::vector<double> > m_face_data;
std::vector<double>* pressure_ref_; std::vector<double>* pressure_ref_;
std::vector<double>* temperature_ref_; std::vector<double>* temperature_ref_;