2017-10-05 02:29:19 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-10-05 02:29:19 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-10-05 02:29:19 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-10-05 02:29:19 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "RimWellLogCurve.h"
|
|
|
|
|
|
|
|
#include "RifEclipseRftAddress.h"
|
|
|
|
|
2017-10-12 06:37:03 -05:00
|
|
|
#include "cafAppEnum.h"
|
2017-10-05 02:29:19 -05:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmPtrField.h"
|
2017-10-12 06:37:03 -05:00
|
|
|
|
2017-10-05 04:13:15 -05:00
|
|
|
#include "cvfObject.h"
|
2017-10-05 02:29:19 -05:00
|
|
|
|
2017-10-31 09:06:17 -05:00
|
|
|
#include <map>
|
|
|
|
|
2019-07-25 00:38:46 -05:00
|
|
|
class RifReaderRftInterface;
|
2017-10-31 09:06:17 -05:00
|
|
|
class RigEclipseWellLogExtractor;
|
2017-10-05 04:13:15 -05:00
|
|
|
class RimEclipseResultCase;
|
2019-08-20 08:09:13 -05:00
|
|
|
class RimObservedFmuRftData;
|
2019-07-25 00:38:46 -05:00
|
|
|
class RimSummaryCase;
|
|
|
|
class RimSummaryCaseCollection;
|
2017-10-12 06:37:03 -05:00
|
|
|
class RimWellPath;
|
2017-10-05 04:13:15 -05:00
|
|
|
|
2017-10-05 02:29:19 -05:00
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
|
|
|
///
|
2017-10-05 02:29:19 -05:00
|
|
|
//==================================================================================================
|
|
|
|
class RimWellLogRftCurve : public RimWellLogCurve
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
2019-09-17 11:44:01 -05:00
|
|
|
public:
|
|
|
|
enum DerivedMDSource
|
|
|
|
{
|
|
|
|
NO_SOURCE,
|
|
|
|
WELL_PATH,
|
|
|
|
OBSERVED_DATA
|
|
|
|
};
|
|
|
|
|
2017-10-05 02:29:19 -05:00
|
|
|
public:
|
|
|
|
RimWellLogRftCurve();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimWellLogRftCurve() override;
|
2017-10-05 02:29:19 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
QString wellName() const override;
|
2020-01-28 03:09:23 -06:00
|
|
|
QString wellLogChannelUiName() const override;
|
2020-01-29 05:52:07 -06:00
|
|
|
QString wellLogChannelUnits() const override;
|
2017-10-05 02:29:19 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setEclipseResultCase( RimEclipseResultCase* eclipseResultCase );
|
2017-10-12 06:37:03 -05:00
|
|
|
RimEclipseResultCase* eclipseResultCase() const;
|
2017-10-05 02:29:19 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setSummaryCase( RimSummaryCase* summaryCase );
|
|
|
|
RimSummaryCase* summaryCase() const;
|
2019-07-25 00:38:46 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setEnsemble( RimSummaryCaseCollection* ensemble );
|
2019-07-25 00:38:46 -05:00
|
|
|
RimSummaryCaseCollection* ensemble() const;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
|
|
|
void setObservedFmuRftData( RimObservedFmuRftData* observedFmuRftData );
|
2019-08-20 08:09:13 -05:00
|
|
|
RimObservedFmuRftData* observedFmuRftData() const;
|
2019-07-25 00:38:46 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setRftAddress( RifEclipseRftAddress address );
|
|
|
|
RifEclipseRftAddress rftAddress() const;
|
2017-10-05 06:49:49 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setDefaultAddress( QString wellName );
|
|
|
|
void updateWellChannelNameAndTimeStep();
|
2017-10-09 05:03:18 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setSimWellBranchData( bool branchDetection, int branchIndex );
|
2017-12-08 01:38:55 -06:00
|
|
|
|
2017-10-05 02:29:19 -05:00
|
|
|
protected:
|
|
|
|
// Overrides from RimWellLogPlotCurve
|
2019-09-06 03:40:57 -05:00
|
|
|
QString createCurveAutoName() override;
|
|
|
|
void onLoadDataAndUpdate( bool updateParentPlot ) override;
|
2017-10-05 02:29:19 -05:00
|
|
|
|
2017-10-05 04:13:15 -05:00
|
|
|
// Pdm overrrides
|
2019-09-06 03:40:57 -05:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
|
|
|
bool* useOptionsOnly ) override;
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2017-10-05 02:29:19 -05:00
|
|
|
|
2019-09-25 10:48:19 -05:00
|
|
|
std::vector<QString> perPointLabels() const;
|
|
|
|
|
2017-10-05 02:29:19 -05:00
|
|
|
private:
|
2019-07-25 00:38:46 -05:00
|
|
|
RifReaderRftInterface* rftReader() const;
|
2017-10-05 02:29:19 -05:00
|
|
|
|
2017-10-31 09:06:17 -05:00
|
|
|
RigEclipseWellLogExtractor* extractor();
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool createWellPathIdxToRftFileIdxMapping();
|
|
|
|
size_t rftFileIndex( size_t wellPathIndex );
|
|
|
|
std::vector<size_t> sortedIndicesInRftFile();
|
2017-10-31 09:06:17 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<double> xValues();
|
2019-09-25 10:48:19 -05:00
|
|
|
std::vector<double> errorValues();
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<double> tvDepthValues();
|
|
|
|
std::vector<double> measuredDepthValues();
|
2019-09-17 11:44:01 -05:00
|
|
|
|
|
|
|
bool deriveMeasuredDepthValuesFromWellPath( const std::vector<double>& tvDepthValues,
|
|
|
|
std::vector<double>& derivedMDValues );
|
|
|
|
bool deriveMeasuredDepthFromObservedData( const std::vector<double>& tvDepthValues,
|
|
|
|
std::vector<double>& derivedMDValues );
|
2017-10-05 04:08:30 -05:00
|
|
|
|
2017-10-05 02:29:19 -05:00
|
|
|
private:
|
2019-07-25 00:38:46 -05:00
|
|
|
caf::PdmPtrField<RimEclipseResultCase*> m_eclipseResultCase;
|
|
|
|
caf::PdmPtrField<RimSummaryCase*> m_summaryCase;
|
|
|
|
caf::PdmPtrField<RimSummaryCaseCollection*> m_ensemble;
|
2019-08-20 08:09:13 -05:00
|
|
|
caf::PdmPtrField<RimObservedFmuRftData*> m_observedFmuRftData;
|
2019-07-25 00:38:46 -05:00
|
|
|
caf::PdmField<QDateTime> m_timeStep;
|
|
|
|
caf::PdmField<QString> m_wellName;
|
|
|
|
caf::PdmField<int> m_branchIndex;
|
|
|
|
caf::PdmField<bool> m_branchDetection;
|
2017-12-08 01:38:55 -06:00
|
|
|
|
|
|
|
std::map<size_t, size_t> m_idxInWellPathToIdxInRftFile;
|
|
|
|
caf::PdmField<caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>> m_wellLogChannelName;
|
2017-10-05 02:29:19 -05:00
|
|
|
};
|