mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-04 13:16:56 -06:00
#7339 StimPlanModel: Update python api changes in pdm objects.
The eclipse cases are now set on the StimPlanModelTemplate, not on the StimPlanModel.
This commit is contained in:
1 parent
dc4e372fc2
commit
530c6d3e85
7 files changed
+39
-23
No files matched your search
@@ -23,6 +23,7 @@
|
||||
#include "FractureCommands/RicFractureNameGenerator.h"
|
||||
#include "FractureCommands/RicNewStimPlanModelFeature.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimStimPlanModelTemplate.h"
|
||||
#include "RimStimPlanModelTemplateCollection.h"
|
||||
|
||||
@@ -41,6 +42,9 @@ RimcStimPlanModelTemplateCollection_newStimPlanModelTemplate::RimcStimPlanModelT
|
||||
: caf::PdmObjectMethod( self )
|
||||
{
|
||||
CAF_PDM_InitObject( "Create StimPlan Model Template", "", "", "Create a new StimPlan Model Template" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_eclipseCase, "EclipseCase", "", "", "", "Eclipse Case" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_timeStep, "TimeStep", "", "", "", "Time Step" );
|
||||
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_faciesPropertiesFilePath,
|
||||
"FaciesPropertiesFilePath",
|
||||
"",
|
||||
@@ -60,9 +64,17 @@ RimcStimPlanModelTemplateCollection_newStimPlanModelTemplate::RimcStimPlanModelT
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmObjectHandle* RimcStimPlanModelTemplateCollection_newStimPlanModelTemplate::execute()
|
||||
{
|
||||
if ( !m_eclipseCase ) return nullptr;
|
||||
|
||||
RimStimPlanModelTemplate* newStimPlanModelTemplate = new RimStimPlanModelTemplate;
|
||||
RimStimPlanModelTemplateCollection* stimPlanModelTemplateCollection = self<RimStimPlanModelTemplateCollection>();
|
||||
|
||||
newStimPlanModelTemplate->setName( RicFractureNameGenerator::nameForNewStimPlanModelTemplate() );
|
||||
newStimPlanModelTemplate->setDynamicEclipseCase( m_eclipseCase );
|
||||
newStimPlanModelTemplate->setTimeStep( m_timeStep );
|
||||
newStimPlanModelTemplate->setInitialPressureEclipseCase( m_eclipseCase );
|
||||
newStimPlanModelTemplate->setStaticEclipseCase( m_eclipseCase );
|
||||
|
||||
stimPlanModelTemplateCollection->addStimPlanModelTemplate( newStimPlanModelTemplate );
|
||||
|
||||
RicElasticPropertiesImportTools::importElasticPropertiesFromFile( m_elasticPropertiesFilePath,
|
||||
|
||||
Reference in new issue
Block a user