mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactor code
Make use of calculateCurrentTotalCellVisibility for eclipse view to get surface vertices. Prevent usage of individual grid part managers in gRPC-service.
This commit is contained in:
@@ -203,33 +203,6 @@ void RivGridPartMgr::appendPartsToModel( cvf::ModelBasicList* model )
|
||||
if ( m_surfaceGridLines.notNull() ) model->addPart( m_surfaceGridLines.p() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Returns the surface vertices of the grid part
|
||||
///
|
||||
/// Creates vertices if they do not exist
|
||||
/// Used for gRPC service GridGeometryExtraction
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3fArray* RivGridPartMgr::getOrCreateSurfaceVertices()
|
||||
{
|
||||
return m_surfaceGenerator.getOrCreateVertices();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Get map from quad index to cell index
|
||||
///
|
||||
/// Used for gRPC service GridGeometryExtraction
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<size_t> RivGridPartMgr::getSurfaceQuadToCellIndicesArray()
|
||||
{
|
||||
auto* gridQuadToCellFaceMapper = m_surfaceGenerator.quadToCellFaceMapper();
|
||||
if ( gridQuadToCellFaceMapper == nullptr )
|
||||
{
|
||||
return std::vector<size_t>();
|
||||
}
|
||||
|
||||
return gridQuadToCellFaceMapper->quadToCellIndicesArray();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -71,9 +71,6 @@ public:
|
||||
|
||||
void appendPartsToModel( cvf::ModelBasicList* model );
|
||||
|
||||
cvf::Vec3fArray* getOrCreateSurfaceVertices();
|
||||
std::vector<size_t> getSurfaceQuadToCellIndicesArray();
|
||||
|
||||
private:
|
||||
void generatePartGeometry( cvf::StructGridGeometryGenerator& geoBuilder );
|
||||
|
||||
|
||||
@@ -179,22 +179,6 @@ void RivReservoirPartMgr::appendElementVectorResultPartsToModel( cvf::ModelBasic
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Get the part manager for main grid
|
||||
///
|
||||
/// Needed for the gRPC service for GridGeometryExtraction
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivGridPartMgr* RivReservoirPartMgr::mainGridPartManager()
|
||||
{
|
||||
if ( m_allGrids.empty() )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// First grid should be the main grid
|
||||
return m_allGrids.at( 0 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -76,8 +76,6 @@ public:
|
||||
// Element Vector Result
|
||||
void appendElementVectorResultPartsToModel( cvf::ModelBasicList* model, size_t timeStepIndex );
|
||||
|
||||
RivGridPartMgr* mainGridPartManager();
|
||||
|
||||
private:
|
||||
cvf::Collection<RivGridPartMgr> m_allGrids; // Main grid and all LGR's
|
||||
cvf::ref<RivElementVectorResultPartMgr> m_elementVectorResultMgr;
|
||||
|
||||
@@ -910,14 +910,6 @@ void RivReservoirViewPartMgr::computePropertyVisibility( cvf::UByteArray*
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Needed for the gRPC service for GridGeometryExtraction
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivReservoirPartMgr* RivReservoirViewPartMgr::rangeFilteredReservoirPartManager( size_t timeStepIndex )
|
||||
{
|
||||
return reservoirPartManager( RivCellSetEnum::RANGE_FILTERED, timeStepIndex );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -97,8 +97,6 @@ public:
|
||||
const cvf::UByteArray* rangeFilterVisibility,
|
||||
RimEclipsePropertyFilterCollection* propFilterColl );
|
||||
|
||||
RivReservoirPartMgr* rangeFilteredReservoirPartManager( size_t timeStepIndex );
|
||||
|
||||
private:
|
||||
void createGeometry( RivCellSetEnum geometryType );
|
||||
void computeVisibility( cvf::UByteArray* cellVisibility, RivCellSetEnum geometryType, RigGridBase* grid, size_t gridIdx );
|
||||
|
||||
Reference in New Issue
Block a user