ResInsight/ApplicationCode/ProjectDataModel/RimFracture.h

127 lines
4.8 KiB
C
Raw Normal View History

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2017 Statoil 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 "RimCheckableNamedObject.h"
#include "RimDefines.h"
#include "cvfBase.h"
#include "cvfObject.h"
#include "cvfVector3.h"
#include "cvfMatrix4.h"
2017-02-15 04:29:44 -06:00
#include "cvfPlane.h"
#include "cafAppEnum.h"
2017-02-15 04:29:44 -06:00
#include "cafPdmChildField.h"
#include "cafPdmFieldCvfVec3d.h"
2017-01-19 03:43:23 -06:00
#include "cafPdmProxyValueField.h"
#include "cafPdmPtrField.h"
2017-01-19 03:43:23 -06:00
class RigFracture;
2017-02-06 06:22:18 -06:00
class RimEclipseCase;
2017-01-19 03:43:23 -06:00
class RimEllipseFractureTemplate;
class RivWellFracturePartMgr;
class RimFractureTemplate;
class RigFractureData;
//==================================================================================================
///
///
//==================================================================================================
class RimFracture : public RimCheckableNamedObject
{
CAF_PDM_HEADER_INIT;
public:
RimFracture(void);
virtual ~RimFracture(void);
caf::PdmField<double> azimuth;
caf::PdmField<double> perforationLength;
caf::PdmField<double> dip;
caf::PdmField<double> tilt;
caf::PdmField<int> stimPlanTimeIndexToPlot;
caf::PdmField<bool> showPolygonFractureOutline;
caf::PdmField< caf::AppEnum< RimDefines::UnitSystem > > fractureUnit;
2017-01-19 03:43:23 -06:00
cvf::Vec3d anchorPosition();
void setAnchorPosition(const cvf::Vec3d& pos);
2017-01-10 03:53:54 -06:00
cvf::Mat4f transformMatrix();
2017-01-19 03:43:23 -06:00
const RigFracture* attachedRigFracture() const;
void setFractureTemplate(RimFractureTemplate* fractureTemplate);
RimFractureTemplate* attachedFractureDefinition() const;
RivWellFracturePartMgr* fracturePartManager();
bool hasValidGeometry() const;
void computeGeometry();
void setRecomputeGeometryFlag();
const std::vector<cvf::uint>& triangleIndices() const;
const std::vector<cvf::Vec3f>& nodeCoords() const;
void setFractureData(std::vector<RigFractureData> fractureDataVector);
2017-01-19 06:35:07 -06:00
std::vector<size_t> getPotentiallyFracturedCells();
2017-01-19 03:43:23 -06:00
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
cvf::Vec3d fracturePosition() const;
virtual void updateAzimuthFromFractureDefinition() = 0;
virtual double wellAzimuthAtFracturePosition() = 0;
2017-01-10 03:53:54 -06:00
protected:
2017-01-19 03:43:23 -06:00
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) override;
2017-02-15 04:29:44 -06:00
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
2017-01-10 03:53:54 -06:00
private:
bool isRecomputeGeometryFlagSet();
2017-01-19 03:43:23 -06:00
cvf::Vec3d fracturePositionForUi() const;
QString createOneBasedIJK() const;
2017-01-19 06:35:07 -06:00
protected:
caf::PdmPtrField<RimFractureTemplate*> m_fractureTemplate;
2017-01-19 03:43:23 -06:00
caf::PdmProxyValueField<cvf::Vec3d> m_uiAnchorPosition;
2017-01-19 06:35:07 -06:00
caf::PdmProxyValueField<QString> m_displayIJK;
2017-01-19 03:43:23 -06:00
2017-01-19 06:35:07 -06:00
private:
caf::PdmField<cvf::Vec3d> m_anchorPosition;
2017-01-19 03:43:23 -06:00
cvf::ref<RigFracture> m_rigFracture;
bool m_recomputeGeometry;
2017-01-19 06:35:07 -06:00
caf::PdmField<int> m_i; // Zero based indexing
caf::PdmField<int> m_j; // Zero based indexing
caf::PdmField<int> m_k; // Zero based indexing
2017-01-10 03:53:54 -06:00
2017-01-19 03:43:23 -06:00
cvf::ref<RivWellFracturePartMgr> m_rivFracture;
};