From 9624eb7185aa518a54b99ccfeef655fedd5615df Mon Sep 17 00:00:00 2001 From: Antonella Ritorto Date: Wed, 18 Dec 2024 16:34:37 +0100 Subject: [PATCH] Do not write initial FIP for CpGrid with LGRs for now --- opm/simulators/flow/FlowProblemBlackoil.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/opm/simulators/flow/FlowProblemBlackoil.hpp b/opm/simulators/flow/FlowProblemBlackoil.hpp index 5fe468b10..3540b1da0 100644 --- a/opm/simulators/flow/FlowProblemBlackoil.hpp +++ b/opm/simulators/flow/FlowProblemBlackoil.hpp @@ -562,8 +562,16 @@ public: // the initial solution. this->thresholdPressures_.finishInit(); - if (this->simulator().episodeIndex() == 0) { - eclWriter_->writeInitialFIPReport(); + // For CpGrid with LGRs, ecl-output is not supported yet. + const auto& grid = this->simulator().vanguard().gridView().grid(); + + using GridType = std::remove_cv_t>; + constexpr bool isCpGrid = std::is_same_v; + // Skip - for now - calculate the initial fip values for CpGrid with LGRs. + if (!isCpGrid || (grid.maxLevel() == 0)) { + if (this->simulator().episodeIndex() == 0) { + eclWriter_->writeInitialFIPReport(); + } } }