diff --git a/opm/simulators/flow/BlackoilModelEbos.hpp b/opm/simulators/flow/BlackoilModelEbos.hpp index fa5e753df..984d9138a 100644 --- a/opm/simulators/flow/BlackoilModelEbos.hpp +++ b/opm/simulators/flow/BlackoilModelEbos.hpp @@ -245,6 +245,9 @@ namespace Opm { convergence_reports_.reserve(300); // Often insufficient, but avoids frequent moves. // TODO: remember to fix! if (param_.nonlinear_solver_ == "nldd") { + if (!param_.matrix_add_well_contributions_) { + OPM_THROW(std::runtime_error, "The --nonlinear-solver=nldd option can only be used with --matrix-add-well-contributions=true"); + } if (terminal_output) { OpmLog::info("Using Non-Linear Domain Decomposition solver (nldd)."); } diff --git a/opm/simulators/wells/BlackoilWellModel_impl.hpp b/opm/simulators/wells/BlackoilWellModel_impl.hpp index 74d22edb8..fb0fc2438 100644 --- a/opm/simulators/wells/BlackoilWellModel_impl.hpp +++ b/opm/simulators/wells/BlackoilWellModel_impl.hpp @@ -2668,7 +2668,7 @@ namespace Opm { const Opm::Parallel::Communication& comm = grid().comm(); const int rank = comm.rank(); DeferredLogger local_log; - { + if (!well_domain_.empty()) { std::ostringstream os; os << "Well name Rank Domain\n"; for (const auto& [wname, domain] : well_domain_) {