diff --git a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationEnums.h b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationEnums.h index 672ca11f55..cb2d84e242 100644 --- a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationEnums.h +++ b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationEnums.h @@ -38,7 +38,8 @@ enum class BorderSurface enum class Boundary { FarSide, - Bottom + Bottom, + Fault }; enum class ElementSets diff --git a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp index 1b0e7e89de..e60e0bbc12 100644 --- a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp +++ b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp @@ -636,11 +636,13 @@ void RimFaultReactivationModel::updateTimeSteps() const auto eCase = eclipseCase(); if ( eCase != nullptr ) m_availableTimeSteps = eCase->timeStepDates(); + int nAvailSteps = (int)m_availableTimeSteps.size(); + if ( m_selectedTimeSteps().empty() ) { std::vector newVal; - if ( m_availableTimeSteps.size() >= 1 ) newVal.push_back( m_availableTimeSteps.front() ); - if ( m_availableTimeSteps.size() >= 2 ) newVal.push_back( m_availableTimeSteps.back() ); + if ( nAvailSteps > 0 ) newVal.push_back( m_availableTimeSteps.front() ); + if ( nAvailSteps > 1 ) newVal.push_back( m_availableTimeSteps.back() ); m_selectedTimeSteps.setValue( newVal ); } diff --git a/ApplicationLibCode/ReservoirDataModel/RigGriddedPart3d.cpp b/ApplicationLibCode/ReservoirDataModel/RigGriddedPart3d.cpp index 2587a4a1dd..02d0581d19 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigGriddedPart3d.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigGriddedPart3d.cpp @@ -257,6 +257,10 @@ void RigGriddedPart3d::generateGeometry( const std::array& input m_elementLayers[ElementSets::OverBurden] = { std::make_pair( inputPoints[3].z(), inputPoints[5].z() ) }; m_elementLayers[ElementSets::UnderBurden] = { std::make_pair( inputPoints[0].z(), inputPoints[2].z() ) }; + m_boundaryNodes[Boundary::Bottom] = {}; + m_boundaryNodes[Boundary::FarSide] = {}; + m_boundaryNodes[Boundary::Fault] = {}; + updateReservoirElementLayers( reservoirLayers, kLayers ); size_t nVertCells = 0; @@ -367,6 +371,10 @@ void RigGriddedPart3d::generateGeometry( const std::array& input { m_boundaryNodes[Boundary::FarSide].push_back( nodeIndex ); } + else if ( h == (int)nHorzCells ) + { + m_boundaryNodes[Boundary::Fault].push_back( nodeIndex ); + } } } @@ -396,6 +404,7 @@ void RigGriddedPart3d::generateGeometry( const std::array& input m_boundaryElements[Boundary::Bottom] = {}; m_boundaryElements[Boundary::FarSide] = {}; + m_boundaryElements[Boundary::Fault] = {}; int layerIndexOffset = 0; int elementIdx = 0;