2015-08-28 03:42:57 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "RimWellLogPlotCollection.h"
|
2015-08-28 05:10:36 -05:00
|
|
|
|
2015-08-28 03:42:57 -05:00
|
|
|
#include "RimWellLogPlot.h"
|
2015-08-28 05:10:36 -05:00
|
|
|
|
2015-08-28 03:42:57 -05:00
|
|
|
#include "cafPdmUiTreeView.h"
|
2015-09-03 13:13:08 -05:00
|
|
|
#include "RigCaseData.h"
|
|
|
|
#include "RimWellPath.h"
|
|
|
|
#include "RimEclipseCase.h"
|
|
|
|
#include "RigEclipseWellLogExtractor.h"
|
|
|
|
#include "RimWellPathCollection.h"
|
2015-09-04 08:30:04 -05:00
|
|
|
#include "RimGeoMechCase.h"
|
|
|
|
#include "RigGeoMechWellLogExtractor.h"
|
2015-08-28 03:42:57 -05:00
|
|
|
|
|
|
|
CAF_PDM_SOURCE_INIT(RimWellLogPlotCollection, "WellLogPlotCollection");
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimWellLogPlotCollection::RimWellLogPlotCollection()
|
|
|
|
{
|
|
|
|
CAF_PDM_InitObject("Well Log Plots", "", "", "");
|
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault(&wellLogPlots, "WellLogPlots", "", "", "", "");
|
|
|
|
wellLogPlots.uiCapability()->setUiHidden(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimWellLogPlotCollection::~RimWellLogPlotCollection()
|
|
|
|
{
|
2015-09-03 01:09:06 -05:00
|
|
|
wellLogPlots.deleteAllChildObjects();
|
2015-08-28 03:42:57 -05:00
|
|
|
}
|
2015-09-03 13:13:08 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor(RimWellPath* wellPath, RimEclipseCase* eclCase)
|
|
|
|
{
|
|
|
|
if (!(wellPath && eclCase && wellPath->wellPathGeometry() && eclCase->reservoirData()))
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
RigCaseData* eclCaseData = eclCase->reservoirData();
|
|
|
|
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
|
|
|
|
for (size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx)
|
|
|
|
{
|
|
|
|
if (m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom)
|
|
|
|
{
|
|
|
|
return m_extractors[exIdx].p();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor(eclCaseData, wellPathGeom);
|
|
|
|
m_extractors.push_back(extractor.p());
|
|
|
|
|
|
|
|
return extractor.p();
|
|
|
|
}
|
2015-09-04 08:30:04 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2015-09-07 03:32:54 -05:00
|
|
|
RigGeoMechWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor(RimWellPath* wellPath, RimGeoMechCase* geomCase)
|
2015-09-04 08:30:04 -05:00
|
|
|
{
|
2015-09-07 03:32:54 -05:00
|
|
|
if (!(wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData()))
|
2015-09-04 08:30:04 -05:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2015-09-07 03:32:54 -05:00
|
|
|
RigGeoMechCaseData* geomCaseData = geomCase->geoMechData();
|
2015-09-04 08:30:04 -05:00
|
|
|
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
|
|
|
|
for (size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx)
|
|
|
|
{
|
2015-09-07 03:32:54 -05:00
|
|
|
if (m_geomExtractors[exIdx]->caseData() == geomCaseData && m_geomExtractors[exIdx]->wellPathData() == wellPathGeom)
|
2015-09-04 08:30:04 -05:00
|
|
|
{
|
|
|
|
return m_geomExtractors[exIdx].p();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-09-07 03:32:54 -05:00
|
|
|
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor(geomCaseData, wellPathGeom);
|
2015-09-04 08:30:04 -05:00
|
|
|
m_geomExtractors.push_back(extractor.p());
|
|
|
|
|
|
|
|
return extractor.p();
|
|
|
|
}
|