mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Update grid part naming (#10879)
* Rename parts * Make sure well extraction goes along model, not fault * Match part naming with parts
This commit is contained in:
@@ -49,7 +49,7 @@ RigFaultReactivationModel::RigFaultReactivationModel()
|
||||
|
||||
for ( auto part : allGridParts() )
|
||||
{
|
||||
m_3dparts[part] = std::make_shared<RigGriddedPart3d>();
|
||||
m_3dparts[part] = new RigGriddedPart3d();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,11 @@ RigFaultReactivationModel::RigFaultReactivationModel()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFaultReactivationModel::~RigFaultReactivationModel()
|
||||
{
|
||||
for ( auto part : allGridParts() )
|
||||
{
|
||||
if ( m_3dparts[part] != nullptr ) delete m_3dparts[part];
|
||||
m_3dparts[part] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -65,7 +70,7 @@ RigFaultReactivationModel::~RigFaultReactivationModel()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimFaultReactivation::GridPart> RigFaultReactivationModel::allGridParts() const
|
||||
{
|
||||
return { GridPart::PART1, GridPart::PART2 };
|
||||
return { GridPart::FW, GridPart::HW };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -139,7 +144,17 @@ std::pair<cvf::Vec3d, cvf::Vec3d> RigFaultReactivationModel::modelLocalNormalsXY
|
||||
void RigFaultReactivationModel::updateGeometry( size_t startCell, cvf::StructGridInterface::FaceType startFace )
|
||||
{
|
||||
reset();
|
||||
m_generator->generateGeometry( startCell, startFace, m_3dparts[GridPart::PART1].get(), m_3dparts[GridPart::PART2].get() );
|
||||
|
||||
auto frontPart = m_3dparts[GridPart::FW];
|
||||
auto backPart = m_3dparts[GridPart::HW];
|
||||
|
||||
m_generator->generateGeometry( startCell, startFace, frontPart, backPart );
|
||||
|
||||
if ( backPart->topHeight() > frontPart->topHeight() )
|
||||
{
|
||||
m_3dparts[GridPart::HW] = frontPart;
|
||||
m_3dparts[GridPart::FW] = backPart;
|
||||
}
|
||||
|
||||
auto& frontPoints = m_generator->frontPoints();
|
||||
auto& backPoints = m_generator->backPoints();
|
||||
@@ -191,7 +206,7 @@ const std::vector<std::vector<cvf::Vec3d>>& RigFaultReactivationModel::meshLines
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::shared_ptr<RigGriddedPart3d> RigFaultReactivationModel::grid( RimFaultReactivation::GridPart part ) const
|
||||
const RigGriddedPart3d* RigFaultReactivationModel::grid( RimFaultReactivation::GridPart part ) const
|
||||
{
|
||||
return m_3dparts.at( part );
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
|
||||
const std::vector<std::vector<cvf::Vec3d>>& meshLines( GridPart part ) const;
|
||||
|
||||
std::shared_ptr<RigGriddedPart3d> grid( GridPart part ) const;
|
||||
const RigGriddedPart3d* grid( GridPart part ) const;
|
||||
|
||||
const cvf::Vec3d faultNormal() const;
|
||||
const std::pair<cvf::Vec3d, cvf::Vec3d> faultTopBottom() const;
|
||||
@@ -93,5 +93,5 @@ private:
|
||||
|
||||
bool m_isValid;
|
||||
|
||||
std::map<GridPart, std::shared_ptr<RigGriddedPart3d>> m_3dparts;
|
||||
std::map<GridPart, RigGriddedPart3d*> m_3dparts;
|
||||
};
|
||||
|
||||
@@ -477,14 +477,16 @@ void RigFaultReactivationModelGenerator::generateGeometry( size_t
|
||||
m_maxCellHeight,
|
||||
m_cellSizeHeightFactor,
|
||||
m_horizontalPartition,
|
||||
m_modelThickness );
|
||||
m_modelThickness,
|
||||
m_topReservoirFront.z() );
|
||||
backPart->generateGeometry( m_backPoints,
|
||||
backReservoirLayers,
|
||||
kLayersBack,
|
||||
m_maxCellHeight,
|
||||
m_cellSizeHeightFactor,
|
||||
m_horizontalPartition,
|
||||
m_modelThickness );
|
||||
m_modelThickness,
|
||||
m_topReservoirBack.z() );
|
||||
|
||||
frontPart->generateLocalNodes( m_localCoordTransform );
|
||||
backPart->generateLocalNodes( m_localCoordTransform );
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGriddedPart3d::RigGriddedPart3d()
|
||||
: m_useLocalCoordinates( false )
|
||||
, m_topHeight( 0.0 )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -193,10 +194,13 @@ void RigGriddedPart3d::generateGeometry( const std::array<cvf::Vec3d, 12>& input
|
||||
const double maxCellHeight,
|
||||
double cellSizeFactor,
|
||||
const std::vector<double>& horizontalPartition,
|
||||
double modelThickness )
|
||||
double modelThickness,
|
||||
double topHeight )
|
||||
{
|
||||
reset();
|
||||
|
||||
m_topHeight = topHeight;
|
||||
|
||||
std::map<Regions, std::vector<double>> layersPerRegion;
|
||||
|
||||
layersPerRegion[Regions::LowerUnderburden] = generateGrowingLayers( inputPoints[1].z(), inputPoints[0].z(), maxCellHeight, cellSizeFactor );
|
||||
@@ -481,6 +485,14 @@ bool RigGriddedPart3d::useLocalCoordinates() const
|
||||
return m_useLocalCoordinates;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigGriddedPart3d::topHeight() const
|
||||
{
|
||||
return m_topHeight;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Output elements will be of type HEX8
|
||||
///
|
||||
|
||||
@@ -49,14 +49,17 @@ public:
|
||||
double maxCellHeight,
|
||||
double cellSizeFactor,
|
||||
const std::vector<double>& horizontalPartition,
|
||||
double modelThickness );
|
||||
double modelThickness,
|
||||
double topHeight );
|
||||
|
||||
void generateLocalNodes( const cvf::Mat4d transform );
|
||||
void setUseLocalCoordinates( bool useLocalCoordinates );
|
||||
|
||||
bool useLocalCoordinates() const;
|
||||
double topHeight() const;
|
||||
|
||||
const std::vector<cvf::Vec3d>& nodes() const;
|
||||
const std::vector<cvf::Vec3d>& globalNodes() const;
|
||||
void setUseLocalCoordinates( bool useLocalCoordinates );
|
||||
bool useLocalCoordinates() const;
|
||||
|
||||
const std::vector<std::vector<unsigned int>>& elementIndices() const;
|
||||
const std::map<RimFaultReactivation::BorderSurface, std::vector<unsigned int>>& borderSurfaceElements() const;
|
||||
@@ -91,6 +94,8 @@ private:
|
||||
private:
|
||||
bool m_useLocalCoordinates;
|
||||
|
||||
double m_topHeight;
|
||||
|
||||
std::vector<cvf::Vec3d> m_nodes;
|
||||
std::vector<cvf::Vec3d> m_localNodes;
|
||||
std::vector<std::vector<unsigned int>> m_elementIndices;
|
||||
|
||||
Reference in New Issue
Block a user