mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge branch 'dev' into dev-deeper
This commit is contained in:
@@ -632,6 +632,17 @@ cvf::BoundingBox RimFishbonesMultipleSubs::boundingBoxInDomainCoords() const
|
||||
return bb;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFishbonesMultipleSubs::isEnabled() const
|
||||
{
|
||||
RimFishbonesCollection* collection;
|
||||
this->firstAncestorOrThisOfTypeAsserted(collection);
|
||||
|
||||
return collection->isChecked() && isActive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -110,6 +110,7 @@ public:
|
||||
cvf::BoundingBox boundingBoxInDomainCoords() const override;
|
||||
|
||||
// Overrides from RimWellPathCompletionsInterface
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
#include "RimStimPlanColors.h"
|
||||
#include "RimStimPlanFractureTemplate.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "RivWellFracturePartMgr.h"
|
||||
|
||||
@@ -286,6 +287,16 @@ void RimFracture::clearCachedNonDarcyProperties()
|
||||
m_cachedFractureProperties = NonDarcyData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFracture::isEnabled() const
|
||||
{
|
||||
RimWellPathFractureCollection* fractureCollection = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(fractureCollection);
|
||||
return fractureCollection->isChecked() && isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -129,6 +129,7 @@ public:
|
||||
friend class RimFractureTemplate;
|
||||
|
||||
// RimWellPathCompletionsInterface overrides.
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
@@ -49,14 +49,6 @@ RimNonDarcyPerforationParameters::RimNonDarcyPerforationParameters()
|
||||
|
||||
CAF_PDM_InitField(&m_userDefinedDFactor, "UserDefinedDFactor", 1.0, "D Factor", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_unitConstant,
|
||||
"UnitConstant",
|
||||
1.0,
|
||||
"<html> Unit Constant (α)</html>",
|
||||
"",
|
||||
"<html>Unit:[cP*Day*m<sup>2</sup>/(Forch*mD*Sm<sup>3</sup>)]</html>",
|
||||
"");
|
||||
|
||||
CAF_PDM_InitField(&m_gridPermeabilityScalingFactor,
|
||||
"GridPermeabilityScalingFactor",
|
||||
1.0,
|
||||
@@ -65,7 +57,7 @@ RimNonDarcyPerforationParameters::RimNonDarcyPerforationParameters()
|
||||
"",
|
||||
"");
|
||||
|
||||
CAF_PDM_InitField(&m_wellRadius, "WellRadius", 0.15, "<html>Well Radius (r<sub>w</sub>)</html> [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_wellRadius, "WellRadius", 0.108, "<html>Well Radius (r<sub>w</sub>)</html> [m]", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_relativeGasDensity,
|
||||
"RelativeGasDensity",
|
||||
@@ -117,14 +109,6 @@ double RimNonDarcyPerforationParameters::userDefinedDFactor() const
|
||||
return m_userDefinedDFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimNonDarcyPerforationParameters::unitConstant() const
|
||||
{
|
||||
return m_unitConstant;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -210,7 +194,6 @@ void RimNonDarcyPerforationParameters::defineUiOrdering(QString uiConfigName, ca
|
||||
{
|
||||
{
|
||||
auto group = nonDarcyFlowGroup->addNewGroup("Parameters");
|
||||
group->add(&m_unitConstant);
|
||||
group->add(&m_gridPermeabilityScalingFactor);
|
||||
group->add(&m_wellRadius);
|
||||
group->add(&m_relativeGasDensity);
|
||||
|
||||
@@ -40,7 +40,6 @@ public:
|
||||
|
||||
NonDarcyFlowEnum nonDarcyFlowType() const;
|
||||
double userDefinedDFactor() const;
|
||||
double unitConstant() const;
|
||||
double gridPermeabilityScalingFactor() const;
|
||||
double wellRadius() const;
|
||||
double relativeGasDensity() const;
|
||||
@@ -57,7 +56,6 @@ private:
|
||||
caf::PdmField<caf::AppEnum<NonDarcyFlowEnum>> m_nonDarcyFlowType;
|
||||
caf::PdmField<double> m_userDefinedDFactor;
|
||||
|
||||
caf::PdmField<double> m_unitConstant;
|
||||
caf::PdmField<double> m_gridPermeabilityScalingFactor;
|
||||
caf::PdmField<double> m_wellRadius;
|
||||
caf::PdmField<double> m_relativeGasDensity;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RimPerforationCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathValve.h"
|
||||
@@ -232,6 +233,16 @@ std::vector<RimWellPathValve*> RimPerforationInterval::valves() const
|
||||
return allValves;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPerforationInterval::isEnabled() const
|
||||
{
|
||||
RimPerforationCollection* perforationCollection;
|
||||
this->firstAncestorOrThisOfTypeAsserted(perforationCollection);
|
||||
return perforationCollection->isChecked() && isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -70,6 +70,7 @@ public:
|
||||
std::vector<RimWellPathValve*> valves() const;
|
||||
|
||||
// RimWellPathCompletionInterface overrides
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
class RimWellPathComponentInterface
|
||||
{
|
||||
public:
|
||||
virtual bool isEnabled() const = 0;
|
||||
virtual RiaDefines::WellPathComponentType componentType() const = 0;
|
||||
virtual QString componentLabel() const = 0;
|
||||
virtual QString componentTypeLabel() const = 0;
|
||||
|
||||
@@ -103,6 +103,16 @@ std::vector<double> RimWellPathValve::valveLocations() const
|
||||
return valveDepths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPathValve::isEnabled() const
|
||||
{
|
||||
RimPerforationInterval* perforationInterval = nullptr;
|
||||
this->firstAncestorOrThisOfType(perforationInterval);
|
||||
return perforationInterval->isEnabled() && isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
std::vector<double> valveLocations() const;
|
||||
|
||||
// Overrides from RimWellPathCompletionInterface
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
@@ -138,7 +138,7 @@ QString Rim3dWellLogExtractionCurve::resultPropertyString() const
|
||||
QString name;
|
||||
if (eclipseCase)
|
||||
{
|
||||
name = caf::Utils::makeValidFileBasename(m_eclipseResultDefinition->resultVariableUiName());
|
||||
name = caf::Utils::makeValidFileBasename(m_eclipseResultDefinition->resultVariableUiShortName());
|
||||
}
|
||||
else if (geoMechCase)
|
||||
{
|
||||
|
||||
@@ -658,8 +658,8 @@ void RimContourMapProjection::defineUiOrdering(QString uiConfigName, caf::PdmUiO
|
||||
{
|
||||
caf::PdmUiGroup* mainGroup = uiOrdering.addNewGroup("Projection Settings");
|
||||
mainGroup->add(&m_relativeSampleSpacing);
|
||||
mainGroup->add(&m_resultAggregation);
|
||||
mainGroup->add(&m_showContourLines);
|
||||
mainGroup->add(&m_resultAggregation);
|
||||
|
||||
caf::PdmUiGroup* weightingGroup = uiOrdering.addNewGroup("Mean Weighting Options");
|
||||
weightingGroup->add(&m_weightByParameter);
|
||||
|
||||
@@ -553,11 +553,11 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
{
|
||||
if ( fieldNeedingOptions == &m_resultVariableUiField )
|
||||
{
|
||||
options.push_back(calcTimeOfFlightOptionItem());
|
||||
options.push_back(caf::PdmOptionItemInfo(timeOfFlightString(false), RIG_FLD_TOF_RESNAME));
|
||||
if (m_phaseSelection() == RigFlowDiagResultAddress::PHASE_ALL)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo("Tracer Cell Fraction (Sum)", RIG_FLD_CELL_FRACTION_RESNAME));
|
||||
options.push_back(calcMaxFractionTracerOptionItem());
|
||||
options.push_back(caf::PdmOptionItemInfo(maxFractionTracerString(false), RIG_FLD_MAX_FRACTION_TRACER_RESNAME));
|
||||
options.push_back(caf::PdmOptionItemInfo("Injector Producer Communication", RIG_FLD_COMMUNICATION_RESNAME));
|
||||
}
|
||||
}
|
||||
@@ -742,69 +742,7 @@ QString RimEclipseResultDefinition::resultVariableUiName() const
|
||||
{
|
||||
if (resultType() == RiaDefines::FLOW_DIAGNOSTICS)
|
||||
{
|
||||
QString fullName;
|
||||
|
||||
if (m_flowTracerSelectionMode() == FLOW_TR_BY_SELECTION)
|
||||
{
|
||||
RigFlowDiagResultAddress flowDiagRes = flowDiagResAddress();
|
||||
|
||||
bool allInjectors = injectorSelectionState() == ALL_SELECTED;
|
||||
bool allProducers = producerSelectionState() == ALL_SELECTED;
|
||||
|
||||
if (allInjectors && allProducers)
|
||||
{
|
||||
QString allTracersText = caf::AppEnum< FlowTracerSelectionType >::uiText(FLOW_TR_INJ_AND_PROD);
|
||||
|
||||
fullName = QString::fromStdString(flowDiagResAddress().uiShortText());
|
||||
fullName += QString(" (%1)").arg(allTracersText);
|
||||
}
|
||||
else if (allInjectors)
|
||||
{
|
||||
QStringList fullTracerList;
|
||||
QStringList listOfSelectedProducers;
|
||||
QString allInjectorsText = caf::AppEnum< FlowTracerSelectionType >::uiText(FLOW_TR_INJECTORS);
|
||||
for (const QString& producer : m_selectedProducerTracers())
|
||||
{
|
||||
listOfSelectedProducers.push_back(producer);
|
||||
}
|
||||
fullTracerList.push_back(allInjectorsText);
|
||||
if (!listOfSelectedProducers.empty())
|
||||
{
|
||||
fullTracerList.push_back(listOfSelectedProducers.join(", "));
|
||||
}
|
||||
fullName = QString::fromStdString(flowDiagResAddress().uiShortText());
|
||||
fullName += QString(" (%1)").arg(fullTracerList.join(", "));
|
||||
}
|
||||
else if (allProducers)
|
||||
{
|
||||
QStringList fullTracerList;
|
||||
QStringList listOfSelectedInjectors;
|
||||
QString allProducersText = caf::AppEnum< FlowTracerSelectionType >::uiText(FLOW_TR_PRODUCERS);
|
||||
for (const QString& injector : m_selectedInjectorTracers())
|
||||
{
|
||||
listOfSelectedInjectors.push_back(injector);
|
||||
}
|
||||
fullTracerList.push_back(allProducersText);
|
||||
if (!listOfSelectedInjectors.empty())
|
||||
{
|
||||
fullTracerList.push_back(listOfSelectedInjectors.join(", "));
|
||||
}
|
||||
|
||||
fullName = QString::fromStdString(flowDiagResAddress().uiShortText());
|
||||
fullName += QString(" (%1)").arg(fullTracerList.join(", "));
|
||||
}
|
||||
else
|
||||
{
|
||||
fullName = QString::fromStdString(flowDiagResAddress().uiText());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fullName = QString::fromStdString(flowDiagResAddress().uiShortText());
|
||||
fullName += QString(" (%1)").arg(m_flowTracerSelectionMode().uiText());
|
||||
}
|
||||
|
||||
return fullName;
|
||||
return flowDiagResUiText(false, 32);
|
||||
}
|
||||
|
||||
return m_resultVariable();
|
||||
@@ -817,16 +755,7 @@ QString RimEclipseResultDefinition::resultVariableUiShortName() const
|
||||
{
|
||||
if (resultType() == RiaDefines::FLOW_DIAGNOSTICS)
|
||||
{
|
||||
QString candidate = resultVariableUiName();
|
||||
QString postfix = "...)";
|
||||
int stringSizeLimit = 32;
|
||||
if (candidate.size() > stringSizeLimit + postfix.size())
|
||||
{
|
||||
candidate = candidate.left(stringSizeLimit);
|
||||
candidate += postfix;
|
||||
}
|
||||
|
||||
return candidate;
|
||||
return flowDiagResUiText(true, 24);
|
||||
}
|
||||
|
||||
return m_resultVariable();
|
||||
@@ -1279,6 +1208,37 @@ bool RimEclipseResultDefinition::hasDualPorFractureResult()
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimEclipseResultDefinition::flowDiagResUiText(bool shortLabel, int maxTracerStringLength) const
|
||||
{
|
||||
QString uiText = QString::fromStdString(flowDiagResAddress().variableName);
|
||||
if (flowDiagResAddress().variableName == RIG_FLD_TOF_RESNAME)
|
||||
{
|
||||
uiText = timeOfFlightString(shortLabel);
|
||||
}
|
||||
else if (flowDiagResAddress().variableName == RIG_FLD_MAX_FRACTION_TRACER_RESNAME)
|
||||
{
|
||||
uiText = maxFractionTracerString(shortLabel);
|
||||
}
|
||||
|
||||
QString tracersString = selectedTracersString();
|
||||
|
||||
if (!tracersString.isEmpty())
|
||||
{
|
||||
const QString postfix = "...";
|
||||
|
||||
if (tracersString.size() > maxTracerStringLength + postfix.size())
|
||||
{
|
||||
tracersString = tracersString.left(maxTracerStringLength);
|
||||
tracersString += postfix;
|
||||
}
|
||||
uiText += QString("\n%1").arg(tracersString);
|
||||
}
|
||||
return uiText;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1407,53 +1367,122 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calcOptionsForSelected
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmOptionItemInfo RimEclipseResultDefinition::calcTimeOfFlightOptionItem()
|
||||
QString RimEclipseResultDefinition::timeOfFlightString(bool shorter) const
|
||||
{
|
||||
QString tofString;
|
||||
bool multipleSelected = false;
|
||||
if (injectorSelectionState() != NONE_SELECTED && producerSelectionState() != NONE_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Residence Time (Average)", RIG_FLD_TOF_RESNAME);
|
||||
tofString = shorter ? "Res.Time" : "Residence Time";
|
||||
multipleSelected = true;
|
||||
}
|
||||
else if (injectorSelectionState() == ONE_SELECTED && producerSelectionState() == NONE_SELECTED)
|
||||
else if (injectorSelectionState() != NONE_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Forward Time Of Flight", RIG_FLD_TOF_RESNAME);
|
||||
tofString = shorter ? "Fwd.TOF" : "Forward Time Of Flight";
|
||||
}
|
||||
else if (injectorSelectionState() >= MULTIPLE_SELECTED && producerSelectionState() == NONE_SELECTED)
|
||||
else if (producerSelectionState() != NONE_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Forward Time Of Flight (Average)", RIG_FLD_TOF_RESNAME);
|
||||
tofString = shorter ? "Rev.TOF" : "Reverse Time Of Flight";
|
||||
}
|
||||
else if (injectorSelectionState() == NONE_SELECTED && producerSelectionState() == ONE_SELECTED)
|
||||
else
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Reverse Time Of Flight", RIG_FLD_TOF_RESNAME);
|
||||
tofString = shorter ? "TOF" : "Time Of Flight";
|
||||
}
|
||||
else if (injectorSelectionState() == NONE_SELECTED && producerSelectionState() >= MULTIPLE_SELECTED)
|
||||
|
||||
multipleSelected = multipleSelected ||
|
||||
injectorSelectionState() >= MULTIPLE_SELECTED || producerSelectionState() >= MULTIPLE_SELECTED;
|
||||
|
||||
if (multipleSelected && !shorter)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Reverse Time Of Flight (Average)", RIG_FLD_TOF_RESNAME);
|
||||
tofString += " (Average)";
|
||||
}
|
||||
return caf::PdmOptionItemInfo("Time Of Flight", RIG_FLD_TOF_RESNAME);
|
||||
return tofString;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmOptionItemInfo RimEclipseResultDefinition::calcMaxFractionTracerOptionItem()
|
||||
QString RimEclipseResultDefinition::maxFractionTracerString(bool shorter) const
|
||||
{
|
||||
if (injectorSelectionState() == ONE_SELECTED && producerSelectionState() == NONE_SELECTED)
|
||||
QString mfString;
|
||||
if (injectorSelectionState() >= ONE_SELECTED && producerSelectionState() == NONE_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Flooding Region", RIG_FLD_MAX_FRACTION_TRACER_RESNAME);
|
||||
mfString = shorter ? "FloodReg" : "Flooding Region";
|
||||
if (injectorSelectionState() >= MULTIPLE_SELECTED)
|
||||
mfString += "s";
|
||||
}
|
||||
else if (injectorSelectionState() >= MULTIPLE_SELECTED && producerSelectionState() == NONE_SELECTED)
|
||||
else if (injectorSelectionState() == NONE_SELECTED && producerSelectionState() >= ONE_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Flooding Regions", RIG_FLD_MAX_FRACTION_TRACER_RESNAME);
|
||||
mfString = shorter ? "DrainReg" : "Drainage Region";
|
||||
if (producerSelectionState() >= MULTIPLE_SELECTED)
|
||||
mfString += "s";
|
||||
}
|
||||
else if (injectorSelectionState() == NONE_SELECTED && producerSelectionState() == ONE_SELECTED)
|
||||
else
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Drainage Region", RIG_FLD_MAX_FRACTION_TRACER_RESNAME);
|
||||
mfString = shorter ? "Drain&FloodReg" : "Drainage/Flooding Regions";
|
||||
}
|
||||
else if (injectorSelectionState() == NONE_SELECTED && producerSelectionState() >= MULTIPLE_SELECTED)
|
||||
return mfString;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimEclipseResultDefinition::selectedTracersString() const
|
||||
{
|
||||
QStringList fullTracersList;
|
||||
|
||||
FlowTracerSelectionState injectorState = injectorSelectionState();
|
||||
FlowTracerSelectionState producerState = producerSelectionState();
|
||||
|
||||
if (injectorState == ALL_SELECTED && producerState == ALL_SELECTED)
|
||||
{
|
||||
return caf::PdmOptionItemInfo("Drainage Regions", RIG_FLD_MAX_FRACTION_TRACER_RESNAME);
|
||||
fullTracersList += caf::AppEnum<FlowTracerSelectionType>::uiText(FLOW_TR_INJ_AND_PROD);
|
||||
}
|
||||
return caf::PdmOptionItemInfo("Drainage/Flooding Regions", RIG_FLD_MAX_FRACTION_TRACER_RESNAME);
|
||||
else
|
||||
{
|
||||
if (injectorState == ALL_SELECTED)
|
||||
{
|
||||
fullTracersList += caf::AppEnum<FlowTracerSelectionType>::uiText(FLOW_TR_INJECTORS);
|
||||
}
|
||||
|
||||
if (producerState == ALL_SELECTED)
|
||||
{
|
||||
fullTracersList += caf::AppEnum<FlowTracerSelectionType>::uiText(FLOW_TR_PRODUCERS);
|
||||
}
|
||||
|
||||
if (injectorSelectionState() == ONE_SELECTED || injectorSelectionState() == MULTIPLE_SELECTED)
|
||||
{
|
||||
QStringList listOfSelectedInjectors;
|
||||
for (const QString& injector : m_selectedInjectorTracers())
|
||||
{
|
||||
listOfSelectedInjectors.push_back(injector);
|
||||
}
|
||||
if (!listOfSelectedInjectors.empty())
|
||||
{
|
||||
fullTracersList += listOfSelectedInjectors.join(", ");
|
||||
}
|
||||
}
|
||||
|
||||
if (producerSelectionState() == ONE_SELECTED || producerSelectionState() == MULTIPLE_SELECTED)
|
||||
{
|
||||
QStringList listOfSelectedProducers;
|
||||
for (const QString& producer : m_selectedProducerTracers())
|
||||
{
|
||||
listOfSelectedProducers.push_back(producer);
|
||||
}
|
||||
if (!listOfSelectedProducers.empty())
|
||||
{
|
||||
fullTracersList.push_back(listOfSelectedProducers.join(", "));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QString tracersText;
|
||||
if (!fullTracersList.empty())
|
||||
{
|
||||
tracersText = fullTracersList.join(", ");
|
||||
}
|
||||
return tracersText;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -163,15 +163,19 @@ private:
|
||||
bool operator()(const QString& lhs, const QString& rhs) const;
|
||||
};
|
||||
|
||||
private:
|
||||
private:
|
||||
void assignFlowSolutionFromCase();
|
||||
|
||||
bool hasDualPorFractureResult();
|
||||
|
||||
QString flowDiagResUiText(bool shortLabel, int maxTracerStringLength = std::numeric_limits<int>::max()) const;
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calcOptionsForVariableUiFieldStandard();
|
||||
QList<caf::PdmOptionItemInfo> calcOptionsForSelectedTracerField(bool injector);
|
||||
caf::PdmOptionItemInfo calcTimeOfFlightOptionItem();
|
||||
caf::PdmOptionItemInfo calcMaxFractionTracerOptionItem();
|
||||
QString timeOfFlightString(bool shorter) const;
|
||||
QString maxFractionTracerString(bool shorter) const;
|
||||
|
||||
QString selectedTracersString() const;
|
||||
|
||||
void changedTracerSelectionField(bool injector);
|
||||
QStringList getResultNamesForCurrentUiResultType();
|
||||
|
||||
@@ -1139,7 +1139,7 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel,
|
||||
|
||||
if (resultColors->hasResult() && resultColors->legendConfig()->showLegend())
|
||||
{
|
||||
resultColors->legendConfig()->setTitle(legendLabel + resultColors->resultVariableUiShortName());
|
||||
resultColors->legendConfig()->setTitle(legendLabel + resultColors->resultVariableUiName());
|
||||
m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->titledOverlayFrame());
|
||||
}
|
||||
|
||||
|
||||
@@ -794,7 +794,7 @@ QString RimWellLogExtractionCurve::wellLogChannelName() const
|
||||
QString name;
|
||||
if (eclipseCase)
|
||||
{
|
||||
name = caf::Utils::makeValidFileBasename( m_eclipseResultDefinition->resultVariableUiName());
|
||||
name = caf::Utils::makeValidFileBasename( m_eclipseResultDefinition->resultVariableUiShortName());
|
||||
}
|
||||
else if (geoMechCase)
|
||||
{
|
||||
|
||||
@@ -1799,7 +1799,6 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
m_wellPathAttributePlotObjects.push_back(std::unique_ptr<RiuWellPathComponentPlotItem>(new RiuWellPathComponentPlotItem(wellPathAttributeSource())));
|
||||
}
|
||||
|
||||
|
||||
if (m_showWellPathAttributes)
|
||||
{
|
||||
if (m_wellPathAttributeCollection)
|
||||
@@ -1813,13 +1812,16 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
std::set<QString> attributesAssignedToLegend;
|
||||
for (RimWellPathAttribute* attribute : attributes)
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), attribute));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathAttributesInLegend() &&
|
||||
!attributesAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
attributesAssignedToLegend.insert(legendTitle);
|
||||
if (attribute->isEnabled())
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), attribute));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathAttributesInLegend() &&
|
||||
!attributesAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
attributesAssignedToLegend.insert(legendTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1831,13 +1833,16 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
std::set<QString> completionsAssignedToLegend;
|
||||
for (const RimWellPathComponentInterface* completion : allCompletions)
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), completion));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathCompletionsInLegend() &&
|
||||
!completionsAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
completionsAssignedToLegend.insert(legendTitle);
|
||||
if (completion->isEnabled())
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem(new RiuWellPathComponentPlotItem(wellPathAttributeSource(), completion));
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathCompletionsInLegend() &&
|
||||
!completionsAssignedToLegend.count(legendTitle);
|
||||
plotItem->setContributeToLegend(contributeToLegend);
|
||||
m_wellPathAttributePlotObjects.push_back(std::move(plotItem));
|
||||
completionsAssignedToLegend.insert(legendTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -188,6 +188,14 @@ double RimWellPath::wellPathRadiusScaleFactor() const
|
||||
return m_wellPathRadiusScaleFactor();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPath::isEnabled() const
|
||||
{
|
||||
return m_showWellPath;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -124,6 +124,7 @@ public:
|
||||
|
||||
|
||||
// RimWellPathComponentInterface overrides
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
@@ -91,6 +91,16 @@ void RimWellPathAttribute::setDepthsFromWellPath(const RimWellPath* wellPath)
|
||||
m_endMD = wellPath->wellPathGeometry()->measureDepths().back();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPathAttribute::isEnabled() const
|
||||
{
|
||||
RimWellPathAttributeCollection* collection = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(collection);
|
||||
return collection->isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -217,12 +227,16 @@ void RimWellPathAttribute::fieldChangedByUi(const caf::PdmFieldHandle* changedFi
|
||||
this->firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
m_startMD = wellPath->wellPathGeometry()->measureDepths().front();
|
||||
}
|
||||
else if (m_type() == RiaDefines::PACKER)
|
||||
{
|
||||
m_endMD = m_startMD + 2;
|
||||
}
|
||||
}
|
||||
if (changedField == &m_startMD)
|
||||
{
|
||||
if (m_type() == RiaDefines::PACKER)
|
||||
{
|
||||
m_endMD = m_startMD + 50;
|
||||
m_endMD = m_startMD + 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
void setDepthsFromWellPath(const RimWellPath* wellPath);
|
||||
|
||||
// Overrides from RimWellPathCompletionInterface
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
@@ -54,9 +55,9 @@ public:
|
||||
double endMD() const override;
|
||||
|
||||
private:
|
||||
bool isDiameterSupported() const;
|
||||
bool isDiameterSupported() const;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
static QString generateInchesLabel(double diameter);
|
||||
static QString generateInchesLabel(double diameter);
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#include "RimWellPathAttributeCollection.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPathAttribute.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
|
||||
@@ -37,6 +38,7 @@ RimWellPathAttributeCollection::RimWellPathAttributeCollection()
|
||||
m_attributes.uiCapability()->setUiEditorTypeName(caf::PdmUiTableViewEditor::uiEditorTypeName());
|
||||
m_attributes.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP);
|
||||
m_attributes.uiCapability()->setCustomContextMenuEnabled(true);
|
||||
this->setName("Casing Design");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -157,3 +159,20 @@ void RimWellPathAttributeCollection::defineUiTreeOrdering(caf::PdmUiTreeOrdering
|
||||
{
|
||||
uiTreeOrdering.skipRemainingChildren(true);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathAttributeCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
{
|
||||
if (changedField == this->objectToggleField())
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
this->updateAllReferringTracks();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cvfBase.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
@@ -25,7 +27,7 @@
|
||||
|
||||
class RimWellPathAttribute;
|
||||
|
||||
class RimWellPathAttributeCollection : public caf::PdmObject
|
||||
class RimWellPathAttributeCollection : public RimCheckableNamedObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
@@ -37,11 +39,13 @@ public:
|
||||
void insertAttribute(RimWellPathAttribute* insertBefore, RimWellPathAttribute* attribute);
|
||||
void deleteAttribute(RimWellPathAttribute* attributeToDelete);
|
||||
void deleteAllAttributes();
|
||||
|
||||
protected:
|
||||
void defineCustomContextMenu(const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget) override;
|
||||
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimWellPathAttribute*> m_attributes;
|
||||
|
||||
@@ -31,8 +31,8 @@ RimWellPathTarget::RimWellPathTarget()
|
||||
CAF_PDM_InitField(&m_isEnabled, "IsEnabled", true, "", "", "", "");
|
||||
//m_targetType.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&m_targetPoint, "TargetPoint", "Point", "", "", "");
|
||||
CAF_PDM_InitField(&m_dogleg1, "Dogleg1", 3.0, "DL in", "", "", "");
|
||||
CAF_PDM_InitField(&m_dogleg2, "Dogleg2", 3.0, "DL out", "", "", "");
|
||||
CAF_PDM_InitField(&m_dogleg1, "Dogleg1", 3.0, "DL in", "", "[deg/30m]", "");
|
||||
CAF_PDM_InitField(&m_dogleg2, "Dogleg2", 3.0, "DL out", "", "[deg/30m]", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_targetType, "TargetType", "Type", "", "", "");
|
||||
m_targetType.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitField(&m_hasTangentConstraintUiField, "HasTangentConstraint", false, "Dir", "", "", "");
|
||||
|
||||
Reference in New Issue
Block a user