2017-01-02 07:13:34 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2017-02-22 06:24:07 -06:00
|
|
|
#include "RimCheckableNamedObject.h"
|
2017-01-10 06:37:50 -06:00
|
|
|
|
2017-01-04 01:10:02 -06:00
|
|
|
#include "cvfBase.h"
|
|
|
|
#include "cvfObject.h"
|
2017-01-02 07:13:34 -06:00
|
|
|
#include "cvfVector3.h"
|
2017-01-12 03:52:47 -06:00
|
|
|
#include "cvfMatrix4.h"
|
2017-02-15 04:29:44 -06:00
|
|
|
#include "cvfPlane.h"
|
2017-01-02 07:13:34 -06:00
|
|
|
|
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-02-07 02:09:00 -06:00
|
|
|
|
2017-01-19 03:43:23 -06:00
|
|
|
|
2017-01-04 01:10:02 -06:00
|
|
|
class RigFracture;
|
2017-02-06 06:22:18 -06:00
|
|
|
class RimEclipseCase;
|
2017-01-19 03:43:23 -06:00
|
|
|
class RimEllipseFractureTemplate;
|
2017-01-19 00:28:04 -06:00
|
|
|
class RivWellFracturePartMgr;
|
2017-02-22 06:24:07 -06:00
|
|
|
class RimFractureTemplate;
|
2017-01-04 01:10:02 -06:00
|
|
|
|
2017-01-02 07:13:34 -06:00
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2017-02-22 06:24:07 -06:00
|
|
|
class RimFracture : public RimCheckableNamedObject
|
2017-01-02 07:13:34 -06:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
|
|
|
RimFracture(void);
|
|
|
|
virtual ~RimFracture(void);
|
|
|
|
|
2017-02-17 07:11:47 -06:00
|
|
|
caf::PdmField<double> azimuth;
|
|
|
|
caf::PdmField<double> perforationLength;
|
|
|
|
|
|
|
|
caf::PdmField<int> stimPlanTimeIndexToPlot;
|
2017-02-15 05:16:01 -06:00
|
|
|
|
2017-01-19 03:43:23 -06:00
|
|
|
cvf::Vec3d anchorPosition();
|
|
|
|
void setAnchorPosition(const cvf::Vec3d& pos);
|
2017-02-06 06:12:56 -06:00
|
|
|
virtual void setAzimuth() =0;
|
2017-01-10 03:53:54 -06:00
|
|
|
|
2017-01-12 03:52:47 -06:00
|
|
|
cvf::Mat4f transformMatrix();
|
|
|
|
|
2017-01-19 03:43:23 -06:00
|
|
|
const RigFracture* attachedRigFracture() const;
|
|
|
|
|
2017-02-07 02:09:00 -06:00
|
|
|
void setFractureTemplate(RimFractureTemplate* fractureTemplate);
|
|
|
|
RimFractureTemplate* attachedFractureDefinition() const;
|
2017-01-10 08:29:38 -06:00
|
|
|
|
2017-01-19 00:28:04 -06:00
|
|
|
RivWellFracturePartMgr* fracturePartManager();
|
|
|
|
|
2017-01-04 01:10:02 -06:00
|
|
|
bool hasValidGeometry() const;
|
|
|
|
void computeGeometry();
|
2017-01-06 06:13:25 -06:00
|
|
|
void setRecomputeGeometryFlag();
|
2017-01-11 07:32:15 -06:00
|
|
|
|
2017-01-12 03:24:01 -06:00
|
|
|
const std::vector<cvf::uint>& triangleIndices() const;
|
2017-01-04 01:10:02 -06:00
|
|
|
const std::vector<cvf::Vec3f>& nodeCoords() const;
|
|
|
|
|
2017-01-10 06:37:50 -06:00
|
|
|
|
2017-01-19 06:35:07 -06:00
|
|
|
std::vector<size_t> getPotentiallyFracturedCells();
|
2017-02-02 01:46:05 -06:00
|
|
|
void computeTransmissibility(RimEclipseCase* caseToApply);
|
2017-01-11 07:32:15 -06:00
|
|
|
|
2017-01-19 03:43:23 -06:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
2017-02-06 04:44:24 -06:00
|
|
|
cvf::Vec3d fracturePosition() const;
|
|
|
|
|
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
|
|
|
|
2017-01-04 01:10:02 -06:00
|
|
|
private:
|
2017-01-06 06:13:25 -06:00
|
|
|
bool isRecomputeGeometryFlagSet();
|
2017-01-19 03:43:23 -06:00
|
|
|
cvf::Vec3d fracturePositionForUi() const;
|
|
|
|
|
|
|
|
QString createOneBasedIJK() const;
|
2017-01-06 08:55:26 -06:00
|
|
|
|
2017-01-13 08:49:21 -06:00
|
|
|
//Functions for area calculations - should these be in separate class
|
2017-01-24 05:15:26 -06:00
|
|
|
bool planeCellIntersectionPolygons(size_t cellindex, std::vector<std::vector<cvf::Vec3d> > & polygons, cvf::Vec3d & localX, cvf::Vec3d & localY, cvf::Vec3d & localZ);
|
2017-01-06 06:13:25 -06:00
|
|
|
|
2017-01-19 06:35:07 -06:00
|
|
|
protected:
|
2017-02-07 04:08:56 -06:00
|
|
|
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;
|
2017-01-02 07:13:34 -06:00
|
|
|
};
|