Files
ResInsight/ApplicationLibCode/ReservoirDataModel/RigFaultReactivationModel.h
jonjenssen 5d3fb8ceb9 Fault reactivation (#10624)
Update result to generate well paths based on information from model generator. Store settings in JSON file.
Add method to access local coordinate system definition
2023-09-19 18:03:36 +02:00

126 lines
3.3 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cvfArray.h"
#include "cvfColor3.h"
#include "cvfObject.h"
#include "cvfPlane.h"
#include "cvfTextureImage.h"
#include "cvfVector3.h"
#include <map>
#include <memory>
#include <vector>
class RigGriddedPart3d;
class RigFRModelPart
{
public:
RigFRModelPart(){};
~RigFRModelPart(){};
std::vector<cvf::Vec3d> rect;
cvf::ref<cvf::TextureImage> texture;
};
//==================================================================================================
///
///
//==================================================================================================
class RigFaultReactivationModel : public cvf::Object
{
public:
enum class ModelParts
{
HiPart1 = 0,
MidPart1,
LowPart1,
HiPart2,
MidPart2,
LowPart2
};
enum class GridPart
{
PART1,
PART2
};
public:
RigFaultReactivationModel();
~RigFaultReactivationModel() override;
std::vector<ModelParts> allModelParts() const;
std::vector<GridPart> allGridParts() const;
bool isValid() const;
void reset();
void setPlane( cvf::Vec3d anchorPoint, cvf::Vec3d normal );
void setFaultPlaneIntersect( cvf::Vec3d faultPlaneTop, cvf::Vec3d faultPlaneBottom );
void setMaxExtentFromAnchor( double maxExtentHorz, double minZ, double maxZ );
void setCellCounts( int horzPart1, int horzPart2, int vertUpper, int vertMiddle, int vertLower );
void setThickness( double thickness );
void updateRects();
cvf::Vec3d normal() const;
void setPartColors( cvf::Color3f part1Color, cvf::Color3f part2Color );
std::vector<cvf::Vec3d> rect( ModelParts part ) const;
cvf::ref<cvf::TextureImage> texture( ModelParts part ) const;
const std::vector<std::vector<cvf::Vec3d>>& meshLines( GridPart part ) const;
std::shared_ptr<RigGriddedPart3d> grid( GridPart part ) const;
protected:
void generateGrids( cvf::Vec3dArray points );
private:
cvf::Vec3d m_planeNormal;
cvf::Vec3d m_planeAnchor;
cvf::Vec3d m_faultPlaneIntersectTop;
cvf::Vec3d m_faultPlaneIntersectBottom;
double m_maxHorzExtent;
double m_minZ;
double m_maxZ;
double m_thickness;
int m_cellCountHorzPart1;
int m_cellCountHorzPart2;
int m_cellCountVertUpper;
int m_cellCountVertMiddle;
int m_cellCountVertLower;
std::map<ModelParts, std::vector<int>> m_cornerIndexes;
std::map<ModelParts, RigFRModelPart> m_parts;
bool m_isValid;
std::map<GridPart, std::shared_ptr<RigGriddedPart3d>> m_3dparts;
};