From 457b64defbf3e758d1f1c96fdb4f5999476f415c Mon Sep 17 00:00:00 2001 From: Paul-Emile Bernard <paul-emile.bernard@uclouvain.be> Date: Fri, 20 Mar 2015 13:47:19 +0000 Subject: [PATCH] tr1:: removed --- Mesh/BGMBase.cpp | 4 ++-- Mesh/BGMBase.h | 13 ++++++++----- Mesh/BackgroundMesh3D.h | 6 ++++-- Mesh/pointInsertion.cpp | 2 +- Mesh/yamakawa.h | 31 ++++++++++++++++++++----------- 5 files changed, 35 insertions(+), 21 deletions(-) diff --git a/Mesh/BGMBase.cpp b/Mesh/BGMBase.cpp index 385ea364e0..6f64e2d88b 100644 --- a/Mesh/BGMBase.cpp +++ b/Mesh/BGMBase.cpp @@ -225,7 +225,7 @@ double BGMBase::get_nodal_value(const MVertex *v,const DoubleStorageType &data)c //------------------------------------------------------------------------ vector<vector<double> > BGMBase::get_nodal_values(const MElement *e,const VectorStorageType &data)const{ - if(debug) cout << "BGMBase::get_nodal_values(const MElement *e,const tr1::unordered_map<MVertex*,vector<double> > &data)" << endl; + if(debug) cout << "BGMBase::get_nodal_values(const MElement *e,const map<MVertex*,vector<double> > &data)" << endl; vector<vector<double> > res(e->getNumVertices()); for (int i=0;i<e->getNumVertices();i++){ @@ -239,7 +239,7 @@ vector<vector<double> > BGMBase::get_nodal_values(const MElement *e,const Vector //------------------------------------------------------------------------ vector<double> BGMBase::get_nodal_values(const MElement *e,const DoubleStorageType &data)const{ - if(debug) cout << "BGMBase::get_nodal_values(const MElement *e,const tr1::unordered_map<MVertex*,double> &data)" << endl; + if(debug) cout << "BGMBase::get_nodal_values(const MElement *e,const map<MVertex*,double> &data)" << endl; vector<double> res(e->getNumVertices(),0.); for (int i=0;i<e->getNumVertices();i++) diff --git a/Mesh/BGMBase.h b/Mesh/BGMBase.h index bcbd8b9308..e44a31d77b 100644 --- a/Mesh/BGMBase.h +++ b/Mesh/BGMBase.h @@ -16,8 +16,8 @@ #include "MElement.h" #include "simpleFunction.h" -#include <tr1/unordered_map> -#include <tr1/unordered_set> +//#include <tr1/unordered_map> +//#include <tr1/unordered_set> class MElementOctree; @@ -35,9 +35,12 @@ using namespace std; class BGMBase{ public: typedef MVertex* hash_key_ptr; - typedef tr1::unordered_map<hash_key_ptr, STensor3 > TensorStorageType; - typedef tr1::unordered_map<hash_key_ptr, double > DoubleStorageType; - typedef tr1::unordered_map<hash_key_ptr, vector<double> > VectorStorageType; +// typedef tr1::unordered_map<hash_key_ptr, STensor3 > TensorStorageType; +// typedef tr1::unordered_map<hash_key_ptr, double > DoubleStorageType; +// typedef tr1::unordered_map<hash_key_ptr, vector<double> > VectorStorageType; + typedef std::map<hash_key_ptr, STensor3 > TensorStorageType; + typedef std::map<hash_key_ptr, double > DoubleStorageType; + typedef std::map<hash_key_ptr, vector<double> > VectorStorageType; protected: mutable MElementOctree *octree; diff --git a/Mesh/BackgroundMesh3D.h b/Mesh/BackgroundMesh3D.h index 544555a738..7aeb0b3bb5 100644 --- a/Mesh/BackgroundMesh3D.h +++ b/Mesh/BackgroundMesh3D.h @@ -88,8 +88,10 @@ class backgroundMesh3D : public BGMBase { class frameFieldBackgroundMesh3D : public backgroundMesh3D{ public: - typedef tr1::unordered_map<hash_key_ptr, set<MElement*> > vert2elemtype; - typedef tr1::unordered_map<MElement*, set<MVertex*> > elem2verttype; +// typedef tr1::unordered_map<hash_key_ptr, set<MElement*> > vert2elemtype; +// typedef tr1::unordered_map<MElement*, set<MVertex*> > elem2verttype; + typedef std::map<hash_key_ptr, set<MElement*> > vert2elemtype; + typedef std::map<MElement*, set<MVertex*> > elem2verttype; typedef multimap<MVertex*, pair<int,MVertex*> > graphtype; protected: diff --git a/Mesh/pointInsertion.cpp b/Mesh/pointInsertion.cpp index 22afd6c7ac..ccfc4d352b 100644 --- a/Mesh/pointInsertion.cpp +++ b/Mesh/pointInsertion.cpp @@ -29,7 +29,7 @@ using namespace std; //------------------------------------------------------------------------ bool old_algo_hexa(){ - return true; + return false; } //------------------------------------------------------------------------ diff --git a/Mesh/yamakawa.h b/Mesh/yamakawa.h index 41e22ce2a7..3ad1d7de04 100644 --- a/Mesh/yamakawa.h +++ b/Mesh/yamakawa.h @@ -13,9 +13,10 @@ #include "GRegion.h" #include "MVertex.h" #include <set> +#include <map> -#include <tr1/unordered_set> -#include <tr1/unordered_map> +//#include <tr1/unordered_set> +//#include <tr1/unordered_map> using namespace std; @@ -72,7 +73,8 @@ class PEQuadrangle : public PEEntity{ template<class T> class clique_stop_criteria{ public: - typedef tr1::unordered_set<T> graph_data_no_hash; + //typedef tr1::unordered_set<T> graph_data_no_hash; + typedef std::set<T> graph_data_no_hash; clique_stop_criteria(map<T, std::set<MElement*> > &_m, int _i); ~clique_stop_criteria(); bool stop(const graph_data_no_hash &clique)const; @@ -93,10 +95,14 @@ class cliques_compatibility_graph{ // typedef set<T> graph_data; // typedef map<T, graph_data > graph; // typedef multimap<int,T> ranking_data; - typedef tr1::unordered_set<T> graph_data_no_hash; - typedef tr1::unordered_multimap<hash_key, T> graph_data; - typedef tr1::unordered_multimap<hash_key, pair<T, graph_data > > graph; - typedef tr1::unordered_map<int,T> ranking_data; + //typedef tr1::unordered_set<T> graph_data_no_hash; + typedef std::set<T> graph_data_no_hash; +// typedef tr1::unordered_multimap<hash_key, T> graph_data; +// typedef tr1::unordered_multimap<hash_key, pair<T, graph_data > > graph; +// typedef tr1::unordered_map<int,T> ranking_data; + typedef std::multimap<hash_key, T> graph_data; + typedef std::multimap<hash_key, pair<T, graph_data > > graph; + typedef std::map<int,T> ranking_data; typedef void (*ptrfunction_export)(cliques_compatibility_graph<T>&, int, string); @@ -154,8 +160,9 @@ class cliques_losses_graph : public cliques_compatibility_graph<T> { // typedef tr1::unordered_map<T, graph_data > graph; public: typedef unsigned long long hash_key; - typedef tr1::unordered_multimap<hash_key, T> graph_data; - typedef tr1::unordered_multimap<hash_key, pair<T, graph_data > > graph; + typedef multimap<hash_key, T> graph_data; + typedef multimap<hash_key, pair<T, graph_data > > graph; +// typedef tr1::unordered_multimap<hash_key, T> graph_data; typedef void (*ptrfunction_export)(cliques_compatibility_graph<T>&, int, string); cliques_losses_graph(graph &_g, const map<T, std::vector<double> > &_hex_ranks, unsigned int _max_nb_cliques, unsigned int _nb_hex_potentiels, clique_stop_criteria<T> *csc, ptrfunction_export fct); @@ -404,8 +411,10 @@ class Recombinator_Graph : public Recombinator{ typedef unsigned long long hash_key; - typedef tr1::unordered_multimap<hash_key, Hex*> graph_data; - typedef tr1::unordered_multimap<hash_key, pair<Hex*, graph_data > > graph; +// typedef tr1::unordered_multimap<hash_key, Hex*> graph_data; +// typedef tr1::unordered_multimap<hash_key, pair<Hex*, graph_data > > graph; + typedef multimap<hash_key, Hex*> graph_data; + typedef multimap<hash_key, pair<Hex*, graph_data > > graph; graph incompatibility_graph; set<Hex*> set_of_all_hex_in_graph; -- GitLab