From 6ce41ba87b39ff00fca601bca9bafc52fecffcbf Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 16 Mar 2020 20:49:24 +0100 Subject: [PATCH] remove unused template --- opm/simulators/utils/ParallelRestart.cpp | 28 ------------------------ 1 file changed, 28 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 93ffd5a40..926d0b17d 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -94,34 +94,6 @@ namespace { -template class Map, class Type, class Key> -std::pair, std::vector>>> -splitDynMap(const Map>& map) -{ - // we have to pack the unique ptrs separately, and use an index map - // to allow reconstructing the appropriate structures. - std::vector>> asMap; - std::vector unique; - for (const auto& it : map) { - for (const auto& w : it.second.data()) { - if (std::find(unique.begin(), unique.end(), w) == unique.end()) - unique.push_back(w); - } - } - for (const auto& it : map) { - std::vector idxVec; - idxVec.reserve(it.second.size()+1); - for (const auto& w : it.second.data()) { - auto uIt = std::find(unique.begin(), unique.end(), w); - idxVec.push_back(uIt-unique.begin()); - } - idxVec.push_back(it.second.initialRange()); - asMap.push_back(std::make_pair(it.first, idxVec)); - } - - return std::make_pair(unique, asMap); -} - template std::pair, std::vector> splitDynState(const Opm::DynamicState& state)