mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 18:21:00 -06:00
Allow access to wells pointer for wells.
Using &stdwells.wells() throws an assertion for null pointers without -DNDEBUG, but was used nevertheless. That prevented running models without wells.
This commit is contained in:
parent
227b7f49b7
commit
68f9180a65
@ -223,7 +223,7 @@ namespace detail {
|
|||||||
|
|
||||||
// TODO: put this for now to avoid modify the following code.
|
// TODO: put this for now to avoid modify the following code.
|
||||||
// TODO: this code can be fragile.
|
// TODO: this code can be fragile.
|
||||||
const Wells* wells_arg = &(asImpl().well_model_.wells());
|
const Wells* wells_arg = asImpl().well_model_.wellsPointer();
|
||||||
|
|
||||||
#if HAVE_MPI
|
#if HAVE_MPI
|
||||||
if ( linsolver_.parallelInformation().type() == typeid(ParallelISTLInformation) )
|
if ( linsolver_.parallelInformation().type() == typeid(ParallelISTLInformation) )
|
||||||
|
@ -294,6 +294,12 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Wells*
|
||||||
|
MultisegmentWells::wellsPointer() const
|
||||||
|
{
|
||||||
|
return wells_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,6 +102,8 @@ namespace Opm {
|
|||||||
|
|
||||||
const Wells& wells() const;
|
const Wells& wells() const;
|
||||||
|
|
||||||
|
const Wells* wellsPointer() const;
|
||||||
|
|
||||||
int numPhases() const { return num_phases_; };
|
int numPhases() const { return num_phases_; };
|
||||||
|
|
||||||
int numWells() const { return wells_multisegment_.size(); }
|
int numWells() const { return wells_multisegment_.size(); }
|
||||||
|
@ -74,6 +74,8 @@ namespace Opm {
|
|||||||
|
|
||||||
const Wells& wells() const;
|
const Wells& wells() const;
|
||||||
|
|
||||||
|
const Wells* wellsPointer() const;
|
||||||
|
|
||||||
/// return true if wells are available in the reservoir
|
/// return true if wells are available in the reservoir
|
||||||
bool wellsActive() const;
|
bool wellsActive() const;
|
||||||
void setWellsActive(const bool wells_active);
|
void setWellsActive(const bool wells_active);
|
||||||
|
@ -115,6 +115,10 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Wells* StandardWells::wellsPointer() const
|
||||||
|
{
|
||||||
|
return wells_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user