mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Added failure checking for solve method.
This commit is contained in:
parent
5253ce7fbe
commit
b5d474beca
@ -210,13 +210,16 @@ namespace Opm
|
|||||||
F.bc = bcs;
|
F.bc = bcs;
|
||||||
F.totmob = &totmob[0];
|
F.totmob = &totmob[0];
|
||||||
F.wdp = &wdp[0];
|
F.wdp = &wdp[0];
|
||||||
|
int ok = true;
|
||||||
if (rock_comp.empty()) {
|
if (rock_comp.empty()) {
|
||||||
ifs_tpfa_assemble(gg, &F, &trans_[0], &gpress_omegaweighted_[0], h_);
|
ok = ifs_tpfa_assemble(gg, &F, &trans_[0], &gpress_omegaweighted_[0], h_);
|
||||||
} else {
|
} else {
|
||||||
ifs_tpfa_assemble_comprock(gg, &F, &trans_[0], &gpress_omegaweighted_[0],
|
ok = ifs_tpfa_assemble_comprock(gg, &F, &trans_[0], &gpress_omegaweighted_[0],
|
||||||
&porevol[0], &rock_comp[0], dt, &pressure[0], h_);
|
&porevol[0], &rock_comp[0], dt, &pressure[0], h_);
|
||||||
}
|
}
|
||||||
|
if (!ok) {
|
||||||
|
THROW("Failed assembling pressure system.");
|
||||||
|
}
|
||||||
|
|
||||||
linsolver_.solve(h_->A, h_->b, h_->x);
|
linsolver_.solve(h_->A, h_->b, h_->x);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user