Add the option of computing the full sparity pattern based on all phases

- For some cases (for instance involving solvent flow) the reasoning for
only adding the pressure derivatives seems to fail. As getting the
sparsity pattern is non-trivial, in terms of work, the full sparsity
pattern is only added when specified by the parameter
"require_full_sparsity_pattern"
- For solvent runs "require_full_sparsity_pattern" defaults to true for
all other runs the default is to only extract the sparsity pattern from
the pressure derivatives.
This commit is contained in:
Tor Harald Sandve
2016-05-11 15:13:52 +02:00
parent d3192028b6
commit 09ab530674
3 changed files with 24 additions and 1 deletions

View File

@@ -107,6 +107,15 @@ namespace Opm
Base::deck_->hasKeyword("SOLVENT")));
}
void setupLinearSolver()
{
// require_full_sparsity_pattern as default for solvent runs
if (Base::deck_->hasKeyword("SOLVENT") && !Base::param_.has("require_full_sparsity_pattern") ) {
Base::param_.insertParameter("require_full_sparsity_pattern","true");
}
Base::setupLinearSolver();
}
};