mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Extend reservoir element set to active cells in under/overburden
Fix fault extension if both sides start or end at same depth
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "RigGriddedPart3d.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimFaultReactivationDataAccess.h"
|
||||
@@ -727,3 +728,54 @@ void RigGriddedPart3d::generateLocalNodes( const cvf::Mat4d transform )
|
||||
m_localNodes.push_back( tn.getTransformedPoint( flipY ) );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Make sure any active cells outside the flat reservoir zone is added to the reservoir element set
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigGriddedPart3d::postProcessElementSets( const RigMainGrid* mainGrid, const RigActiveCellInfo* cellInfo )
|
||||
{
|
||||
std::map<ElementSets, std::vector<unsigned int>> newElementSets;
|
||||
|
||||
for ( auto elSet : { ElementSets::OverBurden, ElementSets::UnderBurden, ElementSets::IntraReservoir } )
|
||||
{
|
||||
newElementSets[elSet] = {};
|
||||
|
||||
for ( auto element : m_elementSets[elSet] )
|
||||
{
|
||||
auto corners = elementCorners( element );
|
||||
int nFound = 0;
|
||||
|
||||
size_t cellIdx = 0;
|
||||
for ( const auto& p : corners )
|
||||
{
|
||||
cellIdx = mainGrid->findReservoirCellIndexFromPoint( p );
|
||||
|
||||
if ( cellIdx != cvf::UNDEFINED_SIZE_T )
|
||||
{
|
||||
if ( cellInfo->isActive( cellIdx ) )
|
||||
{
|
||||
nFound++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( nFound > 0 )
|
||||
{
|
||||
m_elementSets[ElementSets::Reservoir].push_back( element );
|
||||
}
|
||||
else
|
||||
{
|
||||
newElementSets[elSet].push_back( element );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( auto elSet : { ElementSets::OverBurden, ElementSets::UnderBurden, ElementSets::IntraReservoir } )
|
||||
{
|
||||
m_elementSets[elSet].clear();
|
||||
for ( auto element : newElementSets[elSet] )
|
||||
{
|
||||
m_elementSets[elSet].push_back( element );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user