From a84d05c83bd6b97b58cf53bfca3670b69f853396 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 14 Jun 2021 09:09:15 +0200 Subject: [PATCH 1/3] fixed: forward classes as classes --- ebos/eclgenericoutputblackoilmodule.hh | 2 +- opm/simulators/wells/BlackoilWellModelGeneric.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ebos/eclgenericoutputblackoilmodule.hh b/ebos/eclgenericoutputblackoilmodule.hh index b2e7529b1..8d1b42f97 100644 --- a/ebos/eclgenericoutputblackoilmodule.hh +++ b/ebos/eclgenericoutputblackoilmodule.hh @@ -44,7 +44,7 @@ namespace Opm { -namespace data { struct Solution; } +namespace data { class Solution; } class EclipseState; template diff --git a/opm/simulators/wells/BlackoilWellModelGeneric.hpp b/opm/simulators/wells/BlackoilWellModelGeneric.hpp index 6e1d18a23..295e80650 100644 --- a/opm/simulators/wells/BlackoilWellModelGeneric.hpp +++ b/opm/simulators/wells/BlackoilWellModelGeneric.hpp @@ -48,7 +48,7 @@ namespace Opm { namespace data { struct GroupData; struct GroupGuideRates; -struct GroupAndNetworkValues; +class GroupAndNetworkValues; struct NodeData; } From 6b5c7b66fdf2b369ec196bd6d32458311c628664 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 14 Jun 2021 09:09:33 +0200 Subject: [PATCH 2/3] fixed: mark methods as override --- opm/simulators/wells/BlackoilWellModel.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/opm/simulators/wells/BlackoilWellModel.hpp b/opm/simulators/wells/BlackoilWellModel.hpp index 6f77fab5b..4929f8224 100644 --- a/opm/simulators/wells/BlackoilWellModel.hpp +++ b/opm/simulators/wells/BlackoilWellModel.hpp @@ -130,18 +130,18 @@ namespace Opm { ///////////// // ///////////// - unsigned numDofs() const + unsigned numDofs() const override // No extra dofs are inserted for wells. (we use a Schur complement.) { return 0; } - void addNeighbors(std::vector& neighbors) const; + void addNeighbors(std::vector& neighbors) const override; - void applyInitial() + void applyInitial() override {} - void linearize(SparseMatrixAdapter& jacobian, GlobalEqVector& res); + void linearize(SparseMatrixAdapter& jacobian, GlobalEqVector& res) override; - void postSolve(GlobalEqVector& deltaX) + void postSolve(GlobalEqVector& deltaX) override { recoverWellSolutionAndUpdateWellState(deltaX); } From 86b454f4c8fa25cb464e6851b4022ae49b38daf7 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 14 Jun 2021 09:10:26 +0200 Subject: [PATCH 3/3] fixed: initialize to avoid sca warning --- opm/simulators/linalg/bda/Reorder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opm/simulators/linalg/bda/Reorder.cpp b/opm/simulators/linalg/bda/Reorder.cpp index 4b02bc8bd..07ee03245 100644 --- a/opm/simulators/linalg/bda/Reorder.cpp +++ b/opm/simulators/linalg/bda/Reorder.cpp @@ -37,7 +37,7 @@ namespace bda template int colorBlockedNodes(int rows, const int *CSRRowPointers, const int *CSRColIndices, const int *CSCColPointers, const int *CSCRowIndices, std::vector& colors, int maxRowsPerColor, int maxColsPerColor) { - int left, c; + int left, c=-1; const int max_tries = 100; // since coloring is random, it is possible that a coloring fails. In that case, try again. std::vector randoms; randoms.resize(rows); @@ -365,4 +365,4 @@ INSTANTIATE_BDA_FUNCTIONS(4); #undef INSTANTIATE_BDA_FUNCTIONS -} //namespace bda \ No newline at end of file +} //namespace bda