mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
Fault Reactivation: use data nodes when extracting values for INP file.
This commit is contained in:
parent
9b36fe440d
commit
cf453ac4a5
@ -142,7 +142,7 @@ std::vector<double> RimFaultReactivationDataAccess::extractModelData( const RigF
|
||||
|
||||
if ( nodeProperties.contains( property ) )
|
||||
{
|
||||
for ( auto& node : grid->globalNodes() )
|
||||
for ( auto& node : grid->dataNodes() )
|
||||
{
|
||||
double value = accessor->valueAtPosition( node, model, gridPart );
|
||||
values.push_back( value );
|
||||
@ -153,7 +153,7 @@ std::vector<double> RimFaultReactivationDataAccess::extractModelData( const RigF
|
||||
size_t numElements = grid->elementIndices().size();
|
||||
for ( size_t elementIndex = 0; elementIndex < numElements; elementIndex++ )
|
||||
{
|
||||
std::vector<cvf::Vec3d> corners = grid->elementCorners( elementIndex );
|
||||
std::vector<cvf::Vec3d> corners = grid->elementDataCorners( elementIndex );
|
||||
|
||||
// Move top of sea bed element down to end up inside top element
|
||||
bool isTopElement = seabedElements.contains( static_cast<unsigned int>( elementIndex ) );
|
||||
|
@ -608,16 +608,34 @@ const std::vector<std::vector<unsigned int>>& RigGriddedPart3d::elementIndices()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<cvf::Vec3d> RigGriddedPart3d::elementCorners( size_t elementIndex ) const
|
||||
std::vector<cvf::Vec3d> RigGriddedPart3d::elementCorners( size_t elementIndex ) const
|
||||
{
|
||||
if ( elementIndex >= m_elementIndices.size() ) return {};
|
||||
return extractCornersForElement( m_elementIndices, m_nodes, elementIndex );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<cvf::Vec3d> RigGriddedPart3d::elementDataCorners( size_t elementIndex ) const
|
||||
{
|
||||
return extractCornersForElement( m_elementIndices, m_dataNodes, elementIndex );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<cvf::Vec3d> RigGriddedPart3d::extractCornersForElement( const std::vector<std::vector<unsigned int>>& elementIndices,
|
||||
const std::vector<cvf::Vec3d>& nodes,
|
||||
size_t elementIndex )
|
||||
{
|
||||
if ( elementIndex >= elementIndices.size() ) return {};
|
||||
|
||||
std::vector<cvf::Vec3d> corners;
|
||||
|
||||
for ( auto nodeIdx : m_elementIndices[elementIndex] )
|
||||
for ( auto nodeIdx : elementIndices[elementIndex] )
|
||||
{
|
||||
if ( nodeIdx >= m_nodes.size() ) continue;
|
||||
corners.push_back( m_nodes[nodeIdx] );
|
||||
if ( nodeIdx >= nodes.size() ) continue;
|
||||
corners.push_back( nodes[nodeIdx] );
|
||||
}
|
||||
|
||||
return corners;
|
||||
|
@ -73,7 +73,8 @@ public:
|
||||
const std::map<Boundary, std::vector<unsigned int>>& boundaryNodes() const;
|
||||
const std::map<ElementSets, std::vector<unsigned int>>& elementSets() const;
|
||||
const std::vector<int> elementKLayer() const;
|
||||
const std::vector<cvf::Vec3d> elementCorners( size_t elementIndex ) const;
|
||||
std::vector<cvf::Vec3d> elementCorners( size_t elementIndex ) const;
|
||||
std::vector<cvf::Vec3d> elementDataCorners( size_t elementIndex ) const;
|
||||
const std::vector<std::pair<double, double>> layers( ElementSets elementSet ) const;
|
||||
|
||||
protected:
|
||||
@ -95,7 +96,10 @@ private:
|
||||
UpperOverburden
|
||||
};
|
||||
|
||||
static std::vector<Regions> allRegions();
|
||||
static std::vector<Regions> allRegions();
|
||||
static std::vector<cvf::Vec3d> extractCornersForElement( const std::vector<std::vector<unsigned int>>& elementIndices,
|
||||
const std::vector<cvf::Vec3d>& nodes,
|
||||
size_t elementIndex );
|
||||
|
||||
private:
|
||||
bool m_useLocalCoordinates;
|
||||
|
Loading…
Reference in New Issue
Block a user