mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3036 Fracture Truncation : Remove obsolete flag
This commit is contained in:
parent
56a02358df
commit
a60fc3f43b
@ -37,8 +37,7 @@ RimFractureContainment::RimFractureContainment()
|
|||||||
CAF_PDM_InitField(&m_baseKLayer, "BaseKLayer", 0, " Base Layer", "", "", "");
|
CAF_PDM_InitField(&m_baseKLayer, "BaseKLayer", 0, " Base Layer", "", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitField(&m_truncateAtFaults, "TruncateAtFaults", false, "Truncate At Faults", "", "", "");
|
CAF_PDM_InitField(&m_truncateAtFaults, "TruncateAtFaults", false, "Truncate At Faults", "", "", "");
|
||||||
CAF_PDM_InitField(&m_useFaultThrow, "UseFaultThrow", false, " Use Fault Throw", "", "If Fault Throw is larger than limit, truncate at fault", "");
|
CAF_PDM_InitField(&m_minimumFaultThrow, "FaultThrowValue", 0.0f, " Minimum Fault Throw", "", "If Fault Throw is larger than limit, truncate at fault", "");
|
||||||
CAF_PDM_InitField(&m_maximumFaultThrow, "FaultThrowValue", 0.0f, " Maximum Fault Throw", "", "If Fault Throw is larger than limit, truncate at fault", "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -49,11 +48,11 @@ RimFractureContainment::~RimFractureContainment() {}
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
double RimFractureContainment::maximumFaultThrow() const
|
double RimFractureContainment::minimumFaultThrow() const
|
||||||
{
|
{
|
||||||
if (m_truncateAtFaults() && m_useFaultThrow())
|
if (m_truncateAtFaults())
|
||||||
{
|
{
|
||||||
return m_maximumFaultThrow;
|
return m_minimumFaultThrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1.0;
|
return -1.0;
|
||||||
@ -141,19 +140,9 @@ void RimFractureContainment::defineUiOrdering(QString uiConfigName, caf::PdmUiOr
|
|||||||
m_baseKLayer.uiCapability()->setUiReadOnly(!m_useContainment());
|
m_baseKLayer.uiCapability()->setUiReadOnly(!m_useContainment());
|
||||||
|
|
||||||
uiOrdering.add(&m_truncateAtFaults);
|
uiOrdering.add(&m_truncateAtFaults);
|
||||||
uiOrdering.add(&m_useFaultThrow);
|
uiOrdering.add(&m_minimumFaultThrow);
|
||||||
uiOrdering.add(&m_maximumFaultThrow);
|
|
||||||
|
|
||||||
m_useFaultThrow.uiCapability()->setUiReadOnly(!m_truncateAtFaults());
|
m_minimumFaultThrow.uiCapability()->setUiReadOnly(!m_truncateAtFaults());
|
||||||
|
|
||||||
if (m_truncateAtFaults() && m_useFaultThrow())
|
|
||||||
{
|
|
||||||
m_maximumFaultThrow.uiCapability()->setUiReadOnly(false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_maximumFaultThrow.uiCapability()->setUiReadOnly(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -172,7 +161,7 @@ void RimFractureContainment::fieldChangedByUi(const caf::PdmFieldHandle* changed
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changedField == &m_useFaultThrow || changedField == &m_useContainment || changedField == &m_truncateAtFaults)
|
if (changedField == &m_useContainment || changedField == &m_truncateAtFaults)
|
||||||
{
|
{
|
||||||
RimFractureTemplate* fractureTemplate = nullptr;
|
RimFractureTemplate* fractureTemplate = nullptr;
|
||||||
this->firstAncestorOrThisOfType(fractureTemplate);
|
this->firstAncestorOrThisOfType(fractureTemplate);
|
||||||
|
@ -39,7 +39,7 @@ public:
|
|||||||
void setTopKLayer(int topKLayer);
|
void setTopKLayer(int topKLayer);
|
||||||
void setBaseKLayer(int baseKLayer);
|
void setBaseKLayer(int baseKLayer);
|
||||||
|
|
||||||
double maximumFaultThrow() const; // Negative value means do not test for fault throw
|
double minimumFaultThrow() const; // Negative value means do not test for fault throw
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||||
@ -51,6 +51,5 @@ private:
|
|||||||
caf::PdmField<int> m_baseKLayer;
|
caf::PdmField<int> m_baseKLayer;
|
||||||
|
|
||||||
caf::PdmField<bool> m_truncateAtFaults;
|
caf::PdmField<bool> m_truncateAtFaults;
|
||||||
caf::PdmField<bool> m_useFaultThrow;
|
caf::PdmField<float> m_minimumFaultThrow;
|
||||||
caf::PdmField<float> m_maximumFaultThrow;
|
|
||||||
};
|
};
|
||||||
|
@ -75,12 +75,12 @@ void RimFractureContainmentTools::appendNeighborCellForFace(const std::set<size_
|
|||||||
size_t currentCell,
|
size_t currentCell,
|
||||||
cvf::StructGridInterface::FaceType face,
|
cvf::StructGridInterface::FaceType face,
|
||||||
std::set<size_t>& connectedCells,
|
std::set<size_t>& connectedCells,
|
||||||
double maximumFaultThrow)
|
double minimumFaultThrow)
|
||||||
{
|
{
|
||||||
size_t candidate = findNeighborReservoirCellIndex(mainGrid, face, currentCell);
|
size_t candidate = findNeighborReservoirCellIndex(mainGrid, face, currentCell);
|
||||||
if (candidate != cvf::UNDEFINED_SIZE_T)
|
if (candidate != cvf::UNDEFINED_SIZE_T)
|
||||||
{
|
{
|
||||||
appendNeighborCells(allFracturedCells, mainGrid, candidate, connectedCells, maximumFaultThrow);
|
appendNeighborCells(allFracturedCells, mainGrid, candidate, connectedCells, minimumFaultThrow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,16 +125,11 @@ void RimFractureContainmentTools::checkFaultAndAppendNeighborCell(const std::set
|
|||||||
size_t globalReservoirCellIndex,
|
size_t globalReservoirCellIndex,
|
||||||
cvf::StructGridInterface::FaceType face,
|
cvf::StructGridInterface::FaceType face,
|
||||||
std::set<size_t>& connectedCells,
|
std::set<size_t>& connectedCells,
|
||||||
double maximumFaultThrow)
|
double minimumFaultThrow)
|
||||||
{
|
{
|
||||||
const RigFault* fault = mainGrid->findFaultFromCellIndexAndCellFace(globalReservoirCellIndex, face);
|
const RigFault* fault = mainGrid->findFaultFromCellIndexAndCellFace(globalReservoirCellIndex, face);
|
||||||
if (fault)
|
if (fault)
|
||||||
{
|
{
|
||||||
if (maximumFaultThrow < 0.0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
// See RigMainGrid::calculateFaults() for reference
|
// See RigMainGrid::calculateFaults() for reference
|
||||||
|
|
||||||
@ -155,14 +150,14 @@ void RimFractureContainmentTools::checkFaultAndAppendNeighborCell(const std::set
|
|||||||
mainGrid, neighborGlobalReservoirCellIndex, cvf::StructGridInterface::oppositeFace(face));
|
mainGrid, neighborGlobalReservoirCellIndex, cvf::StructGridInterface::oppositeFace(face));
|
||||||
|
|
||||||
double faultThrow = fabs(currentCellAvgZ - neighborCellAvgZ);
|
double faultThrow = fabs(currentCellAvgZ - neighborCellAvgZ);
|
||||||
if (faultThrow > maximumFaultThrow)
|
if (faultThrow > minimumFaultThrow)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
appendNeighborCellForFace(allFracturedCells, mainGrid, globalReservoirCellIndex, face, connectedCells, maximumFaultThrow);
|
appendNeighborCellForFace(allFracturedCells, mainGrid, globalReservoirCellIndex, face, connectedCells, minimumFaultThrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -172,7 +167,7 @@ void RimFractureContainmentTools::appendNeighborCells(const std::set<size_t>& al
|
|||||||
const RigMainGrid* mainGrid,
|
const RigMainGrid* mainGrid,
|
||||||
size_t currentCell,
|
size_t currentCell,
|
||||||
std::set<size_t>& connectedCells,
|
std::set<size_t>& connectedCells,
|
||||||
double maximumFaultThrow)
|
double minimumFaultThrow)
|
||||||
{
|
{
|
||||||
if (std::find(connectedCells.begin(), connectedCells.end(), currentCell) != connectedCells.end())
|
if (std::find(connectedCells.begin(), connectedCells.end(), currentCell) != connectedCells.end())
|
||||||
{
|
{
|
||||||
@ -190,19 +185,19 @@ void RimFractureContainmentTools::appendNeighborCells(const std::set<size_t>& al
|
|||||||
|
|
||||||
// Check faults in IJ directions
|
// Check faults in IJ directions
|
||||||
checkFaultAndAppendNeighborCell(
|
checkFaultAndAppendNeighborCell(
|
||||||
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::NEG_I, connectedCells, maximumFaultThrow);
|
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::NEG_I, connectedCells, minimumFaultThrow);
|
||||||
checkFaultAndAppendNeighborCell(
|
checkFaultAndAppendNeighborCell(
|
||||||
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::POS_I, connectedCells, maximumFaultThrow);
|
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::POS_I, connectedCells, minimumFaultThrow);
|
||||||
checkFaultAndAppendNeighborCell(
|
checkFaultAndAppendNeighborCell(
|
||||||
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::NEG_J, connectedCells, maximumFaultThrow);
|
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::NEG_J, connectedCells, minimumFaultThrow);
|
||||||
checkFaultAndAppendNeighborCell(
|
checkFaultAndAppendNeighborCell(
|
||||||
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::POS_J, connectedCells, maximumFaultThrow);
|
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::POS_J, connectedCells, minimumFaultThrow);
|
||||||
|
|
||||||
// Append cells without fault check in K direction
|
// Append cells without fault check in K direction
|
||||||
appendNeighborCellForFace(
|
appendNeighborCellForFace(
|
||||||
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::NEG_K, connectedCells, maximumFaultThrow);
|
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::NEG_K, connectedCells, minimumFaultThrow);
|
||||||
appendNeighborCellForFace(
|
appendNeighborCellForFace(
|
||||||
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::POS_K, connectedCells, maximumFaultThrow);
|
allFracturedCells, mainGrid, currentCell, cvf::StructGridInterface::POS_K, connectedCells, minimumFaultThrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -230,7 +225,7 @@ std::set<size_t> RimFractureContainmentTools::fracturedCellsTruncatedByFaults(co
|
|||||||
double maximumFaultThrow = -1.0;
|
double maximumFaultThrow = -1.0;
|
||||||
if (fracture && fracture->fractureTemplate())
|
if (fracture && fracture->fractureTemplate())
|
||||||
{
|
{
|
||||||
maximumFaultThrow = fracture->fractureTemplate()->fractureContainment()->maximumFaultThrow();
|
maximumFaultThrow = fracture->fractureTemplate()->fractureContainment()->minimumFaultThrow();
|
||||||
}
|
}
|
||||||
|
|
||||||
appendNeighborCells(cellsIntersectingFracturePlane,
|
appendNeighborCells(cellsIntersectingFracturePlane,
|
||||||
|
Loading…
Reference in New Issue
Block a user