mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2127 Sim Well Branches : Major refactor of sim well branch computation
Remove local branch geometry caches Add checkbox to control if branch detection should be used Add RiaSimWllBranchTools and move helper functions from RimProject
This commit is contained in:
@@ -20,6 +20,10 @@
|
||||
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaSimWellBranchTools.h"
|
||||
#include "RiaWellNameComparer.h"
|
||||
|
||||
#include "RifWellPathFormationsImporter.h"
|
||||
#include "RifWellPathImporter.h"
|
||||
|
||||
@@ -40,9 +44,6 @@
|
||||
|
||||
#include "RivWellPathPartMgr.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaWellNameComparer.h"
|
||||
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
@@ -345,9 +346,8 @@ QList<caf::PdmOptionItemInfo> RimWellPath::calculateValueOptions(const caf::PdmF
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_branchIndex)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
size_t branchCount = RimWellPath::simulationWellBranchCount(m_simWellName);
|
||||
|
||||
size_t branchCount = proj->simulationWellBranches(m_simWellName).size();
|
||||
if (branchCount == 0)
|
||||
branchCount = 1;
|
||||
|
||||
@@ -471,9 +471,10 @@ void RimWellPath::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiO
|
||||
caf::PdmUiGroup* simWellGroup = uiOrdering.addNewGroup("Simulation Well");
|
||||
simWellGroup->add(&m_simWellName);
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if(proj->simulationWellBranches(m_simWellName).size() > 1)
|
||||
if (simulationWellBranchCount(m_simWellName) > 1)
|
||||
{
|
||||
simWellGroup->add(&m_branchIndex);
|
||||
}
|
||||
|
||||
caf::PdmUiGroup* ssihubGroup = uiOrdering.addNewGroup("Well Info");
|
||||
ssihubGroup->add(&id);
|
||||
@@ -581,6 +582,18 @@ void RimWellPath::setupBeforeSave()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RimWellPath::simulationWellBranchCount(const QString& simWellName)
|
||||
{
|
||||
bool detectBranches = true;
|
||||
|
||||
auto branches = RiaSimWellBranchTools::simulationWellBranches(simWellName, detectBranches);
|
||||
|
||||
return branches.size();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user