mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1035 Work in progress: Added the skeleton for management FlowDiagnostics data
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
#include "cafPdmUiListEditor.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
|
||||
#include "RigFlowDiagResultAddress.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimEclipseResultDefinition, "ResultDefinition");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -285,10 +287,10 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
{
|
||||
if ( fieldNeedingOptions == &m_resultVariableUiField )
|
||||
{
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Time Of Flight (Weighted Sum)", "TOF"));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Tracer Concentration (Sum)", "Concentrations"));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Tracer with Max Concentration", "MaxTracer"));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Injector Producer Communication", "Communication"));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Time Of Flight (Weighted Sum)", RIG_FLD_TOF_RESNAME));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Tracer Cell Fraction (Sum)", RIG_FLD_CELL_FRACTION_RESNAME));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Max Fraction Tracer", RIG_FLD_MAX_FRACTION_TRACER_RESNAME));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Injector Producer Communication", RIG_FLD_COMMUNICATION_RESNAME));
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_flowSolutionUiField)
|
||||
{
|
||||
@@ -446,13 +448,11 @@ QStringList RimEclipseResultDefinition::getResultNamesForCurrentUiResultType()
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Get this form some sensible place
|
||||
|
||||
QStringList flowVars;
|
||||
flowVars.push_back("TOF");
|
||||
flowVars.push_back("Concentrations");
|
||||
flowVars.push_back("MaxTracer");
|
||||
flowVars.push_back("Communication");
|
||||
flowVars.push_back(RIG_FLD_TOF_RESNAME);
|
||||
flowVars.push_back(RIG_FLD_CELL_FRACTION_RESNAME);
|
||||
flowVars.push_back(RIG_FLD_MAX_FRACTION_TRACER_RESNAME);
|
||||
flowVars.push_back(RIG_FLD_COMMUNICATION_RESNAME);
|
||||
return flowVars;
|
||||
}
|
||||
}
|
||||
@@ -473,6 +473,20 @@ size_t RimEclipseResultDefinition::scalarResultIndex() const
|
||||
return gridScalarResultIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFlowDiagResultAddress RimEclipseResultDefinition::flowDiagResAddress() const
|
||||
{
|
||||
std::set<std::string> selTracerNames;
|
||||
for (const QString& tName : m_selectedTracers())
|
||||
{
|
||||
selTracerNames.insert(tName.toStdString());
|
||||
}
|
||||
|
||||
return RigFlowDiagResultAddress(m_resultVariable().toStdString(), selTracerNames);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -590,6 +604,14 @@ void RimEclipseResultDefinition::setResultVariable(const QString& val)
|
||||
m_resultVariableUiField = val;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFlowDiagSolution* RimEclipseResultDefinition::flowDiagSolution()
|
||||
{
|
||||
return m_flowSolution();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmPointer.h"
|
||||
#include "cafPdmPtrField.h"
|
||||
#include "RigFlowDiagResultAddress.h"
|
||||
|
||||
class RigCaseCellResultsData;
|
||||
class RimEclipseCase;
|
||||
@@ -53,6 +54,8 @@ public:
|
||||
void setPorosityModel(RimDefines::PorosityModelType val);
|
||||
QString resultVariable() const { return m_resultVariable(); }
|
||||
virtual void setResultVariable(const QString& val);
|
||||
RimFlowDiagSolution* flowDiagSolution();
|
||||
RigFlowDiagResultAddress flowDiagResAddress() const;
|
||||
|
||||
void loadResult();
|
||||
size_t scalarResultIndex() const;
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RigCaseData.h"
|
||||
|
||||
#include "RigFlowDiagResults.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimFlowDiagSolution, "FlowDiagSolution");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -32,6 +34,9 @@ RimFlowDiagSolution::RimFlowDiagSolution(void)
|
||||
//CAF_PDM_InitFieldNoDefault(&m_selectedWells, "SelectedWells", "Selected Wells","","");
|
||||
|
||||
CAF_PDM_InitField(&m_userDescription, "UserDescription", QString("All Wells") ,"Description", "", "","");
|
||||
|
||||
m_flowDiagResults = new RigFlowDiagResults(this);
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -42,6 +47,14 @@ RimFlowDiagSolution::~RimFlowDiagSolution(void)
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFlowDiagResults* RimFlowDiagSolution::flowDiagResults()
|
||||
{
|
||||
return m_flowDiagResults.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "cafAppEnum.h"
|
||||
|
||||
class RimEclipseWell;
|
||||
|
||||
class RigFlowDiagResults;
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
@@ -33,12 +33,12 @@ class RimFlowDiagSolution : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
RimFlowDiagSolution(void);
|
||||
virtual ~RimFlowDiagSolution(void);
|
||||
RimFlowDiagSolution();
|
||||
virtual ~RimFlowDiagSolution();
|
||||
|
||||
QString userDescription() { return m_userDescription();}
|
||||
|
||||
std::set<QString> tracerNames();
|
||||
QString userDescription() { return m_userDescription();}
|
||||
RigFlowDiagResults* flowDiagResults();
|
||||
std::set<QString> tracerNames();
|
||||
|
||||
enum TracerStatusType
|
||||
{
|
||||
@@ -57,5 +57,7 @@ private:
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||
caf::PdmField<QString> m_userDescription;
|
||||
|
||||
cvf::ref<RigFlowDiagResults> m_flowDiagResults;
|
||||
|
||||
//caf::PdmPtrArrayField<RimEclipseWell*> m_selectedWells;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user