///////////////////////////////////////////////////////////////////////////////// // // 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 "RicMswItem.h" #include "RicMswSegmentCellIntersection.h" #include "cafPdmObject.h" #include "cafPdmPointer.h" #include "cvfMath.h" #include class RicMswCompletion; //================================================================================================== /// //================================================================================================== class RicMswSegment : public RicMswItem { public: RicMswSegment( const QString& label, double startMD, double endMD, double startTVD, double endTVD, size_t subIndex = cvf::UNDEFINED_SIZE_T, int segmentNumber = -1 ); double startMD() const override; double endMD() const override; double startTVD() const override; double endTVD() const override; void setOutputMD( double outputMD ); double outputMD() const; void setOutputTVD( double outputTVD ); double outputTVD() const; double equivalentDiameter() const; double holeDiameter() const; double openHoleRoughnessFactor() const; double skinFactor() const; size_t subIndex() const; int segmentNumber() const; std::vector completions() const; std::vector completions(); void setLabel( const QString& label ); void setEquivalentDiameter( double diameter ); void setHoleDiameter( double holeDiameter ); void setOpenHoleRoughnessFactor( double roughnessFactor ); void setSkinFactor( double skinFactor ); void setSegmentNumber( int segmentNumber ); double effectiveDiameter() const; void setEffectiveDiameter( double effectiveDiameter ); void addCompletion( std::unique_ptr completion ); std::unique_ptr removeCompletion( RicMswCompletion* completion ); void addIntersection( std::shared_ptr intersection ); const std::vector>& intersections() const; std::vector>& intersections(); std::set globalCellsIntersected() const; void setIntersectedGlobalCells( const std::set& intersectedCells ); void setSourcePdmObject( const caf::PdmObject* object ); const caf::PdmObject* sourcePdmObject() const; private: double m_startMD; double m_endMD; double m_startTVD; double m_endTVD; double m_outputMD; double m_outputTVD; double m_equivalentDiameter; double m_holeDiameter; double m_openHoleRoughnessFactor; double m_skinFactor; double m_effectiveDiameter; // Used to represent the effective diameter if we have multiple laterals in same cell size_t m_subIndex; int m_segmentNumber; std::vector> m_completions; // Connection to grid cells when we have a completion in this cell std::vector> m_intersections; // All global cells intersected by this segment std::set m_intersectedGlobalCells; caf::PdmPointer m_sourcePdmObject; };