diff --git a/compareECLFiles.cmake b/compareECLFiles.cmake index 663f0570e..b1aec13f2 100755 --- a/compareECLFiles.cmake +++ b/compareECLFiles.cmake @@ -1479,7 +1479,7 @@ if(MPI_FOUND) add_test_compare_parallel_simulation(CASENAME numerical_aquifer_3d_2aqu FILENAME 3D_2AQU_NUM SIMULATOR flow - ABS_TOL 0.12 + ABS_TOL 0.17 REL_TOL ${coarse_rel_tol_parallel} DIR aquifer-num TEST_ARGS --tolerance-cnv=0.00003 --time-step-control=pid --linsolver=cpr) diff --git a/ebos/equil/initstateequil.hh b/ebos/equil/initstateequil.hh index c7e4937fb..303927899 100644 --- a/ebos/equil/initstateequil.hh +++ b/ebos/equil/initstateequil.hh @@ -1852,15 +1852,20 @@ private: const unsigned int elemIdx = elemMapper.index(element); cellCenterDepth_[elemIdx] = Details::cellCenterDepth(element); const auto cartIx = cartesianIndexMapper_.cartesianIndex(elemIdx); + cellZSpan_[elemIdx] = Details::cellZSpan(element); + cellZMinMax_[elemIdx] = Details::cellZMinMax(element); if (!num_aqu_cells.empty()) { const auto search = num_aqu_cells.find(cartIx); if (search != num_aqu_cells.end()) { const auto* aqu_cell = num_aqu_cells.at(cartIx); - cellCenterDepth_[elemIdx] = aqu_cell->depth; + const double depth_change_num_aqu = aqu_cell->depth - cellCenterDepth_[elemIdx]; + cellCenterDepth_[elemIdx] += depth_change_num_aqu; + cellZSpan_[elemIdx].first += depth_change_num_aqu; + cellZSpan_[elemIdx].second += depth_change_num_aqu; + cellZMinMax_[elemIdx].first += depth_change_num_aqu; + cellZMinMax_[elemIdx].second += depth_change_num_aqu; } } - cellZSpan_[elemIdx] = Details::cellZSpan(element); - cellZMinMax_[elemIdx] = Details::cellZMinMax(element); } }