Added failure checking for solve method.
This commit is contained in:
parent
832a2adb7f
commit
5cf205f225
@ -210,13 +210,16 @@ namespace Opm
|
||||
F.bc = bcs;
|
||||
F.totmob = &totmob[0];
|
||||
F.wdp = &wdp[0];
|
||||
|
||||
int ok = true;
|
||||
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 {
|
||||
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_);
|
||||
}
|
||||
if (!ok) {
|
||||
THROW("Failed assembling pressure system.");
|
||||
}
|
||||
|
||||
linsolver_.solve(h_->A, h_->b, h_->x);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user