Added failure checking for solve method.

This commit is contained in:
Kjetil Olsen Lye 2012-05-09 11:28:56 +02:00
parent 832a2adb7f
commit 5cf205f225

View File

@ -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);