2018-12-13 12:49:37 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2018- 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 "RimCompletionTemplateCollection.h"
|
|
|
|
|
2021-04-09 06:08:35 -05:00
|
|
|
#include "RimEnsembleFractureStatisticsCollection.h"
|
2018-12-13 12:49:37 -06:00
|
|
|
#include "RimFractureTemplateCollection.h"
|
2020-11-04 06:46:17 -06:00
|
|
|
#include "RimStimPlanModelTemplateCollection.h"
|
2018-12-13 12:49:37 -06:00
|
|
|
#include "RimValveTemplateCollection.h"
|
|
|
|
|
|
|
|
#include "cafPdmUiTreeOrdering.h"
|
|
|
|
|
|
|
|
#include "cvfAssert.h"
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_SOURCE_INIT( RimCompletionTemplateCollection, "CompletionTemplateCollection" );
|
2018-12-13 12:49:37 -06:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimCompletionTemplateCollection::RimCompletionTemplateCollection()
|
|
|
|
{
|
2022-01-07 01:31:52 -06:00
|
|
|
CAF_PDM_InitObject( "Completion Templates", ":/CompletionsSymbol16x16.png" );
|
2018-12-13 12:49:37 -06:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_fractureTemplates, "FractureTemplates", "" );
|
2018-12-13 12:49:37 -06:00
|
|
|
m_fractureTemplates = new RimFractureTemplateCollection;
|
2019-04-16 06:30:03 -05:00
|
|
|
m_fractureTemplates->addDefaultEllipseTemplate();
|
2020-09-22 08:53:17 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_stimPlanModelTemplates, "StimPlanModelTemplates", "" );
|
2020-11-04 06:46:17 -06:00
|
|
|
m_stimPlanModelTemplates = new RimStimPlanModelTemplateCollection;
|
2020-09-22 08:53:17 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_valveTemplates, "ValveTemplates", "" );
|
2018-12-13 12:49:37 -06:00
|
|
|
m_valveTemplates = new RimValveTemplateCollection;
|
2021-03-15 10:23:57 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_fractureGroupStatisticsCollection, "FractureGroupStatisticsCollection", "" );
|
2021-04-09 06:08:35 -05:00
|
|
|
m_fractureGroupStatisticsCollection = new RimEnsembleFractureStatisticsCollection;
|
2018-12-13 12:49:37 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-02-12 04:13:38 -06:00
|
|
|
RimCompletionTemplateCollection::~RimCompletionTemplateCollection()
|
|
|
|
{
|
|
|
|
}
|
2018-12-13 12:49:37 -06:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimFractureTemplateCollection* RimCompletionTemplateCollection::fractureTemplateCollection()
|
|
|
|
{
|
|
|
|
return m_fractureTemplates;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const RimFractureTemplateCollection* RimCompletionTemplateCollection::fractureTemplateCollection() const
|
|
|
|
{
|
|
|
|
return m_fractureTemplates;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimValveTemplateCollection* RimCompletionTemplateCollection::valveTemplateCollection()
|
|
|
|
{
|
|
|
|
return m_valveTemplates;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const RimValveTemplateCollection* RimCompletionTemplateCollection::valveTemplateCollection() const
|
|
|
|
{
|
|
|
|
return m_valveTemplates;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimCompletionTemplateCollection::setDefaultUnitSystemBasedOnLoadedCases()
|
|
|
|
{
|
|
|
|
m_fractureTemplates->setDefaultUnitSystemBasedOnLoadedCases();
|
|
|
|
m_valveTemplates->setDefaultUnitSystemBasedOnLoadedCases();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimCompletionTemplateCollection::setFractureTemplateCollection( RimFractureTemplateCollection* fractureTemplateCollection )
|
2018-12-13 12:49:37 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( !m_fractureTemplates->fractureTemplates().empty() );
|
2018-12-13 12:49:37 -06:00
|
|
|
m_fractureTemplates = fractureTemplateCollection;
|
|
|
|
}
|
|
|
|
|
2020-09-22 08:53:17 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-11-04 06:46:17 -06:00
|
|
|
RimStimPlanModelTemplateCollection* RimCompletionTemplateCollection::stimPlanModelTemplateCollection()
|
2020-09-22 08:53:17 -05:00
|
|
|
{
|
2020-11-04 06:46:17 -06:00
|
|
|
return m_stimPlanModelTemplates;
|
2020-09-22 08:53:17 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-11-04 06:46:17 -06:00
|
|
|
const RimStimPlanModelTemplateCollection* RimCompletionTemplateCollection::stimPlanModelTemplateCollection() const
|
2020-09-22 08:53:17 -05:00
|
|
|
{
|
2020-11-04 06:46:17 -06:00
|
|
|
return m_stimPlanModelTemplates;
|
2020-09-22 08:53:17 -05:00
|
|
|
}
|
|
|
|
|
2021-03-15 10:23:57 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-04-09 06:08:35 -05:00
|
|
|
RimEnsembleFractureStatisticsCollection* RimCompletionTemplateCollection::fractureGroupStatisticsCollection()
|
2021-03-15 10:23:57 -05:00
|
|
|
{
|
|
|
|
return m_fractureGroupStatisticsCollection;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-04-09 06:08:35 -05:00
|
|
|
const RimEnsembleFractureStatisticsCollection* RimCompletionTemplateCollection::fractureGroupStatisticsCollection() const
|
2021-03-15 10:23:57 -05:00
|
|
|
{
|
|
|
|
return m_fractureGroupStatisticsCollection;
|
|
|
|
}
|
|
|
|
|
2018-12-13 12:49:37 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2023-02-26 03:48:40 -06:00
|
|
|
void RimCompletionTemplateCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
2018-12-13 12:49:37 -06:00
|
|
|
{
|
2021-10-06 14:51:58 -05:00
|
|
|
uiTreeOrdering.add( m_valveTemplates );
|
2019-09-06 03:40:57 -05:00
|
|
|
uiTreeOrdering.add( m_fractureTemplates );
|
2021-06-16 04:48:36 -05:00
|
|
|
uiTreeOrdering.add( m_stimPlanModelTemplates );
|
|
|
|
uiTreeOrdering.add( m_fractureGroupStatisticsCollection );
|
2019-09-06 03:40:57 -05:00
|
|
|
uiTreeOrdering.skipRemainingChildren( true );
|
2018-12-13 12:49:37 -06:00
|
|
|
}
|
2020-09-22 08:53:17 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimCompletionTemplateCollection::loadAndUpdateData()
|
|
|
|
{
|
|
|
|
m_fractureTemplates->loadAndUpdateData();
|
2020-11-04 06:46:17 -06:00
|
|
|
m_stimPlanModelTemplates->loadAndUpdateData();
|
2021-03-15 10:23:57 -05:00
|
|
|
m_fractureGroupStatisticsCollection->loadAndUpdateData();
|
2020-09-22 08:53:17 -05:00
|
|
|
}
|