From 1b8124cc31291ffd1a0ed20dbc73fe23386723b5 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Thu, 21 Mar 2019 12:29:42 +0100 Subject: [PATCH 1/2] EclProblem: remove the initialTemperature_ array this was not used since the fluid states that correspond to the initial condition are kept permanently. --- ebos/eclproblem.hh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index e1448a510..f3a619711 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -1321,12 +1321,10 @@ public: template Scalar temperature(const Context& context, unsigned spaceIdx, unsigned timeIdx) const { - // use the temporally constant temperature, i.e. use the initial temperature of - // the DOF + // use the initial temperature of the DOF if temperature is not a primary + // variable unsigned globalDofIdx = context.globalSpaceIndex(spaceIdx, timeIdx); - if (!initialFluidStates_.empty()) - return initialFluidStates_[globalDofIdx].temperature(/*phaseIdx=*/0); - return initialTemperature_[globalDofIdx]; + return initialFluidStates_[globalDofIdx].temperature(/*phaseIdx=*/0); } /*! @@ -2666,7 +2664,6 @@ private: std::vector maxPolymerAdsorption_; std::vector initialFluidStates_; - std::vector initialTemperature_; std::vector polymerConcentration_; // polymer molecular weight From f1d3be27a77d5740ddef2616ddeada89f52e2862 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Thu, 21 Mar 2019 12:31:12 +0100 Subject: [PATCH 2/2] ISTLSolverEbos: fix valgrind complaint that isIORank_ is not initialized like most of the rest of the code, we now simply assume that rank 0 does all printing. --- opm/autodiff/ISTLSolverEbos.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opm/autodiff/ISTLSolverEbos.hpp b/opm/autodiff/ISTLSolverEbos.hpp index a336d92eb..0031cdc87 100644 --- a/opm/autodiff/ISTLSolverEbos.hpp +++ b/opm/autodiff/ISTLSolverEbos.hpp @@ -492,7 +492,9 @@ protected: // TODO: Revise when linear solvers interface opm-core is done // Construct linear solver. // GMRes solver - int verbosity = ( isIORank_ ) ? parameters_.linear_solver_verbosity_ : 0; + int verbosity = 0; + if (simulator_.gridView().comm().rank() == 0) + verbosity = parameters_.linear_solver_verbosity_; if ( parameters_.newton_use_gmres_ ) { Dune::RestartedGMResSolver linsolve(opA, sp, precond, @@ -836,7 +838,6 @@ protected: mutable int iterations_; mutable bool converged_; boost::any parallelInformation_; - bool isIORank_; std::unique_ptr matrix_; Vector *rhs_;