From c0800478e54341dba380d82a5bc707080dab98d8 Mon Sep 17 00:00:00 2001 From: boeschf <48126478+boeschf@users.noreply.github.com> Date: Wed, 14 Dec 2022 13:13:29 +0100 Subject: [PATCH] consistent mechanism ids (#2057) Mechanism ids are assigned by iterating through an unordered map within `fvm_mechanism_data`. This changes the container in question to an ordered `std::map`. --- arbor/fvm_layout.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arbor/fvm_layout.hpp b/arbor/fvm_layout.hpp index d80575f5..57ebbcf8 100644 --- a/arbor/fvm_layout.hpp +++ b/arbor/fvm_layout.hpp @@ -1,5 +1,6 @@ #pragma once +#include <map> #include <unordered_map> #include <utility> #include <vector> @@ -290,7 +291,7 @@ ARB_ARBOR_API std::unordered_map<cell_gid_type, std::vector<fvm_gap_junction>> f struct fvm_mechanism_data { // Mechanism config, indexed by mechanism name. - std::unordered_map<std::string, fvm_mechanism_config> mechanisms; + std::map<std::string, fvm_mechanism_config> mechanisms; // Ion config, indexed by ion name. std::unordered_map<std::string, fvm_ion_config> ions; -- GitLab