mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-08 15:33:02 -06:00
Clone wells object when constructing from existing.
This installs a measure of safety on the part of the interface in that the caller is free to dispose of the wells object upon returning from the WellsManager constructor.
This commit is contained in:
parent
044c13e9fb
commit
d6154d8961
@ -223,8 +223,12 @@ namespace Opm
|
||||
: w_(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// Construct from existing wells object.
|
||||
WellsManager::WellsManager(struct Wells* W)
|
||||
: w_(W)
|
||||
: w_(clone_wells(W))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -42,8 +42,12 @@ namespace Opm
|
||||
public:
|
||||
/// Default constructor -- no wells.
|
||||
WellsManager();
|
||||
/// Construct from mrst type output.
|
||||
/// Wellmanger is not properly initialized
|
||||
|
||||
/// Construct from existing wells object.
|
||||
/// WellsManager is not properly initialised in the sense that the logic to
|
||||
/// manage control switching does not exist.
|
||||
///
|
||||
/// @param[in] W Existing wells object.
|
||||
WellsManager(struct Wells* W);
|
||||
|
||||
/// Construct from input deck and grid.
|
||||
|
Loading…
Reference in New Issue
Block a user