mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fault reactivation: Add dataNodes to be used for data extraction (#10961)
* Add dataNodes to be used for data extraction
This commit is contained in:
parent
f767efd0c5
commit
595766ade0
@ -35,6 +35,7 @@
|
|||||||
RigGriddedPart3d::RigGriddedPart3d()
|
RigGriddedPart3d::RigGriddedPart3d()
|
||||||
: m_useLocalCoordinates( false )
|
: m_useLocalCoordinates( false )
|
||||||
, m_topHeight( 0.0 )
|
, m_topHeight( 0.0 )
|
||||||
|
, m_faultSafetyDistance( 1.0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,6 +55,7 @@ void RigGriddedPart3d::reset()
|
|||||||
m_boundaryNodes.clear();
|
m_boundaryNodes.clear();
|
||||||
m_borderSurfaceElements.clear();
|
m_borderSurfaceElements.clear();
|
||||||
m_nodes.clear();
|
m_nodes.clear();
|
||||||
|
m_dataNodes.clear();
|
||||||
m_localNodes.clear();
|
m_localNodes.clear();
|
||||||
m_elementIndices.clear();
|
m_elementIndices.clear();
|
||||||
m_meshLines.clear();
|
m_meshLines.clear();
|
||||||
@ -268,7 +270,9 @@ void RigGriddedPart3d::generateGeometry( const std::array<cvf::Vec3d, 12>& input
|
|||||||
tVec.normalize();
|
tVec.normalize();
|
||||||
tVec *= modelThickness;
|
tVec *= modelThickness;
|
||||||
|
|
||||||
m_nodes.reserve( ( nVertCells + 1 ) * ( nHorzCells + 1 ) * ( nThicknessCells + 1 ) );
|
size_t reserveSize = ( nVertCells + 1 ) * ( nHorzCells + 1 ) * ( nThicknessCells + 1 );
|
||||||
|
m_nodes.reserve( reserveSize );
|
||||||
|
m_dataNodes.reserve( reserveSize );
|
||||||
|
|
||||||
unsigned int nodeIndex = 0;
|
unsigned int nodeIndex = 0;
|
||||||
unsigned int layer = 0;
|
unsigned int layer = 0;
|
||||||
@ -331,6 +335,9 @@ void RigGriddedPart3d::generateGeometry( const std::array<cvf::Vec3d, 12>& input
|
|||||||
|
|
||||||
cvf::Vec3d stepHorz = toPos - fromPos;
|
cvf::Vec3d stepHorz = toPos - fromPos;
|
||||||
cvf::Vec3d p;
|
cvf::Vec3d p;
|
||||||
|
cvf::Vec3d safetyOffset = fromPos - toPos;
|
||||||
|
safetyOffset.normalize();
|
||||||
|
safetyOffset *= m_faultSafetyDistance;
|
||||||
|
|
||||||
m_meshLines.push_back( { fromPos, toPos } );
|
m_meshLines.push_back( { fromPos, toPos } );
|
||||||
|
|
||||||
@ -341,6 +348,16 @@ void RigGriddedPart3d::generateGeometry( const std::array<cvf::Vec3d, 12>& input
|
|||||||
for ( int t = 0; t <= nThicknessCells; t++, nodeIndex++ )
|
for ( int t = 0; t <= nThicknessCells; t++, nodeIndex++ )
|
||||||
{
|
{
|
||||||
m_nodes.push_back( p + m_thicknessFactors[t] * tVec );
|
m_nodes.push_back( p + m_thicknessFactors[t] * tVec );
|
||||||
|
|
||||||
|
if ( h == (int)nHorzCells )
|
||||||
|
{
|
||||||
|
m_dataNodes.push_back( p + safetyOffset );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_dataNodes.push_back( p );
|
||||||
|
}
|
||||||
|
|
||||||
if ( layer == 0 )
|
if ( layer == 0 )
|
||||||
{
|
{
|
||||||
m_boundaryNodes[Boundary::Bottom].push_back( nodeIndex );
|
m_boundaryNodes[Boundary::Bottom].push_back( nodeIndex );
|
||||||
@ -520,6 +537,16 @@ const std::vector<cvf::Vec3d>& RigGriddedPart3d::globalNodes() const
|
|||||||
return m_nodes;
|
return m_nodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
/// Returns nodes in global coordinates, adjusted to always extract data as if the model has no
|
||||||
|
/// thickness. Additionally, nodes closest to the fault are moved away from the fault
|
||||||
|
/// to make sure data results come from the correct side of the fault.
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
const std::vector<cvf::Vec3d>& RigGriddedPart3d::dataNodes() const
|
||||||
|
{
|
||||||
|
return m_dataNodes;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -544,6 +571,22 @@ double RigGriddedPart3d::topHeight() const
|
|||||||
return m_topHeight;
|
return m_topHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RigGriddedPart3d::setFaultSafetyDistance( double distance )
|
||||||
|
{
|
||||||
|
m_faultSafetyDistance = distance;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
double RigGriddedPart3d::faultSafetyDistance() const
|
||||||
|
{
|
||||||
|
return m_faultSafetyDistance;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// Output elements will be of type HEX8
|
/// Output elements will be of type HEX8
|
||||||
///
|
///
|
||||||
|
@ -58,8 +58,12 @@ public:
|
|||||||
bool useLocalCoordinates() const;
|
bool useLocalCoordinates() const;
|
||||||
double topHeight() const;
|
double topHeight() const;
|
||||||
|
|
||||||
|
void setFaultSafetyDistance( double distance );
|
||||||
|
double faultSafetyDistance() const;
|
||||||
|
|
||||||
const std::vector<cvf::Vec3d>& nodes() const;
|
const std::vector<cvf::Vec3d>& nodes() const;
|
||||||
const std::vector<cvf::Vec3d>& globalNodes() const;
|
const std::vector<cvf::Vec3d>& globalNodes() const;
|
||||||
|
const std::vector<cvf::Vec3d>& dataNodes() const;
|
||||||
|
|
||||||
const std::vector<std::vector<unsigned int>>& elementIndices() const;
|
const std::vector<std::vector<unsigned int>>& elementIndices() const;
|
||||||
const std::map<RimFaultReactivation::BorderSurface, std::vector<unsigned int>>& borderSurfaceElements() const;
|
const std::map<RimFaultReactivation::BorderSurface, std::vector<unsigned int>>& borderSurfaceElements() const;
|
||||||
@ -97,8 +101,10 @@ private:
|
|||||||
bool m_useLocalCoordinates;
|
bool m_useLocalCoordinates;
|
||||||
|
|
||||||
double m_topHeight;
|
double m_topHeight;
|
||||||
|
double m_faultSafetyDistance;
|
||||||
|
|
||||||
std::vector<cvf::Vec3d> m_nodes;
|
std::vector<cvf::Vec3d> m_nodes;
|
||||||
|
std::vector<cvf::Vec3d> m_dataNodes;
|
||||||
std::vector<cvf::Vec3d> m_localNodes;
|
std::vector<cvf::Vec3d> m_localNodes;
|
||||||
std::vector<std::vector<unsigned int>> m_elementIndices;
|
std::vector<std::vector<unsigned int>> m_elementIndices;
|
||||||
std::vector<int> m_elementKLayer;
|
std::vector<int> m_elementKLayer;
|
||||||
|
Loading…
Reference in New Issue
Block a user