Avoid illegal combination of options.

NLDD requires --matrix-add-well-contributions=true for now.

Also: minor improvement to well rank and subdomain output clutter.
This commit is contained in:
Atgeirr Flø Rasmussen
2024-01-24 14:19:07 +01:00
parent 0c359983b7
commit 3c4dd1f3b7
2 changed files with 4 additions and 1 deletions

View File

@@ -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).");
}

View File

@@ -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_) {