mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1322 Added support for geo mech data
This commit is contained in:
@@ -34,6 +34,8 @@ add_library( ${PROJECT_NAME}
|
||||
RigFemPartGrid.cpp
|
||||
RigFemResultAddress.h
|
||||
RigFemResultPosEnum.h
|
||||
RimGeoMechTopologyItem.h
|
||||
RimGeoMechTopologyItem.cpp
|
||||
)
|
||||
|
||||
target_link_libraries( ${PROJECT_NAME} LibCore cafTensor ResultStatisticsCache)
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimGeoMechTopologyItem.h"
|
||||
|
||||
#include "RimGeoMechCase.h"
|
||||
#include "RimGeoMechView.h"
|
||||
|
||||
|
||||
#include "RiuSelectionManager.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimGeoMechTopologyItem, "RimGeoMechTopologyItem");
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGeoMechTopologyItem::RimGeoMechTopologyItem()
|
||||
{
|
||||
CAF_PDM_InitObject("GeoMech Topology Item", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_geoMechCase, "GeoMechCase", "Geo Mech Case", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_gridIndex, "m_gridIndex", "m_gridIndex", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_cellIndex, "m_cellIndex", "m_cellIndex", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_elementFace, "m_elementFace", "m_elementFace", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_hasIntersectionTriangle, "m_hasIntersectionTriangle", "m_hasIntersectionTriangle", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_intersectionTriangle_0, "m_intersectionTriangle_0", "m_intersectionTriangle_0", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_intersectionTriangle_1, "m_intersectionTriangle_1", "m_intersectionTriangle_1", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_intersectionTriangle_2, "m_intersectionTriangle_2", "m_intersectionTriangle_2", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_localIntersectionPoint, "m_localIntersectionPoint", "m_localIntersectionPoint", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGeoMechTopologyItem::~RimGeoMechTopologyItem()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGeoMechTopologyItem::setFromSelectionItem(const RiuGeoMechSelectionItem* selectionItem)
|
||||
{
|
||||
m_geoMechCase = selectionItem->m_view->geoMechCase();
|
||||
|
||||
m_gridIndex = selectionItem->m_gridIndex;
|
||||
m_cellIndex = selectionItem->m_cellIndex;
|
||||
m_elementFace = selectionItem->m_elementFace;
|
||||
m_hasIntersectionTriangle = selectionItem->m_hasIntersectionTriangle;
|
||||
m_intersectionTriangle_0 = cvf::Vec3d(selectionItem->m_intersectionTriangle[0]);
|
||||
m_intersectionTriangle_1 = cvf::Vec3d(selectionItem->m_intersectionTriangle[1]);
|
||||
m_intersectionTriangle_2 = cvf::Vec3d(selectionItem->m_intersectionTriangle[2]);
|
||||
|
||||
m_localIntersectionPoint = selectionItem->m_localIntersectionPoint;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimGeoMechTopologyItem::topologyText() const
|
||||
{
|
||||
QString text;
|
||||
|
||||
/*
|
||||
if (m_geoMechCase)
|
||||
{
|
||||
text += m_geoMechCase->caseUserDescription();
|
||||
}
|
||||
else
|
||||
{
|
||||
text = "No case";
|
||||
}
|
||||
|
||||
text += ", ";
|
||||
text += QString("Grid index %1").arg(m_gridIndex);
|
||||
text += ", ";
|
||||
text += RigTimeHistoryResultAccessor::topologyText(m_geoMechCase->eclipseCaseData(), m_gridIndex, m_cellIndex);
|
||||
*/
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGeoMechCase* RimGeoMechTopologyItem::geoMechCase() const
|
||||
{
|
||||
return m_geoMechCase;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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 "RimPickingTopologyItem.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmFieldCvfVec3d.h"
|
||||
#include "cafPdmPtrField.h"
|
||||
|
||||
class RiuGeoMechSelectionItem;
|
||||
class RimGeoMechCase;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimGeoMechTopologyItem : public RimPickingTopologyItem
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
RimGeoMechTopologyItem();
|
||||
virtual ~RimGeoMechTopologyItem() override;
|
||||
|
||||
void setFromSelectionItem(const RiuGeoMechSelectionItem* selectionItem);
|
||||
|
||||
virtual QString topologyText() const override;
|
||||
RimGeoMechCase* geoMechCase() const;
|
||||
|
||||
public:
|
||||
caf::PdmField<size_t> m_gridIndex;
|
||||
caf::PdmField<size_t> m_cellIndex;
|
||||
caf::PdmField<int> m_elementFace;
|
||||
caf::PdmField<bool> m_hasIntersectionTriangle;
|
||||
|
||||
caf::PdmField<cvf::Vec3d> m_intersectionTriangle_0;
|
||||
caf::PdmField<cvf::Vec3d> m_intersectionTriangle_1;
|
||||
caf::PdmField<cvf::Vec3d> m_intersectionTriangle_2;
|
||||
|
||||
caf::PdmField<cvf::Vec3d> m_localIntersectionPoint;
|
||||
|
||||
private:
|
||||
caf::PdmPtrField<RimGeoMechCase*> m_geoMechCase;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user