#1739 Ellipse Fracture : Recompute the fracture grid when opening project

This commit is contained in:
Magne Sjaastad 2017-08-04 14:35:16 +02:00
parent 3c5016cb8c
commit a3ba1991db
3 changed files with 16 additions and 5 deletions

View File

@ -65,6 +65,13 @@ RimEllipseFractureTemplate::~RimEllipseFractureTemplate()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEllipseFractureTemplate::loadDataAndUpdate()
{
setupFractureGridCells();
}
//--------------------------------------------------------------------------------------------------
///
@ -139,7 +146,6 @@ void RimEllipseFractureTemplate::fractureTriangleGeometry(std::vector<cvf::Vec3f
return;
}
tesselator.tesselateEllipsis(a, b, triangleIndices, nodeCoords);
}
@ -277,11 +283,8 @@ void RimEllipseFractureTemplate::setupFractureGridCells()
m_fractureGrid->setWellCenterFractureCellIJ(wellCenterFractureCellIJ);
m_fractureGrid->setICellCount(numberOfCellsX);
m_fractureGrid->setJCellCount(numberOfCellsY);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -52,6 +52,8 @@ public:
caf::PdmField<float> width;
caf::PdmField<float> permeability;
void loadDataAndUpdate();
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
void fractureTriangleGeometry(std::vector<cvf::Vec3f>* nodeCoords,
@ -68,5 +70,4 @@ protected:
private:
void setupFractureGridCells();
cvf::ref<RigFractureGrid> m_fractureGrid;
};

View File

@ -18,6 +18,7 @@
#include "RimFractureTemplateCollection.h"
#include "RimEllipseFractureTemplate.h"
#include "RimFractureTemplate.h"
#include "RimStimPlanFractureTemplate.h"
@ -138,6 +139,12 @@ void RimFractureTemplateCollection::updateFilePathsFromProjectPath(const QString
{
stimPlanFracture->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
}
RimEllipseFractureTemplate* ellipseFracture = dynamic_cast<RimEllipseFractureTemplate*>(f);
if (ellipseFracture)
{
ellipseFracture->loadDataAndUpdate();
}
}
}