Avoid connection depths outside perforated cell.
This commit is contained in:
@@ -89,9 +89,10 @@ struct Record {
|
||||
const double segment_depth = segment.depth();
|
||||
const double segment_distance = segment.totalLength();
|
||||
|
||||
// for top segment, no interpolation is needed
|
||||
// Interpolation with top segment may lead to depths outside of the
|
||||
// perforated grid cell, so simply stick to grid cell center in this case
|
||||
if (segment_number == 1) {
|
||||
center_depth = segment_depth;
|
||||
center_depth = -1.0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -247,7 +247,11 @@ const std::optional<std::pair<double, double>>& Connection::perf_range() const {
|
||||
std::size_t compseg_insert_index,
|
||||
const std::pair<double, double>& perf_range) {
|
||||
this->segment_number = segment_number_arg;
|
||||
this->center_depth = center_depth_arg;
|
||||
// Keep the default (center cell) value unless a positive (hopefully reasonable) value is given
|
||||
if (center_depth_arg > 0)
|
||||
{
|
||||
this->center_depth = center_depth_arg;
|
||||
}
|
||||
this->m_sort_value = compseg_insert_index;
|
||||
this->m_perf_range = perf_range;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user