Update connection <-> segment implementation

This commit is contained in:
Joakim Hove 2020-04-28 10:18:08 +02:00
parent b34a10f611
commit da5042c538
2 changed files with 3 additions and 1 deletions

View File

@ -801,6 +801,7 @@ INSTANTIATE_PACK(unsigned char)
INSTANTIATE_PACK(std::map<std::pair<int,int>,std::pair<bool,double>>)
INSTANTIATE_PACK(std::optional<double>)
INSTANTIATE_PACK(std::optional<std::string>)
INSTANTIATE_PACK(std::pair<double, double>)
INSTANTIATE_PACK(std::optional<std::pair<double,double>>)
INSTANTIATE_PACK(std::map<std::string,std::vector<int>>)
INSTANTIATE_PACK(std::map<std::string,std::map<std::pair<int,int>,int>>)

View File

@ -3574,7 +3574,8 @@ namespace Opm
double total_connection_length = 0.;
for (const int conn : segment_perforations_[seg]) {
const auto& connection = connections.get(conn);
const double connection_length = connection.getSegDistEnd() - connection.getSegDistStart();
const auto& perf_range = connection.perf_range();
const double connection_length = perf_range->second - perf_range->first;
assert(connection_length > 0.);
total_connection_length += connection_length;
}