mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7493 Add "Fracture Group Statistics" pdm object and import method.
This commit is contained in:
@@ -32,7 +32,8 @@ ${CMAKE_CURRENT_LIST_DIR}/RimWellPathComponentInterface.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathValve.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimMultipleValveLocations.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathAicdParameters.h
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFractureGroupStatistics.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFractureGroupStatisticsCollection.h
|
||||
)
|
||||
|
||||
|
||||
@@ -68,6 +69,8 @@ ${CMAKE_CURRENT_LIST_DIR}/RimNonDarcyPerforationParameters.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathValve.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimMultipleValveLocations.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathAicdParameters.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFractureGroupStatistics.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFractureGroupStatisticsCollection.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "RimCompletionTemplateCollection.h"
|
||||
|
||||
#include "RimFractureGroupStatisticsCollection.h"
|
||||
#include "RimFractureTemplateCollection.h"
|
||||
#include "RimStimPlanModelTemplateCollection.h"
|
||||
#include "RimValveTemplateCollection.h"
|
||||
@@ -44,6 +45,9 @@ RimCompletionTemplateCollection::RimCompletionTemplateCollection()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_valveTemplates, "ValveTemplates", "", "", "", "" );
|
||||
m_valveTemplates = new RimValveTemplateCollection;
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_fractureGroupStatisticsCollection, "FractureGroupStatisticsCollection", "", "", "", "" );
|
||||
m_fractureGroupStatisticsCollection = new RimFractureGroupStatisticsCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -119,6 +123,22 @@ const RimStimPlanModelTemplateCollection* RimCompletionTemplateCollection::stimP
|
||||
return m_stimPlanModelTemplates;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureGroupStatisticsCollection* RimCompletionTemplateCollection::fractureGroupStatisticsCollection()
|
||||
{
|
||||
return m_fractureGroupStatisticsCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimFractureGroupStatisticsCollection* RimCompletionTemplateCollection::fractureGroupStatisticsCollection() const
|
||||
{
|
||||
return m_fractureGroupStatisticsCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -128,6 +148,7 @@ void RimCompletionTemplateCollection::defineUiTreeOrdering( caf::PdmUiTreeOrderi
|
||||
uiTreeOrdering.add( m_fractureTemplates );
|
||||
uiTreeOrdering.add( m_stimPlanModelTemplates );
|
||||
uiTreeOrdering.add( m_valveTemplates );
|
||||
uiTreeOrdering.add( m_fractureGroupStatisticsCollection );
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
}
|
||||
|
||||
@@ -138,4 +159,5 @@ void RimCompletionTemplateCollection::loadAndUpdateData()
|
||||
{
|
||||
m_fractureTemplates->loadAndUpdateData();
|
||||
m_stimPlanModelTemplates->loadAndUpdateData();
|
||||
m_fractureGroupStatisticsCollection->loadAndUpdateData();
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ class RimOilField;
|
||||
class RimValveTemplateCollection;
|
||||
class RimFractureTemplateCollection;
|
||||
class RimStimPlanModelTemplateCollection;
|
||||
class RimFractureGroupStatisticsCollection;
|
||||
|
||||
class RimCompletionTemplateCollection : public caf::PdmObject
|
||||
{
|
||||
@@ -34,13 +35,15 @@ public:
|
||||
RimCompletionTemplateCollection();
|
||||
~RimCompletionTemplateCollection() override;
|
||||
|
||||
RimFractureTemplateCollection* fractureTemplateCollection();
|
||||
const RimFractureTemplateCollection* fractureTemplateCollection() const;
|
||||
RimStimPlanModelTemplateCollection* stimPlanModelTemplateCollection();
|
||||
const RimStimPlanModelTemplateCollection* stimPlanModelTemplateCollection() const;
|
||||
RimValveTemplateCollection* valveTemplateCollection();
|
||||
const RimValveTemplateCollection* valveTemplateCollection() const;
|
||||
void setDefaultUnitSystemBasedOnLoadedCases();
|
||||
RimFractureTemplateCollection* fractureTemplateCollection();
|
||||
const RimFractureTemplateCollection* fractureTemplateCollection() const;
|
||||
RimStimPlanModelTemplateCollection* stimPlanModelTemplateCollection();
|
||||
const RimStimPlanModelTemplateCollection* stimPlanModelTemplateCollection() const;
|
||||
RimValveTemplateCollection* valveTemplateCollection();
|
||||
const RimValveTemplateCollection* valveTemplateCollection() const;
|
||||
RimFractureGroupStatisticsCollection* fractureGroupStatisticsCollection();
|
||||
const RimFractureGroupStatisticsCollection* fractureGroupStatisticsCollection() const;
|
||||
void setDefaultUnitSystemBasedOnLoadedCases();
|
||||
|
||||
void loadAndUpdateData();
|
||||
|
||||
@@ -48,9 +51,10 @@ private:
|
||||
friend class RimOilField;
|
||||
void setFractureTemplateCollection( RimFractureTemplateCollection* fractureTemplateCollection );
|
||||
|
||||
caf::PdmChildField<RimFractureTemplateCollection*> m_fractureTemplates;
|
||||
caf::PdmChildField<RimValveTemplateCollection*> m_valveTemplates;
|
||||
caf::PdmChildField<RimStimPlanModelTemplateCollection*> m_stimPlanModelTemplates;
|
||||
caf::PdmChildField<RimFractureTemplateCollection*> m_fractureTemplates;
|
||||
caf::PdmChildField<RimValveTemplateCollection*> m_valveTemplates;
|
||||
caf::PdmChildField<RimStimPlanModelTemplateCollection*> m_stimPlanModelTemplates;
|
||||
caf::PdmChildField<RimFractureGroupStatisticsCollection*> m_fractureGroupStatisticsCollection;
|
||||
|
||||
protected:
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021 - 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimFractureGroupStatistics.h"
|
||||
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimFractureGroupStatistics, "FractureGroupStatistics" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureGroupStatistics::RimFractureGroupStatistics()
|
||||
{
|
||||
CAF_PDM_InitObject( "Fracture Group Statistics", ":/FractureTemplate16x16.png", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_filePaths, "FilePaths", "", "", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_filePathsTable, "FilePathsTable", "File Paths Table", "", "", "" );
|
||||
m_filePathsTable.uiCapability()->setUiEditorTypeName( caf::PdmUiTextEditor::uiEditorTypeName() );
|
||||
m_filePathsTable.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
m_filePathsTable.uiCapability()->setUiReadOnly( true );
|
||||
m_filePathsTable.xmlCapability()->disableIO();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureGroupStatistics::~RimFractureGroupStatistics()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureGroupStatistics::addFilePath( const QString& filePath )
|
||||
{
|
||||
m_filePaths.v().push_back( filePath );
|
||||
m_filePathsTable = generateFilePathsTable();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFractureGroupStatistics::generateFilePathsTable()
|
||||
{
|
||||
QString body;
|
||||
for ( auto prop : m_filePaths.v() )
|
||||
{
|
||||
body.append( prop.path() + "<br>" );
|
||||
}
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureGroupStatistics::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_filePathsTable )
|
||||
{
|
||||
auto myAttr = dynamic_cast<caf::PdmUiTextEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
{
|
||||
myAttr->wrapMode = caf::PdmUiTextEditorAttribute::NoWrap;
|
||||
myAttr->textMode = caf::PdmUiTextEditorAttribute::HTML;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureGroupStatistics::loadAndUpdateData()
|
||||
{
|
||||
m_filePathsTable = generateFilePathsTable();
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021 - 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 "RimNamedObject.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFractureGroupStatistics : public RimNamedObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimFractureGroupStatistics();
|
||||
~RimFractureGroupStatistics() override;
|
||||
void addFilePath( const QString& filePath );
|
||||
void loadAndUpdateData();
|
||||
|
||||
protected:
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
QString generateFilePathsTable();
|
||||
|
||||
caf::PdmField<std::vector<caf::FilePath>> m_filePaths;
|
||||
caf::PdmField<QString> m_filePathsTable;
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021- 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimFractureGroupStatisticsCollection.h"
|
||||
|
||||
#include "RimFractureGroupStatistics.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimFractureGroupStatisticsCollection, "FractureGroupStatisticsCollection" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureGroupStatisticsCollection::RimFractureGroupStatisticsCollection()
|
||||
{
|
||||
CAF_PDM_InitObject( "Derived Fracture Completions", ":/FractureTemplates16x16.png", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_fractureGroupStatistics, "FractureGroupStatistics", "", "", "", "" );
|
||||
m_fractureGroupStatistics.uiCapability()->setUiHidden( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureGroupStatisticsCollection::addFractureGroupStatistics( RimFractureGroupStatistics* fractureGroupStatistics )
|
||||
{
|
||||
m_fractureGroupStatistics.push_back( fractureGroupStatistics );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureGroupStatisticsCollection::loadAndUpdateData()
|
||||
{
|
||||
for ( auto f : m_fractureGroupStatistics.childObjects() )
|
||||
{
|
||||
f->loadAndUpdateData();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021- 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 "cafPdmChildArrayField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
class RimFractureGroupStatistics;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFractureGroupStatisticsCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimFractureGroupStatisticsCollection();
|
||||
|
||||
void addFractureGroupStatistics( RimFractureGroupStatistics* fractureGroupStatistics );
|
||||
|
||||
void loadAndUpdateData();
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimFractureGroupStatistics*> m_fractureGroupStatistics;
|
||||
};
|
||||
Reference in New Issue
Block a user