|
|
|
|
@@ -26,8 +26,11 @@
|
|
|
|
|
#include "RifJsonEncodeDecode.h"
|
|
|
|
|
#include "RifParameterXmlReader.h"
|
|
|
|
|
|
|
|
|
|
#include "RigActiveCellInfo.h"
|
|
|
|
|
#include "RigBasicPlane.h"
|
|
|
|
|
#include "RigEclipseCaseData.h"
|
|
|
|
|
#include "RigFaultReactivationModel.h"
|
|
|
|
|
#include "RigFaultReactivationModelGenerator.h"
|
|
|
|
|
#include "RigPolyLinesData.h"
|
|
|
|
|
|
|
|
|
|
#include "WellPathCommands/PointTangentManipulator/RicPolyline3dEditor.h"
|
|
|
|
|
@@ -78,34 +81,34 @@ RimFaultReactivationModel::RimFaultReactivationModel()
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &m_geomechCase, "GeoMechCase", "Global GeoMech Model" );
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &m_baseDir, "BaseDirectory", "Working folder" );
|
|
|
|
|
CAF_PDM_InitField( &m_modelThickness, "ModelThickness", 100.0, "Model Cell Thickness" );
|
|
|
|
|
CAF_PDM_InitField( &m_extentHorizontal, "HorizontalExtent", 1000.0, "Horizontal Extent" );
|
|
|
|
|
CAF_PDM_InitField( &m_extentVerticalAbove, "VerticalExtentAbove", 200.0, "Vertical Extent Above Anchor" );
|
|
|
|
|
m_extentVerticalAbove.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
|
|
|
|
m_extentVerticalAbove.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::LabelPosType::TOP );
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &m_extentVerticalBelow, "VerticalExtentBelow", 200.0, "Vertical Extent Below Anchor" );
|
|
|
|
|
m_extentVerticalBelow.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
|
|
|
|
m_extentVerticalBelow.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::LabelPosType::TOP );
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &m_modelExtentFromAnchor, "ModelExtentFromAnchor", 1000.0, "Horz. Extent from Anchor" );
|
|
|
|
|
CAF_PDM_InitField( &m_modelMinZ, "ModelMinZ", 0.0, "Start Depth" );
|
|
|
|
|
CAF_PDM_InitField( &m_modelBelowSize, "ModelBelowSize", 500.0, "Depth Below Fault" );
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &m_showFaultPlane, "ShowFaultPlane", true, "Show Fault Plane" );
|
|
|
|
|
CAF_PDM_InitField( &m_showModelPlane, "ShowModelPlane", false, "Show 2D Model" );
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &m_startCellIndex, "StartCellIndex", "Start Cell Index" );
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &m_startCellFace, "StartCellFace", "Start Cell Face" );
|
|
|
|
|
m_startCellIndex = 0;
|
|
|
|
|
m_startCellFace = cvf::StructGridInterface::FaceType::NO_FACE;
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &m_faultExtendUpwards, "FaultExtendUpwards", 100.0, "Fault Extension Above Reservoir" );
|
|
|
|
|
m_faultExtendUpwards.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
|
|
|
|
CAF_PDM_InitField( &m_faultExtendDownwards, "FaultExtendDownwards", 100.0, "Fault Extension Below Reservoir" );
|
|
|
|
|
m_faultExtendDownwards.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &m_showModelPlane, "ShowModelPlane", true, "Show 2D Model" );
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &m_fault, "Fault", "Fault" );
|
|
|
|
|
m_fault.uiCapability()->setUiReadOnly( true );
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &m_faultPlaneColor, "FaultPlaneColor", cvf::Color3f( cvf::Color3f::GRAY ), "Plane Color" );
|
|
|
|
|
CAF_PDM_InitField( &m_modelPart1Color, "ModelPart1Color", cvf::Color3f( cvf::Color3f::GREEN ), "Part 1 Color" );
|
|
|
|
|
CAF_PDM_InitField( &m_modelPart2Color, "ModelPart2Color", cvf::Color3f( cvf::Color3f::BLUE ), "Part 2 Color" );
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &m_numberOfCellsHorzPart1, "NumberOfCellsHorzPart1", 20, "Horizontal Number of Cells, Part 1" );
|
|
|
|
|
CAF_PDM_InitField( &m_numberOfCellsHorzPart2, "NumberOfCellsHorzPart2", 20, "Horizontal Number of Cells, Part 2" );
|
|
|
|
|
CAF_PDM_InitField( &m_numberOfCellsVertUp, "NumberOfCellsVertUp", 20, "Vertical Number of Cells, Upper Part" );
|
|
|
|
|
CAF_PDM_InitField( &m_numberOfCellsVertMid, "NumberOfCellsVertMid", 20, "Vertical Number of Cells, Middle Part" );
|
|
|
|
|
CAF_PDM_InitField( &m_numberOfCellsVertLow, "NumberOfCellsVertLow", 20, "Vertical Number of Cells, Lower Part" );
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &m_maxReservoirCellHeight, "MaxReservoirCellHeight", 20.0, "Max. Reservoir Cell Height" );
|
|
|
|
|
CAF_PDM_InitField( &m_cellHeightGrowFactor, "CellHeightGrowFactor", 1.05, "Cell Height Grow Factor Outside Reservoir" );
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &m_useLocalCoordinates, "UseLocalCoordinates", false, "Export Using Local Coordinates" );
|
|
|
|
|
|
|
|
|
|
@@ -115,11 +118,11 @@ RimFaultReactivationModel::RimFaultReactivationModel()
|
|
|
|
|
m_selectedTimeSteps.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() );
|
|
|
|
|
m_selectedTimeSteps.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &m_useGridPorePressure, "UseGridPorePressure", true, "Use Grid Pore Pressure" );
|
|
|
|
|
CAF_PDM_InitField( &m_useGridVoidRatio, "UseGridVoidRatio", true, "Use Grid Void Ratio" );
|
|
|
|
|
CAF_PDM_InitField( &m_useGridTemperature, "UseGridTemperature", true, "Use Grid Temperature" );
|
|
|
|
|
CAF_PDM_InitField( &m_useGridDensity, "UseGridDensity", true, "Use Grid Density" );
|
|
|
|
|
CAF_PDM_InitField( &m_useGridElasticProperties, "UseGridElasticProperties", true, "Use Grid Elastic Properties" );
|
|
|
|
|
CAF_PDM_InitField( &m_useGridPorePressure, "UseGridPorePressure", true, "Output Grid Pore Pressure" );
|
|
|
|
|
CAF_PDM_InitField( &m_useGridVoidRatio, "UseGridVoidRatio", true, "Output Grid Void Ratio" );
|
|
|
|
|
CAF_PDM_InitField( &m_useGridTemperature, "UseGridTemperature", true, "Output Grid Temperature" );
|
|
|
|
|
CAF_PDM_InitField( &m_useGridDensity, "UseGridDensity", false, "Output Grid Density" );
|
|
|
|
|
CAF_PDM_InitField( &m_useGridElasticProperties, "UseGridElasticProperties", false, "Output Grid Elastic Properties" );
|
|
|
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &m_targets, "Targets", "Targets" );
|
|
|
|
|
m_targets.uiCapability()->setUiEditorTypeName( caf::PdmUiTableViewEditor::uiEditorTypeName() );
|
|
|
|
|
@@ -134,8 +137,7 @@ RimFaultReactivationModel::RimFaultReactivationModel()
|
|
|
|
|
|
|
|
|
|
setDeletable( true );
|
|
|
|
|
|
|
|
|
|
m_faultPlane = new RigBasicPlane();
|
|
|
|
|
m_modelPlane = new RigFaultReactivationModel();
|
|
|
|
|
m_2Dmodel = new RigFaultReactivationModel();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
@@ -145,14 +147,6 @@ RimFaultReactivationModel::~RimFaultReactivationModel()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RimFaultReactivationModel::initAfterRead()
|
|
|
|
|
{
|
|
|
|
|
updateVisualization();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
@@ -220,9 +214,11 @@ std::pair<bool, std::string> RimFaultReactivationModel::validateBeforeRun() cons
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RimFaultReactivationModel::setFault( RimFaultInView* fault )
|
|
|
|
|
void RimFaultReactivationModel::setFaultInformation( RimFaultInView* fault, size_t cellIndex, cvf::StructGridInterface::FaceType face )
|
|
|
|
|
{
|
|
|
|
|
m_fault = fault;
|
|
|
|
|
m_fault = fault;
|
|
|
|
|
m_startCellIndex = cellIndex;
|
|
|
|
|
m_startCellFace = face;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
@@ -300,46 +296,31 @@ void RimFaultReactivationModel::updateVisualization()
|
|
|
|
|
auto view = firstAncestorOrThisOfType<Rim3dView>();
|
|
|
|
|
if ( !view ) return;
|
|
|
|
|
|
|
|
|
|
if ( m_startCellIndex() == 0 ) return;
|
|
|
|
|
if ( m_startCellFace() == cvf::StructGridInterface::FaceType::NO_FACE ) return;
|
|
|
|
|
if ( m_targets.size() < 2 ) return;
|
|
|
|
|
|
|
|
|
|
auto normal = m_targets[1]->targetPointXYZ() - m_targets[0]->targetPointXYZ();
|
|
|
|
|
normal.z() = normal.z() * view->scaleZ() * view->scaleZ();
|
|
|
|
|
normal.normalize();
|
|
|
|
|
normal.z() = 0.0;
|
|
|
|
|
if ( !normal.normalize() ) return;
|
|
|
|
|
|
|
|
|
|
m_faultPlane->setPlane( m_targets[0]->targetPointXYZ(), normal );
|
|
|
|
|
m_faultPlane->setMaxExtentFromAnchor( m_extentHorizontal, m_extentVerticalAbove, m_extentVerticalBelow );
|
|
|
|
|
m_faultPlane->setColor( m_faultPlaneColor );
|
|
|
|
|
m_faultPlane->updateRect();
|
|
|
|
|
|
|
|
|
|
double maxZ = m_faultPlane->maxDepth();
|
|
|
|
|
auto [topInt, bottomInt] = m_faultPlane->intersectTopBottomLine();
|
|
|
|
|
|
|
|
|
|
cvf::Vec3d zdir( 0, 0, 1 );
|
|
|
|
|
auto modelNormal = normal ^ zdir;
|
|
|
|
|
auto modelNormal = normal ^ cvf::Vec3d::Z_AXIS;
|
|
|
|
|
modelNormal.normalize();
|
|
|
|
|
|
|
|
|
|
m_modelPlane->setPlane( m_targets[0]->targetPointXYZ(), modelNormal );
|
|
|
|
|
m_modelPlane->setFaultPlaneIntersect( topInt, bottomInt );
|
|
|
|
|
m_modelPlane->setMaxExtentFromAnchor( m_modelExtentFromAnchor, m_modelMinZ, maxZ + m_modelBelowSize );
|
|
|
|
|
m_modelPlane->setPartColors( m_modelPart1Color, m_modelPart2Color );
|
|
|
|
|
m_modelPlane->setCellCounts( m_numberOfCellsHorzPart1,
|
|
|
|
|
m_numberOfCellsHorzPart2,
|
|
|
|
|
m_numberOfCellsVertUp,
|
|
|
|
|
m_numberOfCellsVertMid,
|
|
|
|
|
m_numberOfCellsVertLow );
|
|
|
|
|
m_modelPlane->setThickness( m_modelThickness );
|
|
|
|
|
auto generator = std::make_shared<RigFaultReactivationModelGenerator>( m_targets[0]->targetPointXYZ(), modelNormal );
|
|
|
|
|
generator->setFault( m_fault()->faultGeometry() );
|
|
|
|
|
generator->setGrid( eclipseCase()->mainGrid() );
|
|
|
|
|
generator->setActiveCellInfo( eclipseCase()->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL ) );
|
|
|
|
|
generator->setModelSize( m_modelMinZ, m_modelBelowSize, m_modelExtentFromAnchor );
|
|
|
|
|
generator->setFaultBufferDepth( m_faultExtendUpwards, m_faultExtendDownwards );
|
|
|
|
|
generator->setModelThickness( m_modelThickness );
|
|
|
|
|
generator->setModelGriddingOptions( m_maxReservoirCellHeight, m_cellHeightGrowFactor, m_numberOfCellsHorzPart1, m_numberOfCellsHorzPart2 );
|
|
|
|
|
generator->setupLocalCoordinateTransform();
|
|
|
|
|
generator->setUseLocalCoordinates( m_useLocalCoordinates );
|
|
|
|
|
|
|
|
|
|
// set up transform to local coordinate system
|
|
|
|
|
{
|
|
|
|
|
auto [xVec, yVec] = localCoordSysNormalsXY();
|
|
|
|
|
cvf::Mat4d transform = cvf::Mat4d::fromCoordSystemAxes( &xVec, &yVec, &cvf::Vec3d::Z_AXIS );
|
|
|
|
|
cvf::Vec3d center = m_targets[0]->targetPointXYZ() * -1.0;
|
|
|
|
|
center.z() = 0.0;
|
|
|
|
|
center.transformPoint( transform );
|
|
|
|
|
transform.setTranslation( center );
|
|
|
|
|
m_modelPlane->setLocalCoordTransformation( transform );
|
|
|
|
|
m_modelPlane->setUseLocalCoordinates( m_useLocalCoordinates );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m_modelPlane->updateGeometry();
|
|
|
|
|
m_2Dmodel->setPartColors( m_modelPart1Color, m_modelPart2Color );
|
|
|
|
|
m_2Dmodel->setGenerator( generator );
|
|
|
|
|
m_2Dmodel->updateGeometry( m_startCellIndex, (cvf::StructGridInterface::FaceType)m_startCellFace() );
|
|
|
|
|
|
|
|
|
|
view->scheduleCreateDisplayModelAndRedraw();
|
|
|
|
|
}
|
|
|
|
|
@@ -407,28 +388,12 @@ RivFaultReactivationModelPartMgr* RimFaultReactivationModel::partMgr()
|
|
|
|
|
return m_partMgr.p();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
cvf::ref<RigBasicPlane> RimFaultReactivationModel::faultPlane() const
|
|
|
|
|
{
|
|
|
|
|
return m_faultPlane;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
cvf::ref<RigFaultReactivationModel> RimFaultReactivationModel::model() const
|
|
|
|
|
{
|
|
|
|
|
return m_modelPlane;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
bool RimFaultReactivationModel::showFaultPlane() const
|
|
|
|
|
{
|
|
|
|
|
return m_showFaultPlane;
|
|
|
|
|
return m_2Dmodel;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
@@ -439,24 +404,6 @@ bool RimFaultReactivationModel::showModel() const
|
|
|
|
|
return m_showModelPlane;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
std::pair<cvf::Vec3d, cvf::Vec3d> RimFaultReactivationModel::localCoordSysNormalsXY() const
|
|
|
|
|
{
|
|
|
|
|
cvf::Vec3d yNormal = m_modelPlane->normal();
|
|
|
|
|
cvf::Vec3d xNormal = yNormal ^ cvf::Vec3d::Z_AXIS;
|
|
|
|
|
|
|
|
|
|
xNormal.z() = 0.0;
|
|
|
|
|
yNormal.z() = 0.0;
|
|
|
|
|
xNormal.normalize();
|
|
|
|
|
yNormal.normalize();
|
|
|
|
|
|
|
|
|
|
yNormal = xNormal ^ cvf::Vec3d::Z_AXIS;
|
|
|
|
|
|
|
|
|
|
return std::make_pair( xNormal, yNormal );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
@@ -468,14 +415,6 @@ void RimFaultReactivationModel::defineUiOrdering( QString uiConfigName, caf::Pdm
|
|
|
|
|
genGrp->add( &m_baseDir );
|
|
|
|
|
genGrp->add( &m_geomechCase );
|
|
|
|
|
|
|
|
|
|
auto faultGrp = uiOrdering.addNewGroup( "Fault Plane" );
|
|
|
|
|
|
|
|
|
|
faultGrp->add( &m_showFaultPlane );
|
|
|
|
|
faultGrp->add( &m_faultPlaneColor );
|
|
|
|
|
faultGrp->add( &m_extentHorizontal );
|
|
|
|
|
faultGrp->add( &m_extentVerticalAbove );
|
|
|
|
|
faultGrp->add( &m_extentVerticalBelow );
|
|
|
|
|
|
|
|
|
|
auto modelGrp = uiOrdering.addNewGroup( "2D Model" );
|
|
|
|
|
modelGrp->add( &m_showModelPlane );
|
|
|
|
|
|
|
|
|
|
@@ -484,21 +423,23 @@ void RimFaultReactivationModel::defineUiOrdering( QString uiConfigName, caf::Pdm
|
|
|
|
|
sizeModelGrp->add( &m_modelMinZ );
|
|
|
|
|
sizeModelGrp->add( &m_modelBelowSize );
|
|
|
|
|
|
|
|
|
|
auto gridModelGrp = modelGrp->addNewGroup( "Grid" );
|
|
|
|
|
auto faultGrp = modelGrp->addNewGroup( "Fault" );
|
|
|
|
|
faultGrp->add( &m_faultExtendUpwards );
|
|
|
|
|
faultGrp->add( &m_faultExtendDownwards );
|
|
|
|
|
|
|
|
|
|
auto gridModelGrp = modelGrp->addNewGroup( "Grid" );
|
|
|
|
|
gridModelGrp->add( &m_modelThickness );
|
|
|
|
|
gridModelGrp->add( &m_maxReservoirCellHeight );
|
|
|
|
|
gridModelGrp->add( &m_cellHeightGrowFactor );
|
|
|
|
|
gridModelGrp->add( &m_numberOfCellsHorzPart1 );
|
|
|
|
|
gridModelGrp->add( &m_numberOfCellsHorzPart2 );
|
|
|
|
|
gridModelGrp->add( &m_numberOfCellsVertUp );
|
|
|
|
|
gridModelGrp->add( &m_numberOfCellsVertMid );
|
|
|
|
|
gridModelGrp->add( &m_numberOfCellsVertLow );
|
|
|
|
|
gridModelGrp->add( &m_useLocalCoordinates );
|
|
|
|
|
|
|
|
|
|
auto timeStepGrp = uiOrdering.addNewGroup( "Time Steps" );
|
|
|
|
|
timeStepGrp->add( &m_timeStepFilter );
|
|
|
|
|
timeStepGrp->add( &m_selectedTimeSteps );
|
|
|
|
|
|
|
|
|
|
auto propertiesGrp = uiOrdering.addNewGroup( "Properties" );
|
|
|
|
|
auto propertiesGrp = uiOrdering.addNewGroup( "Export" );
|
|
|
|
|
propertiesGrp->add( &m_useLocalCoordinates );
|
|
|
|
|
propertiesGrp->add( &m_useGridPorePressure );
|
|
|
|
|
propertiesGrp->add( &m_useGridVoidRatio );
|
|
|
|
|
propertiesGrp->add( &m_useGridTemperature );
|
|
|
|
|
@@ -521,7 +462,12 @@ void RimFaultReactivationModel::defineUiOrdering( QString uiConfigName, caf::Pdm
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RimFaultReactivationModel::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
|
|
|
|
{
|
|
|
|
|
if ( changedField == &m_userDescription )
|
|
|
|
|
if ( ( changedField == &m_useGridPorePressure ) || ( changedField == &m_useGridVoidRatio ) || ( changedField == &m_useGridTemperature ) ||
|
|
|
|
|
( changedField == &m_useGridDensity ) || ( changedField == &m_useGridElasticProperties ) )
|
|
|
|
|
{
|
|
|
|
|
return; // do nothing
|
|
|
|
|
}
|
|
|
|
|
else if ( changedField == &m_userDescription )
|
|
|
|
|
{
|
|
|
|
|
updateConnectedEditors();
|
|
|
|
|
}
|
|
|
|
|
@@ -544,7 +490,7 @@ void RimFaultReactivationModel::defineEditorAttribute( const caf::PdmFieldHandle
|
|
|
|
|
tvAttribute->resizePolicy = caf::PdmUiTableViewEditorAttribute::RESIZE_TO_FIT_CONTENT;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if ( ( field == &m_extentVerticalAbove ) || ( field == &m_extentVerticalBelow ) )
|
|
|
|
|
else if ( ( field == &m_faultExtendUpwards ) || ( field == &m_faultExtendDownwards ) )
|
|
|
|
|
{
|
|
|
|
|
auto* attr = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>( attribute );
|
|
|
|
|
|
|
|
|
|
@@ -693,12 +639,13 @@ QString RimFaultReactivationModel::baseFilename() const
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
bool RimFaultReactivationModel::exportModelSettings()
|
|
|
|
|
{
|
|
|
|
|
if ( m_faultPlane.isNull() ) return false;
|
|
|
|
|
if ( m_2Dmodel.isNull() ) return false;
|
|
|
|
|
if ( !m_2Dmodel->isValid() ) return false;
|
|
|
|
|
|
|
|
|
|
QMap<QString, QVariant> settings;
|
|
|
|
|
|
|
|
|
|
auto [topPosition, bottomPosition] = m_faultPlane->intersectTopBottomLine();
|
|
|
|
|
auto faultNormal = m_faultPlane->normal();
|
|
|
|
|
auto [topPosition, bottomPosition] = m_2Dmodel->faultTopBottom();
|
|
|
|
|
auto faultNormal = m_2Dmodel->faultNormal();
|
|
|
|
|
|
|
|
|
|
// make sure we move horizontally
|
|
|
|
|
faultNormal.z() = 0.0;
|
|
|
|
|
@@ -732,11 +679,8 @@ bool RimFaultReactivationModel::extractAndExportModelData()
|
|
|
|
|
selectedTimeStepIndexes.push_back( idx - m_availableTimeSteps.begin() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
auto grid = eCase->mainGrid();
|
|
|
|
|
|
|
|
|
|
// extract data for each timestep
|
|
|
|
|
m_dataAccess = std::make_shared<RimFaultReactivationDataAccess>( eCase, geoMechCase(), selectedTimeStepIndexes );
|
|
|
|
|
model()->generateElementSets( m_dataAccess.get(), grid );
|
|
|
|
|
m_dataAccess->extractModelData( *model() );
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|