///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2019- Equinor 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 "RimWellLogPlot.h" #include "RigGeoMechWellLogExtractor.h" #include "RigWbsParameter.h" #include "cafAppEnum.h" #include "cafPdmField.h" #include "cafPdmPtrField.h" #include class RimGeoMechCase; class RimWellPath; class RimWellBoreStabilityPlot : public RimWellLogPlot { CAF_PDM_HEADER_INIT; using ParameterSource = RigGeoMechWellLogExtractor::WbsParameterSource; using ParameterSourceEnum = RigGeoMechWellLogExtractor::WbsParameterSourceEnum; public: RimWellBoreStabilityPlot(); void applyWbsParametersToExtractor( RigGeoMechWellLogExtractor* extractor ); RimWellBoreStabilityPlot::ParameterSource parameterSource( const RigWbsParameter& parameter ) const; double userDefinedValue( const RigWbsParameter& parameter ) const; void setParameterSource( const RigWbsParameter& parameter, RimWellBoreStabilityPlot::ParameterSource ); protected: void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; virtual QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly ) override; void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void assignValidSource( caf::PdmField* parameterSourceField, const std::vector& validSources ); void onLoadDataAndUpdate() override; bool hasLasFileWithChannel( const QString& channel ) const; bool hasElementPropertyEntry( const RigFemResultAddress& resAddr ) const; caf::PdmField* sourceField( const RigWbsParameter& parameter ) const; std::vector supportedSources( const RigWbsParameter& parameter ) const; private: caf::PdmField m_porePressureSource; caf::PdmField m_porePressureShaleSource; caf::PdmField m_poissonRatioSource; caf::PdmField m_ucsSource; caf::PdmField m_OBG0Source; caf::PdmField m_DFSource; caf::PdmField m_K0FGSource; caf::PdmField m_K0SHSource; caf::PdmField m_FGShaleSource; caf::PdmField m_userDefinedPPShale; caf::PdmField m_userDefinedPoissionRatio; caf::PdmField m_userDefinedUcs; caf::PdmField m_userDefinedDF; caf::PdmField m_userDefinedK0FG; caf::PdmField m_userDefinedK0SH; caf::PdmField m_FGShaleMultiplier; std::map*> m_parameterSourceFields; std::map*> m_userDefinedValueFields; };