///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2018- 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 "RigFemPart.h" #include "RigFemResultAddress.h" #include "RimCheckableNamedObject.h" #include "RimContourMapProjection.h" #include "RimGeoMechCase.h" #include "RimRegularLegendConfig.h" #include "cafDisplayCoordTransform.h" #include "cafPdmChildField.h" #include "cafPdmField.h" #include "cafPdmObject.h" #include "cvfArray.h" #include "cvfBoundingBox.h" #include "cvfGeometryBuilderFaceList.h" #include "cvfString.h" #include "cvfVector2.h" class RimGeoMechContourMapView; //================================================================================================== /// /// //================================================================================================== class RimGeoMechContourMapProjection : public RimContourMapProjection { CAF_PDM_HEADER_INIT; public: RimGeoMechContourMapProjection(); ~RimGeoMechContourMapProjection() override; // GeoMech case overrides for contour map methods QString resultDescriptionText() const override; RimRegularLegendConfig* legendConfig() const override; void updateLegend() override; protected: typedef RimContourMapProjection::CellIndexAndResult CellIndexAndResult; // GeoMech implementation specific data generation methods cvf::ref getCellVisibility() const override; cvf::BoundingBox calculateExpandedPorBarBBox(int timeStep) const; void updateGridInformation() override; std::vector getMapCellVisibility() override; std::vector retrieveParameterWeights() override; std::vector generateResults(int timeStep) override; std::vector generateResultsFromAddress(RigFemResultAddress resultAddress, const std::vector& mapCellVisibility, int timeStep); bool resultVariableChanged() const override; void clearResultVariable() override; RimGridView* baseView() const override; std::vector findIntersectingCells(const cvf::BoundingBox& bbox) const override; size_t kLayer(size_t globalCellIdx) const override; double calculateOverlapVolume(size_t globalCellIdx, const cvf::BoundingBox& bbox) const override; double calculateRayLengthInCell(size_t globalCellIdx, const cvf::Vec3d& highestPoint, const cvf::Vec3d& lowestPoint) const override; double getParameterWeightForCell(size_t globalCellIdx, const std::vector& parameterWeights) const override; std::vector gridCellValues(RigFemResultAddress resAddr, std::vector& resultValues) const; RimGeoMechCase* geoMechCase() const; RimGeoMechContourMapView* view() const; protected: // Framework overrides void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override; void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override; protected: caf::PdmField m_limitToPorePressureRegions; caf::PdmField m_applyPPRegionLimitVertically; caf::PdmField m_paddingAroundPorePressureRegion; cvf::ref m_femPart; cvf::cref m_femPartGrid; RigFemResultAddress m_currentResultAddr; };