From 7328b9195836704271d0432601980cea070de641 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 8 Dec 2023 18:26:23 +0100 Subject: [PATCH] adjust to data::CellData changes --- ebos/collecttoiorank_impl.hh | 4 ++-- ebos/eclgenericoutputblackoilmodule.cc | 14 +++++++------- ebos/eclgenericwriter_impl.hh | 6 +++--- ebos/eclwriter.hh | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ebos/collecttoiorank_impl.hh b/ebos/collecttoiorank_impl.hh index f94b1f75b..667c6649c 100644 --- a/ebos/collecttoiorank_impl.hh +++ b/ebos/collecttoiorank_impl.hh @@ -320,7 +320,7 @@ public: // write all cell data registered in local state for (const auto& pair : localCellData_) { - const auto& data = pair.second.data; + const auto& data = pair.second.data(); // write all data from local data to buffer write(buffer, localIndexMap_, data); @@ -333,7 +333,7 @@ public: // its order governs the order the data got received. for (auto& pair : localCellData_) { const std::string& key = pair.first; - auto& data = globalCellData_.data(key); + auto& data = globalCellData_.data(key); //write all data from local cell data to buffer read(buffer, indexMap, data); diff --git a/ebos/eclgenericoutputblackoilmodule.cc b/ebos/eclgenericoutputblackoilmodule.cc index 5ff877d88..a088210fc 100644 --- a/ebos/eclgenericoutputblackoilmodule.cc +++ b/ebos/eclgenericoutputblackoilmodule.cc @@ -633,21 +633,21 @@ setRestart(const data::Solution& sol, { Scalar so = 1.0; if (!saturation_[waterPhaseIdx].empty() && sol.has("SWAT")) { - saturation_[waterPhaseIdx][elemIdx] = sol.data("SWAT")[globalDofIndex]; - so -= sol.data("SWAT")[globalDofIndex]; + saturation_[waterPhaseIdx][elemIdx] = sol.data("SWAT")[globalDofIndex]; + so -= sol.data("SWAT")[globalDofIndex]; } if (!saturation_[gasPhaseIdx].empty() && sol.has("SGAS")) { - saturation_[gasPhaseIdx][elemIdx] = sol.data("SGAS")[globalDofIndex]; - so -= sol.data("SGAS")[globalDofIndex]; + saturation_[gasPhaseIdx][elemIdx] = sol.data("SGAS")[globalDofIndex]; + so -= sol.data("SGAS")[globalDofIndex]; } if (!sSol_.empty()) { // keep the SSOL option for backward compatibility // should be removed after 10.2018 release if (sol.has("SSOL")) - sSol_[elemIdx] = sol.data("SSOL")[globalDofIndex]; + sSol_[elemIdx] = sol.data("SSOL")[globalDofIndex]; else if (sol.has("SSOLVENT")) - sSol_[elemIdx] = sol.data("SSOLVENT")[globalDofIndex]; + sSol_[elemIdx] = sol.data("SSOLVENT")[globalDofIndex]; so -= sSol_[elemIdx]; } @@ -660,7 +660,7 @@ setRestart(const data::Solution& sol, { if (!data.empty() && sol.has(name)) { - data[elemIdx] = sol.data(name)[globalDofIndex]; + data[elemIdx] = sol.data(name)[globalDofIndex]; } }; diff --git a/ebos/eclgenericwriter_impl.hh b/ebos/eclgenericwriter_impl.hh index 63f1ddb13..be1b74a98 100644 --- a/ebos/eclgenericwriter_impl.hh +++ b/ebos/eclgenericwriter_impl.hh @@ -330,18 +330,18 @@ computeTrans_(const std::unordered_map& cartesianToActive, } if (gc2 - gc1 == 1 && cartDims[0] > 1 ) { - tranx.data[gc1] = globalTrans().transmissibility(c1, c2); + tranx.data()[gc1] = globalTrans().transmissibility(c1, c2); continue; // skip other if clauses as they are false, last one needs some computation } if (gc2 - gc1 == cartDims[0] && cartDims[1] > 1) { - trany.data[gc1] = globalTrans().transmissibility(c1, c2); + trany.data()[gc1] = globalTrans().transmissibility(c1, c2); continue; // skipt next if clause as it needs some computation } if ( gc2 - gc1 == cartDims[0]*cartDims[1] || directVerticalNeighbors(cartDims, cartesianToActive, gc1, gc2)) - tranz.data[gc1] = globalTrans().transmissibility(c1, c2); + tranz.data()[gc1] = globalTrans().transmissibility(c1, c2); } } diff --git a/ebos/eclwriter.hh b/ebos/eclwriter.hh index a05e5569c..8279f9c40 100644 --- a/ebos/eclwriter.hh +++ b/ebos/eclwriter.hh @@ -487,7 +487,7 @@ public: auto& tracer_model = simulator_.problem().tracerModel(); for (int tracer_index = 0; tracer_index < tracer_model.numTracers(); tracer_index++) { const auto& tracer_name = tracer_model.fname(tracer_index); - const auto& tracer_solution = restartValues.solution.data(tracer_name); + const auto& tracer_solution = restartValues.solution.template data(tracer_name); for (unsigned elemIdx = 0; elemIdx < numElements; ++elemIdx) { unsigned globalIdx = this->collectToIORank_.localIdxToGlobalIdx(elemIdx); tracer_model.setTracerConcentration(tracer_index, globalIdx, tracer_solution[globalIdx]);