///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2017 Statoil ASA // // 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "RimWellLogCurve.h" #include "RifEclipseRftAddress.h" #include "cafAppEnum.h" #include "cafPdmField.h" #include "cafPdmPtrField.h" #include "cvfObject.h" #include class RifReaderEclipseRft; class RigEclipseWellLogExtractor; class RimEclipseResultCase; class RimWellPath; //================================================================================================== /// /// //================================================================================================== class RimWellLogRftCurve : public RimWellLogCurve { CAF_PDM_HEADER_INIT; public: RimWellLogRftCurve(); virtual ~RimWellLogRftCurve(); virtual QString wellName() const override; virtual QString wellLogChannelName() const override; void setEclipseResultCase(RimEclipseResultCase* eclipseResultCase); RimEclipseResultCase* eclipseResultCase() const; void setRftAddress(RifEclipseRftAddress address); RifEclipseRftAddress rftAddress() const; void setDefaultAddress(QString wellName); void updateWellChannelNameAndTimeStep(); protected: // Overrides from RimWellLogPlotCurve virtual QString createCurveAutoName() override; virtual void onLoadDataAndUpdate(bool updateParentPlot) override; // Pdm overrrides virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override; virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; private: RifReaderEclipseRft* rftReader() const; RigEclipseWellLogExtractor* extractor(); bool createWellPathIdxToRftFileIdxMapping(); size_t rftFileIndex(size_t wellPathIndex); std::vector sortedIndicesInRftFile(); std::vector xValues(); std::vector tvDepthValues(); std::vector measuredDepthValues(); private: std::map m_idxInWellPathToIdxInRftFile; caf::PdmPtrField m_eclipseResultCase; caf::PdmField m_timeStep; caf::PdmField m_wellName; caf::PdmField< caf::AppEnum< RifEclipseRftAddress::RftWellLogChannelType > > m_wellLogChannelName; bool m_isUsingPseudoLength; };