(#396)(#397)(#398) WIP: First real Well Log extracted data visible

This commit is contained in:
Jacob Støren 2015-09-02 12:08:38 +02:00
parent 7e676ddfed
commit 5a265b66a6
2 changed files with 63 additions and 15 deletions

View File

@ -170,6 +170,10 @@ bool RimWellLogPlotCurve::depthRange(double* minimumDepth, double* maximumDepth)
#include "RimEclipseResultDefinition.h"
#include "RimGeoMechResultDefinition.h"
#include "RimGeoMechCase.h"
#include "RigEclipseWellLogExtractor.h"
#include "RigResultAccessorFactory.h"
#include "RigCaseCellResultsData.h"
#include "RigCaseData.h"
//==================================================================================================
///
@ -229,23 +233,39 @@ void RimWellLogEclipseCurve::fieldChangedByUi(const caf::PdmFieldHandle* changed
//--------------------------------------------------------------------------------------------------
void RimWellLogEclipseCurve::updatePlotData()
{
bool isNeedingUpdate = false;
std::vector<double> values;
std::vector<double> depthValues;
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>(m_case.value());
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case.value());
if (m_wellPath)
{
//RigWellLog m_wellPath->wellPathGeometry()->wellLogExtractor(m_case);
std::vector<double> values;
values.push_back(34);
values.push_back(47);
values.push_back(49);
values.push_back(22);
values.push_back(20);
if (eclipseCase)
{
RigEclipseWellLogExtractor extractor(eclipseCase->reservoirData(), m_wellPath->wellPathGeometry());
depthValues = (extractor.measuredDepth());
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_eclipseResultDefinition->porosityModel());
cvf::ref<RigResultAccessor> resAcc = RigResultAccessorFactory::createResultAccessor(
eclipseCase->reservoirData(), 0,
porosityModel,
m_timeStep,
m_eclipseResultDefinition->resultVariable());
if (resAcc.notNull())
{
extractor.curveData(resAcc.p(), &values);
isNeedingUpdate = true;
}
}
else if (geomCase)
{
std::vector<double> depthValues;
depthValues.push_back(200);
depthValues.push_back(400);
depthValues.push_back(600);
depthValues.push_back(800);
depthValues.push_back(1000);
}
}
if (isNeedingUpdate)
{
m_plotCurve->setSamples(values.data(), depthValues.data(), (int)depthValues.size());
RimWellLogPlot* wellLogPlot;
@ -255,11 +275,13 @@ void RimWellLogEclipseCurve::updatePlotData()
{
wellLogPlot->updateAvailableDepthRange();
}
}
m_plot->replot();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -212,6 +212,7 @@ void RigEclipseWellLogExtractor::calculateIntersection()
m_intersections.push_back(it->second.m_intersectionPoint);
m_intersectedCells.push_back(it->second.m_hexIndex);
m_intersectedCellFaces.push_back(it->second.m_face);
++it;
}
// Increment the measured depth
@ -270,3 +271,28 @@ std::vector<size_t> RigEclipseWellLogExtractor::findCloseCells(const cvf::Boundi
return closeCells;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<double>& RigEclipseWellLogExtractor::measuredDepth()
{
return m_measuredDepth;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<double>& RigEclipseWellLogExtractor::trueVerticalDepth()
{
return m_trueVerticalDepth;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<size_t>& RigEclipseWellLogExtractor::cellIndicesPrSegment()
{
CVF_ASSERT(false); // Not implemented
return m_globalCellIndicesPrSegment;
}