mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add option to flip node order for both parts
Use data node coordinates to decide element sets
This commit is contained in:
@@ -264,3 +264,12 @@ void RigFaultReactivationModel::postProcessElementSets( const RimEclipseCase* eC
|
||||
m_3dparts[part]->postProcessElementSets( eCase->mainGrid(), cellInfo );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFaultReactivationModel::flipNodeOrder( bool flipFW, bool flipHW )
|
||||
{
|
||||
if ( flipFW ) m_3dparts[GridPart::FW]->flipNodeOrder();
|
||||
if ( flipHW ) m_3dparts[GridPart::HW]->flipNodeOrder();
|
||||
}
|
||||
@@ -87,6 +87,7 @@ public:
|
||||
RimFaultReactivation::GridPart normalPointsAt() const;
|
||||
|
||||
void postProcessElementSets( const RimEclipseCase* eCase );
|
||||
void flipNodeOrder( bool flipFW, bool flipHW );
|
||||
|
||||
private:
|
||||
std::shared_ptr<RigFaultReactivationModelGenerator> m_generator;
|
||||
|
||||
@@ -688,7 +688,7 @@ void RigGriddedPart3d::postProcessElementSets( const RigMainGrid* mainGrid, cons
|
||||
{
|
||||
if ( usedElements.contains( element ) ) continue;
|
||||
|
||||
auto corners = elementCorners( element );
|
||||
auto corners = elementDataCorners( element );
|
||||
bool bActive = false;
|
||||
|
||||
size_t cellIdx = 0;
|
||||
@@ -738,7 +738,7 @@ void RigGriddedPart3d::updateElementSet( ElementSets elSet,
|
||||
break;
|
||||
}
|
||||
|
||||
auto corners = elementCorners( elIdx + t );
|
||||
auto corners = elementDataCorners( elIdx + t );
|
||||
|
||||
size_t cellIdx = 0;
|
||||
for ( const auto& p : corners )
|
||||
@@ -767,3 +767,15 @@ void RigGriddedPart3d::updateElementSet( ElementSets elSet,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigGriddedPart3d::flipNodeOrder()
|
||||
{
|
||||
for ( auto& nodes : m_elementIndices )
|
||||
{
|
||||
std::swap( nodes[1], nodes[3] );
|
||||
std::swap( nodes[5], nodes[7] );
|
||||
}
|
||||
}
|
||||
@@ -61,6 +61,7 @@ public:
|
||||
void setUseLocalCoordinates( bool useLocalCoordinates );
|
||||
|
||||
void postProcessElementSets( const RigMainGrid* mainGrid, const RigActiveCellInfo* cellInfo );
|
||||
void flipNodeOrder();
|
||||
|
||||
bool useLocalCoordinates() const;
|
||||
double topHeight() const;
|
||||
|
||||
Reference in New Issue
Block a user