mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1037 - pre-proto - Added RimFracture and RimFractureCollection
This commit is contained in:
parent
2df403245e
commit
be23a2ee84
@ -85,6 +85,8 @@ ${CEE_CURRENT_LIST_DIR}RimEclipseInputCaseOpm.h
|
||||
${CEE_CURRENT_LIST_DIR}RimIntersectionBox.h
|
||||
${CEE_CURRENT_LIST_DIR}RimMultiSnapshotDefinition.h
|
||||
${CEE_CURRENT_LIST_DIR}RimFractureDefinition.h
|
||||
${CEE_CURRENT_LIST_DIR}RimFracture.h
|
||||
${CEE_CURRENT_LIST_DIR}RimFractureCollection.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
@ -168,6 +170,8 @@ ${CEE_CURRENT_LIST_DIR}RimEclipseInputCaseOpm.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimIntersectionBox.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimMultiSnapshotDefinition.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimFractureDefinition.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimFracture.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimFractureCollection.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
97
ApplicationCode/ProjectDataModel/RimFracture.cpp
Normal file
97
ApplicationCode/ProjectDataModel/RimFracture.cpp
Normal file
@ -0,0 +1,97 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016- 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 "RimFracture.h"
|
||||
|
||||
#include "RimFractureDefinition.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void caf::AppEnum< RimFracture::FractureWellEnum>::setUp()
|
||||
{
|
||||
addItem(RimFracture::FRACTURE_SIMULATION_WELL, "SIMULATION_WELL", "Simulation Well");
|
||||
addItem(RimFracture::FRACTURE_WELL_PATH, "WELL_PATH", "Well Path");
|
||||
|
||||
setDefault(RimFracture::FRACTURE_SIMULATION_WELL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimFracture, "Fracture");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFracture::RimFracture(void)
|
||||
{
|
||||
CAF_PDM_InitObject("Fracture", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&name, "UserDescription", QString("Fracture Name"), "Name", "", "", "");
|
||||
CAF_PDM_InitField(&welltype,"Type", caf::AppEnum<FractureWellEnum>(FRACTURE_SIMULATION_WELL), "Type", "", "", "");
|
||||
|
||||
CAF_PDM_InitField( &measuredDepth, "MeasuredDepth", 650.0f, "Measured Depth Location (if along well path)", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&wellpath, "WellPath", "Well path for measured deph", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&i, "I", 1, "Fracture location cell I", "", "", "");
|
||||
CAF_PDM_InitField(&i, "J", 1, "Fracture location cell J", "", "", "");
|
||||
CAF_PDM_InitField(&i, "K", 1, "Fracture location cell K", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&fractureDefinition, "FractureDef", "FractureDef", "", "", "");
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFracture::~RimFracture()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
uiOrdering.add(&name);
|
||||
|
||||
caf::PdmUiGroup* geometryGroup = uiOrdering.addNewGroup("Fractures");
|
||||
geometryGroup->add(&fractureDefinition);
|
||||
geometryGroup->add(&welltype);
|
||||
|
||||
if (welltype == FRACTURE_WELL_PATH)
|
||||
{
|
||||
geometryGroup->add(&wellpath);
|
||||
geometryGroup->add(&measuredDepth);
|
||||
}
|
||||
|
||||
else if (welltype == FRACTURE_SIMULATION_WELL)
|
||||
{
|
||||
geometryGroup->add(&i);
|
||||
geometryGroup->add(&j);
|
||||
geometryGroup->add(&k);
|
||||
|
||||
}
|
||||
|
||||
uiOrdering.setForgetRemainingFields(true);
|
||||
|
||||
}
|
64
ApplicationCode/ProjectDataModel/RimFracture.h
Normal file
64
ApplicationCode/ProjectDataModel/RimFracture.h
Normal file
@ -0,0 +1,64 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016- 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 "cafAppEnum.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmPtrField.h"
|
||||
|
||||
class RimFractureDefinition;
|
||||
class RimWellPath;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFracture : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
enum FractureWellEnum
|
||||
{
|
||||
FRACTURE_WELL_PATH,
|
||||
FRACTURE_SIMULATION_WELL
|
||||
};
|
||||
|
||||
public:
|
||||
RimFracture(void);
|
||||
virtual ~RimFracture(void);
|
||||
|
||||
caf::PdmField<QString> name;
|
||||
caf::PdmPtrField<RimFractureDefinition* > fractureDefinition;
|
||||
caf::PdmField< caf::AppEnum< FractureWellEnum > > welltype;
|
||||
|
||||
caf::PdmPtrField<RimWellPath*> wellpath;
|
||||
caf::PdmField<float> measuredDepth;
|
||||
|
||||
caf::PdmField<int> i;
|
||||
caf::PdmField<int> j;
|
||||
caf::PdmField<int> k;
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||
|
||||
|
||||
|
||||
};
|
69
ApplicationCode/ProjectDataModel/RimFractureCollection.cpp
Normal file
69
ApplicationCode/ProjectDataModel/RimFractureCollection.cpp
Normal file
@ -0,0 +1,69 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016- 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 "RimFractureCollection.h"
|
||||
|
||||
#include "RimFracture.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimFractureCollection, "FractureCollection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureCollection::RimFractureCollection(void)
|
||||
{
|
||||
CAF_PDM_InitObject("Fracture collection", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&fractures, "Fractures", "", "", "", "");
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureCollection::~RimFractureCollection()
|
||||
{
|
||||
fractures.deleteAllChildObjects();
|
||||
|
||||
}
|
||||
|
||||
|
||||
//TODO: Trenger vi en sånn for å legge til fractures???
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// void RimIntersectionCollection::appendIntersection(RimIntersection* intersection)
|
||||
// {
|
||||
// m_intersections.push_back(intersection);
|
||||
//
|
||||
// updateConnectedEditors();
|
||||
// RiuMainWindow::instance()->selectAsCurrentItem(intersection);
|
||||
//
|
||||
// RimView* rimView = NULL;
|
||||
// firstAncestorOrThisOfType(rimView);
|
||||
// if (rimView)
|
||||
// {
|
||||
// rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
// }
|
||||
// }
|
42
ApplicationCode/ProjectDataModel/RimFractureCollection.h
Normal file
42
ApplicationCode/ProjectDataModel/RimFractureCollection.h
Normal file
@ -0,0 +1,42 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016- 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 "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
|
||||
class RimFracture;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFractureCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimFractureCollection(void);
|
||||
virtual ~RimFractureCollection(void);
|
||||
|
||||
caf::PdmChildArrayField<RimFracture*> fractures;
|
||||
caf::PdmField<bool> isActive;
|
||||
|
||||
};
|
@ -46,7 +46,6 @@ RimFractureDefinition::RimFractureDefinition(void)
|
||||
{
|
||||
CAF_PDM_InitObject("Fracture definition", "", "", "");
|
||||
|
||||
//TODO New defaults???
|
||||
CAF_PDM_InitField(&halfLength, "HalfLength", 650.0f, "Fracture Halflength X_f", "", "", "");
|
||||
CAF_PDM_InitField(&height, "Height", 75.0f, "Fracture Height", "", "", "");
|
||||
CAF_PDM_InitField(&orientation, "Orientation", caf::AppEnum<FracOrientationEnum>(TRANSVERSE_WELL_PATH), "Fracture orientation", "", "", "");
|
||||
|
@ -21,11 +21,13 @@
|
||||
#include "RimOilField.h"
|
||||
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimGeoMechModels.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimFormationNamesCollection.h"
|
||||
#include "RimFractureDefinition.h"
|
||||
#include "RimFractureCollection.h"
|
||||
#include "RimGeoMechModels.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimOilField, "ResInsightOilField");
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -38,11 +40,13 @@ RimOilField::RimOilField(void)
|
||||
CAF_PDM_InitFieldNoDefault(&analysisModels, "AnalysisModels", "Grid Models", ":/GridModels.png", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&geoMechModels, "GeoMechModels", "Geo Mech Models", ":/GridModels.png", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&wellPathCollection, "WellPathCollection", "Well Paths", ":/WellCollection.png", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&fractureDefinition, "FractureDefenition", "Defenition of fractures", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&fractureDefinition, "FractureDefinition", "Defenition of fractures", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&summaryCaseCollection,"SummaryCaseCollection","Summary Cases",":/GridModels.png","","");
|
||||
CAF_PDM_InitFieldNoDefault(&fractureCollection, "FractureCollection", "Fractures", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&formationNamesCollection,"FormationNamesCollection","Formations","","","");
|
||||
|
||||
fractureDefinition = new RimFractureDefinition();
|
||||
fractureCollection = new RimFractureCollection();
|
||||
analysisModels = new RimEclipseCaseCollection();
|
||||
wellPathCollection = new RimWellPathCollection();
|
||||
summaryCaseCollection = new RimSummaryCaseCollection();
|
||||
@ -55,6 +59,7 @@ RimOilField::~RimOilField(void)
|
||||
{
|
||||
if (wellPathCollection()) delete wellPathCollection();
|
||||
if (fractureDefinition()) delete fractureDefinition();
|
||||
if (fractureCollection()) delete fractureCollection();
|
||||
if (geoMechModels()) delete geoMechModels();
|
||||
if (analysisModels()) delete analysisModels();
|
||||
if (summaryCaseCollection()) delete summaryCaseCollection();
|
||||
|
@ -29,6 +29,7 @@ class RimEclipseCaseCollection;
|
||||
class RimGeoMechModels;
|
||||
class RimWellPathCollection;
|
||||
class RimFractureDefinition;
|
||||
class RimFractureCollection;
|
||||
class RimSummaryCaseCollection;
|
||||
class RimFormationNamesCollection;
|
||||
|
||||
@ -48,6 +49,7 @@ public:
|
||||
caf::PdmChildField<RimGeoMechModels*> geoMechModels;
|
||||
caf::PdmChildField<RimWellPathCollection*> wellPathCollection;
|
||||
caf::PdmChildField<RimFractureDefinition*> fractureDefinition;
|
||||
caf::PdmChildField<RimFractureCollection*> fractureCollection;
|
||||
caf::PdmChildField<RimSummaryCaseCollection*> summaryCaseCollection;
|
||||
caf::PdmChildField<RimFormationNamesCollection*> formationNamesCollection;
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
#include "RimFormationNamesCollection.h"
|
||||
#include "RimFractureDefinition.h"
|
||||
#include "RimFractureCollection.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
#include "RimGeoMechModels.h"
|
||||
#include "RimGridSummaryCase.h"
|
||||
@ -827,6 +828,7 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS
|
||||
if (oilField->geoMechModels()) uiTreeOrdering.add(oilField->geoMechModels());
|
||||
if (oilField->wellPathCollection()) uiTreeOrdering.add(oilField->wellPathCollection());
|
||||
if (oilField->fractureDefinition()) uiTreeOrdering.add(oilField->fractureDefinition());
|
||||
if (oilField->fractureCollection()) uiTreeOrdering.add(oilField->fractureCollection());
|
||||
if (oilField->formationNamesCollection()) uiTreeOrdering.add(oilField->formationNamesCollection());
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,7 @@ class RimCase;
|
||||
class RimCommandObject;
|
||||
class RimEclipseCase;
|
||||
class RimFractureDefinition;
|
||||
class RimFractureCollection;
|
||||
class RimIdenticalGridCaseGroup;
|
||||
class RimMainPlotCollection;
|
||||
class RimMultiSnapshotDefinition;
|
||||
@ -74,8 +75,10 @@ public:
|
||||
caf::PdmChildArrayField<RimCommandObject*> commandObjects;
|
||||
|
||||
caf::PdmChildArrayField<RimMultiSnapshotDefinition*> multiSnapshotDefinitions;
|
||||
|
||||
caf::PdmChildArrayField<RimFractureDefinition*> fractureDefinition;
|
||||
|
||||
caf::PdmChildArrayField<RimFractureCollection*> fractureCollection;
|
||||
|
||||
caf::PdmField<QString> mainWindowTreeViewState;
|
||||
caf::PdmField<QString> mainWindowCurrentModelIndexPath;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user