mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-10 08:03:05 -06:00
Added access method for the timestep string (date)
This commit is contained in:
parent
3ecd6d8da7
commit
0a7e971577
@ -431,15 +431,12 @@ QString RimWellLogExtractionCurve::createCurveName()
|
||||
{
|
||||
size_t maxTimeStep = 0;
|
||||
|
||||
QStringList timeStepNames;
|
||||
|
||||
if (eclipseCase)
|
||||
{
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_eclipseResultDefinition->porosityModel());
|
||||
if(eclipseCase->reservoirData())
|
||||
if (eclipseCase->reservoirData())
|
||||
{
|
||||
maxTimeStep = eclipseCase->reservoirData()->results(porosityModel)->maxTimeStepCount();
|
||||
timeStepNames = eclipseCase->timeStepStrings();
|
||||
}
|
||||
}
|
||||
else if (geomCase)
|
||||
@ -447,18 +444,21 @@ QString RimWellLogExtractionCurve::createCurveName()
|
||||
if (geomCase->geoMechData())
|
||||
{
|
||||
maxTimeStep = geomCase->geoMechData()->femPartResults()->frameCount();
|
||||
timeStepNames = geomCase->timeStepStrings();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_addDateToCurveName && m_timeStep < timeStepNames.size())
|
||||
if (m_addDateToCurveName)
|
||||
{
|
||||
if (!generatedCurveName.isEmpty())
|
||||
QString dateString = wellDate();
|
||||
if (!dateString.isEmpty())
|
||||
{
|
||||
generatedCurveName += ", ";
|
||||
}
|
||||
if (!generatedCurveName.isEmpty())
|
||||
{
|
||||
generatedCurveName += ", ";
|
||||
}
|
||||
|
||||
generatedCurveName += timeStepNames[m_timeStep];
|
||||
generatedCurveName += dateString;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_addTimestepToCurveName)
|
||||
@ -511,3 +511,35 @@ QString RimWellLogExtractionCurve::wellName() const
|
||||
{
|
||||
return m_wellPath->name();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellLogExtractionCurve::wellDate() const
|
||||
{
|
||||
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>(m_case.value());
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case.value());
|
||||
|
||||
QStringList timeStepNames;
|
||||
size_t maxTimeStep = 0;
|
||||
|
||||
if (eclipseCase)
|
||||
{
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_eclipseResultDefinition->porosityModel());
|
||||
if (eclipseCase->reservoirData())
|
||||
{
|
||||
maxTimeStep = eclipseCase->reservoirData()->results(porosityModel)->maxTimeStepCount();
|
||||
timeStepNames = eclipseCase->timeStepStrings();
|
||||
}
|
||||
}
|
||||
else if (geomCase)
|
||||
{
|
||||
if (geomCase->geoMechData())
|
||||
{
|
||||
maxTimeStep = geomCase->geoMechData()->femPartResults()->frameCount();
|
||||
timeStepNames = geomCase->timeStepStrings();
|
||||
}
|
||||
}
|
||||
|
||||
return (m_timeStep < timeStepNames.size()) ? timeStepNames[m_timeStep] : "";
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ public:
|
||||
|
||||
virtual QString wellName() const;
|
||||
virtual QString wellLogChannelName() const;
|
||||
virtual QString wellDate() const;
|
||||
|
||||
protected:
|
||||
virtual QString createCurveName();
|
||||
|
@ -63,6 +63,7 @@ public:
|
||||
|
||||
virtual QString wellName() const = 0;
|
||||
virtual QString wellLogChannelName() const = 0;
|
||||
virtual QString wellDate() const { return ""; };
|
||||
virtual void updatePlotData() = 0;
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user