///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2023 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 "cvfObject.h" #include "cvfVector3.h" #include #include //================================================================================================== /// /// //================================================================================================== class RigGriddedPart3d : public cvf::Object { public: enum class BorderSurface { UpperSurface = 0, FaultSurface, LowerSurface }; enum class Boundary { Front = 0, Back, FarSide, Bottom }; public: RigGriddedPart3d( bool flipFrontBack ); ~RigGriddedPart3d() override; void reset(); void generateGeometry( std::vector inputPoints, int nHorzCells, int nVertCellsLower, int nVertCellsMiddle, int nVertCellsUpper, double thickness ); const std::vector& nodes() const; const std::vector>& elementIndices() const; const std::map>& borderSurfaceElements() const; const std::vector>& meshLines() const; const std::map>& boundaryElements() const; const std::map>& boundaryNodes() const; protected: cvf::Vec3d stepVector( cvf::Vec3d start, cvf::Vec3d stop, int nSteps ); void generateMeshlines( std::vector cornerPoints, int numHorzCells, int numVertCells ); private: bool m_flipFrontBack; std::vector m_nodes; std::vector> m_elementIndices; std::map> m_borderSurfaceElements; std::vector> m_meshLines; std::map> m_boundaryElements; std::map> m_boundaryNodes; };