mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5120 from atgeirr/avoid-nldd-crash
Avoid illegal combination of options.
This commit is contained in:
commit
d2af824b27
@ -245,6 +245,9 @@ namespace Opm {
|
|||||||
convergence_reports_.reserve(300); // Often insufficient, but avoids frequent moves.
|
convergence_reports_.reserve(300); // Often insufficient, but avoids frequent moves.
|
||||||
// TODO: remember to fix!
|
// TODO: remember to fix!
|
||||||
if (param_.nonlinear_solver_ == "nldd") {
|
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) {
|
if (terminal_output) {
|
||||||
OpmLog::info("Using Non-Linear Domain Decomposition solver (nldd).");
|
OpmLog::info("Using Non-Linear Domain Decomposition solver (nldd).");
|
||||||
}
|
}
|
||||||
|
@ -2668,7 +2668,7 @@ namespace Opm {
|
|||||||
const Opm::Parallel::Communication& comm = grid().comm();
|
const Opm::Parallel::Communication& comm = grid().comm();
|
||||||
const int rank = comm.rank();
|
const int rank = comm.rank();
|
||||||
DeferredLogger local_log;
|
DeferredLogger local_log;
|
||||||
{
|
if (!well_domain_.empty()) {
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << "Well name Rank Domain\n";
|
os << "Well name Rank Domain\n";
|
||||||
for (const auto& [wname, domain] : well_domain_) {
|
for (const auto& [wname, domain] : well_domain_) {
|
||||||
|
Loading…
Reference in New Issue
Block a user