mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
ECL well manager: hack around recently introduced opm-parser ideosyncrasy
catching an exception for this seems like a pretty bad hack to me, but there seems to be no other way to detect that a deck did not specify a completion radius. (well, one could look at the raw COMPDAT keyword, but that would defeat all benefits of using opm-parser's schedule objects.) this makes ebos work with SPE9 for the current master version of opm-parser again.
This commit is contained in:
parent
e1743929d4
commit
602909c16d
@ -651,7 +651,15 @@ protected:
|
|||||||
const Opm::Completion* completion = compInfo.first;
|
const Opm::Completion* completion = compInfo.first;
|
||||||
std::shared_ptr<Well> eclWell = compInfo.second;
|
std::shared_ptr<Well> eclWell = compInfo.second;
|
||||||
|
|
||||||
eclWell->setRadius(elemCtx, dofIdx, 0.5*completion->getDiameter());
|
// the catch is a hack for a ideosyncrasy of opm-parser with regard to
|
||||||
|
// defaults handling: if the deck did not specify a radius for the
|
||||||
|
// completion, there seems to be no other way to detect this except for
|
||||||
|
// catching the exception
|
||||||
|
try {
|
||||||
|
eclWell->setRadius(elemCtx, dofIdx, 0.5*completion->getDiameter());
|
||||||
|
}
|
||||||
|
catch (const std::logic_error& e)
|
||||||
|
{}
|
||||||
|
|
||||||
// overwrite the automatically computed effective
|
// overwrite the automatically computed effective
|
||||||
// permeability by the one specified in the deck. Note: this
|
// permeability by the one specified in the deck. Note: this
|
||||||
|
Loading…
Reference in New Issue
Block a user