///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2020- 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 "RigGeoMechWellLogExtractor.h" #include "RigWbsParameter.h" #include "cafPdmField.h" #include "cafPdmObject.h" #include "cafPdmPtrField.h" #include class RimGeoMechCase; class RimWellPath; class RimWbsParameters : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: using ParameterSource = RigGeoMechWellLogExtractor::WbsParameterSource; using ParameterSourceEnum = RigGeoMechWellLogExtractor::WbsParameterSourceEnum; public: RimWbsParameters(); ~RimWbsParameters() override; RimWbsParameters( const RimWbsParameters& copyFrom ); RimWbsParameters& operator=( const RimWbsParameters& copyFrom ); void setGeoMechCase( RimGeoMechCase* geoMechCase ); void setWellPath( RimWellPath* wellPath ); void setTimeStep( int timeStep ); void setFrameIndex( int frameIndex ); void applyWbsParametersToExtractor( RigGeoMechWellLogExtractor* extractor ); ParameterSource parameterSource( const RigWbsParameter& parameter ) const; double userDefinedValue( const RigWbsParameter& parameter ) const; void setParameterSource( const RigWbsParameter& parameter, ParameterSource source ); void setUserDefinedValue( const RigWbsParameter& parameter, double value ); caf::PdmField* sourceField( const RigWbsParameter& parameter ) const; QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; void loadDataAndUpdate(); protected: void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; private: bool hasLasFileWithChannel( const QString& channel ) const; bool hasElementPropertyEntry( const RigFemResultAddress& resAddr ) const; void assignValidSource( caf::PdmField* parameterSourceField, const std::vector& validSources ); std::vector supportedSources( const RigWbsParameter& parameter ) const; private: caf::PdmField m_porePressureSource; caf::PdmField m_porePressureNonReservoirSource; 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_waterDensitySource; 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; caf::PdmField m_userDefinedDensity; caf::PdmPtrField m_geoMechCase; caf::PdmPtrField m_wellPath; caf::PdmField m_timeStep; caf::PdmField m_frameIndex; std::map*> m_parameterSourceFields; std::map*> m_userDefinedValueFields; };