diff --git a/opm/core/grid/PinchProcessor.hpp b/opm/core/grid/PinchProcessor.hpp index a4e3aff1..0709c38c 100755 --- a/opm/core/grid/PinchProcessor.hpp +++ b/opm/core/grid/PinchProcessor.hpp @@ -53,10 +53,9 @@ namespace Opm /// \param[in] htrans half cell transmissibility, size is number of cellfaces. /// \param[in] multz Z+ transmissibility multiplier for all active cells /// \param[in] pv pore volume for all the cartesian cells - /// \param[in] dz dz for all the cartesian cells /// \param[in] nnc non-neighbor connection class /// Algorithm: - /// 1. Mark all the cells which pv and dz less than minpvValue and thickness. + /// 1. Mark all the cells which pv less than minpvValue. /// 2. Find out proper pinchouts column and associate top and bottom cells. /// 3. Compute transmissibility for nncs. /// 4. Apply multz due to different multz options. @@ -65,7 +64,6 @@ namespace Opm const std::vector& actnum, const std::vector& multz, const std::vector& pv, - const std::vector& dz, NNC& nnc); private: @@ -75,10 +73,8 @@ namespace Opm PinchMode::ModeEnum multzMode_; /// Mark minpved cells. - std::vector getMinpvCells_(const Grid& grid, - const std::vector& actnum, - const std::vector& pv, - const std::vector& dz); + std::vector getMinpvCells_(const std::vector& actnum, + const std::vector& pv); /// Get the interface for two cells. int interface_(const Grid& grid, @@ -94,8 +90,7 @@ namespace Opm std::vector > getPinchoutsColumn_(const Grid& grid, const std::vector& actnum, - const std::vector& pv, - const std::vector& dz); + const std::vector& pv); /// Get global cell index. int getGlobalIndex_(const int i, const int j, const int k, const int* dims); @@ -108,8 +103,7 @@ namespace Opm std::vector transCompute_(const Grid& grid, const std::vector& htrans, const std::vector& pinCells, - const std::vector& pinFaces, - const std::vector& multz); + const std::vector& pinFaces); /// Get map between half-trans index and the pair of face index and cell index. std::vector getHfIdxMap_(const Grid& grid); @@ -124,7 +118,6 @@ namespace Opm const std::vector& actnum, const std::vector& multz, const std::vector& pv, - const std::vector& dz, NNC& nnc); /// Item 5 in PINCH keyword. @@ -239,10 +232,8 @@ namespace Opm template - inline std::vector PinchProcessor::getMinpvCells_(const Grid& grid, - const std::vector& actnum, - const std::vector& pv, - const std::vector& dz) + inline std::vector PinchProcessor::getMinpvCells_(const std::vector& actnum, + const std::vector& pv) { std::vector minpvCells(pv.size(), 0); for (int idx = 0; idx < static_cast(pv.size()); ++idx) { @@ -297,8 +288,7 @@ namespace Opm inline std::vector PinchProcessor::transCompute_(const Grid& grid, const std::vector& htrans, const std::vector& pinCells, - const std::vector& pinFaces, - const std::vector& multz) + const std::vector& pinFaces) { const int nc = Opm::UgGridHelpers::numCells(grid); const int nf = Opm::UgGridHelpers::numFaces(grid); @@ -342,11 +332,10 @@ namespace Opm template inline std::vector> PinchProcessor::getPinchoutsColumn_(const Grid& grid, const std::vector& actnum, - const std::vector& pv, - const std::vector& dz) + const std::vector& pv) { const int* dims = Opm::UgGridHelpers::cartDims(grid); - std::vector minpvCells = getMinpvCells_(grid, actnum, pv, dz); + std::vector minpvCells = getMinpvCells_(actnum, pv); std::vector> segment; for (int z = 0; z < dims[2]; ++z) { for (int y = 0; y < dims[1]; ++y) { @@ -382,14 +371,13 @@ namespace Opm const std::vector& actnum, const std::vector& multz, const std::vector& pv, - const std::vector& dz, NNC& nnc) { const int* dims = Opm::UgGridHelpers::cartDims(grid); std::vector pinFaces; std::vector pinCells; std::vector > newSeg; - auto minpvSeg = getPinchoutsColumn_(grid, actnum, pv, dz); + auto minpvSeg = getPinchoutsColumn_(grid, actnum, pv); for (auto& seg : minpvSeg) { std::array ijk1 = getCartIndex_(seg.front(), dims); std::array ijk2 = getCartIndex_(seg.back(), dims); @@ -436,7 +424,7 @@ namespace Opm } } - auto faceTrans = transCompute_(grid, htrans, pinCells, pinFaces, multz); + auto faceTrans = transCompute_(grid, htrans, pinCells, pinFaces); auto multzmap = multzOptions_(grid, pinCells, pinFaces, multz, newSeg); applyMultz_(faceTrans, multzmap); for (int i = 0; i < static_cast(pinCells.size())/2; ++i) { @@ -499,10 +487,9 @@ namespace Opm const std::vector& actnum, const std::vector& multz, const std::vector& pv, - const std::vector& dz, NNC& nnc) { - transTopbot_(grid, htrans, actnum, multz, pv, dz, nnc); + transTopbot_(grid, htrans, actnum, multz, pv, nnc); } } // namespace Opm diff --git a/tests/test_pinchprocessor.cpp b/tests/test_pinchprocessor.cpp index 9bfb2b2d..7c4ca05d 100644 --- a/tests/test_pinchprocessor.cpp +++ b/tests/test_pinchprocessor.cpp @@ -26,7 +26,11 @@ #define NVERBOSE // Suppress own messages when throw()in #define BOOST_TEST_MODULE PinchProcessorTest + +#include #include +#include + #include #include #include @@ -76,7 +80,7 @@ BOOST_AUTO_TEST_CASE(Processing) std::vector actnum; eclgrid->exportACTNUM(actnum); - if (actnum.empty() && (nc == eclgrid->getCartesianSize())) { + if (actnum.empty() && (nc == int(eclgrid->getCartesianSize()))) { actnum.assign(nc, 1); } std::vector htrans(Opm::UgGridHelpers::numCellFaces(grid)); @@ -84,12 +88,11 @@ BOOST_AUTO_TEST_CASE(Processing) tpfa_htrans_compute(ug, rock.permeability(), htrans.data()); auto transMult = eclstate->getTransMult(); std::vector multz(nc, 0.0); - std::vector dz(porv.size(), 0.0); for (int i = 0; i < nc; ++i) { multz[i] = transMult->getMultiplier(global_cell[i], Opm::FaceDir::ZPlus); } Opm::NNC nnc(deck, eclgrid); - pinch.process(grid, htrans, actnum, multz, porv, dz, nnc); + pinch.process(grid, htrans, actnum, multz, porv, nnc); auto nnc1 = nnc.nnc1(); auto nnc2 = nnc.nnc2(); auto trans = nnc.trans();