Merge pull request #4226 from hnil/remove_assert_cprw

removed assert in cprw for strictly positive diagonal well coupling
This commit is contained in:
Atgeirr Flø Rasmussen 2022-11-14 12:42:37 +01:00 committed by GitHub
commit 5107bcfada
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -814,8 +814,18 @@ namespace Opm
diag_ell -= matel;
}
}
assert(diag_ell > 0.0);
#define EXTRA_DEBUG_MSW 0
#if EXTRA_DEBUG_MSW
if(not(diag_ell > 0.0)){
std::stringstream msg;
msg << "Diagonal element for cprw on "
<< this->name()
<< " is " << diag_ell;
OpmLog::warning(msg.str());
}
#endif
#undef EXTRA_DEBUG_MSW
jacobian[welldof_ind][welldof_ind] = diag_ell;
}else{
jacobian[welldof_ind][welldof_ind] = 1.0; // maybe we could have used diag_ell if calculated
@ -1579,6 +1589,7 @@ namespace Opm
sstr << " " << measure_history[i] << " \n";
}
#endif
#undef EXTRA_DEBUG_MSW
deferred_logger.debug(sstr.str());
}