mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 22:50:25 -05:00
NNC: Remove RigConnectionContainer, use std::vector<RigConnection> directly
RigConnectionContainer was a thin wrapper around std::vector<RigConnection> with no added value beyond push_back/reserve/remove_duplicates. Replace it everywhere with std::vector<RigConnection> and inline the remaining container-merge and deduplication logic at their single call sites.
This commit is contained in:
1 parent
fc829069e8
commit
c8ad00a904
19 files changed
+76
-175
No files matched your search
@@ -736,8 +736,8 @@ void RifReaderEclipseOutput::transferStaticNNCData( const ecl_grid_type* mainEcl
|
||||
if ( numNNC > 0 )
|
||||
{
|
||||
// Transform to our own data structures
|
||||
RigConnectionContainer nncConnections;
|
||||
std::vector<double> transmissibilityValuesTemp;
|
||||
std::vector<RigConnection> nncConnections;
|
||||
std::vector<double> transmissibilityValuesTemp;
|
||||
|
||||
const double* transValues = ecl_nnc_data_get_values( tran_data );
|
||||
|
||||
|
||||
@@ -442,8 +442,8 @@ void RifReaderOpmCommon::transferStaticNNCData( Opm::EclIO::EGrid& opmMainGrid,
|
||||
if ( !connections.empty() )
|
||||
{
|
||||
// Transform to our own data structures
|
||||
RigConnectionContainer nncConnections;
|
||||
std::vector<double> transmissibilityValues;
|
||||
std::vector<RigConnection> nncConnections;
|
||||
std::vector<double> transmissibilityValues;
|
||||
|
||||
for ( auto& c : connections )
|
||||
{
|
||||
|
||||
@@ -129,7 +129,7 @@ cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::createOutlineMeshDrawable(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RivFaultGeometryGenerator::hasConnection( size_t cellIdx,
|
||||
cvf::StructGridInterface::FaceType face,
|
||||
const RigConnectionContainer& conns,
|
||||
const std::vector<RigConnection>& conns,
|
||||
const std::vector<size_t>& nncConnectionIndices )
|
||||
{
|
||||
cvf::StructGridInterface::FaceType oppositeFace = cvf::StructGridInterface::oppositeFace( face );
|
||||
|
||||
@@ -33,7 +33,7 @@ class Part;
|
||||
} // namespace cvf
|
||||
|
||||
class RigNNCData;
|
||||
class RigConnectionContainer;
|
||||
class RigConnection;
|
||||
class RigFault;
|
||||
|
||||
//==================================================================================================
|
||||
@@ -64,7 +64,7 @@ private:
|
||||
|
||||
bool hasConnection( size_t cellIdx,
|
||||
cvf::StructGridInterface::FaceType face,
|
||||
const RigConnectionContainer& conns,
|
||||
const std::vector<RigConnection>& conns,
|
||||
const std::vector<size_t>& nncConnectionIndices );
|
||||
|
||||
private:
|
||||
|
||||
@@ -88,7 +88,7 @@ void RigAllanUtil::computeAllanResults( RigCaseCellResultsData* cellResultsData,
|
||||
formationCount = cellResultsData->activeFormationNames()->formationNames().size();
|
||||
}
|
||||
|
||||
const RigConnectionContainer& nncConnections = mainGrid->nncData()->allConnections();
|
||||
const std::vector<RigConnection>& nncConnections = mainGrid->nncData()->allConnections();
|
||||
|
||||
std::map<std::pair<int, int>, int> formationCombinationToCategory;
|
||||
for ( size_t i = 0; i < nncConnections.size(); i++ )
|
||||
|
||||
@@ -2529,7 +2529,7 @@ void RigCaseCellResultsData::computeNncCombRiTrans()
|
||||
bool isFaceNormalsOutwards = m_ownerMainGrid->isFaceNormalsOutwards();
|
||||
|
||||
// NNC calculation
|
||||
const RigConnectionContainer& nncConnections = m_ownerMainGrid->nncData()->allConnections();
|
||||
const std::vector<RigConnection>& nncConnections = m_ownerMainGrid->nncData()->allConnections();
|
||||
for ( size_t connIdx = 0; connIdx < nncConnections.size(); connIdx++ )
|
||||
{
|
||||
size_t nativeResvCellIndex = nncConnections[connIdx].c1GlobIdx();
|
||||
@@ -2882,7 +2882,7 @@ void RigCaseCellResultsData::computeNncCombRiTRANSbyArea()
|
||||
|
||||
if ( transResults->size() != riAreaNormTransResults.size() ) return;
|
||||
|
||||
const RigConnectionContainer& connections = m_ownerMainGrid->nncData()->allConnections();
|
||||
const std::vector<RigConnection>& connections = m_ownerMainGrid->nncData()->allConnections();
|
||||
|
||||
for ( size_t nncConIdx = 0; nncConIdx < riAreaNormTransResults.size(); ++nncConIdx )
|
||||
{
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "cafAssert.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -113,21 +115,24 @@ cvf::StructGridInterface::FaceType RigCellFaceGeometryTools::calculateCellFaceOv
|
||||
return cvf::StructGridInterface::NO_FACE;
|
||||
}
|
||||
|
||||
void assignThreadConnections( RigConnectionContainer& allConnections, RigConnectionContainer& threadConnections )
|
||||
void assignThreadConnections( std::vector<RigConnection>& allConnections, std::vector<RigConnection>& threadConnections )
|
||||
{
|
||||
#pragma omp critical( critical_section_RigCellFaceGeometryTools_assignThreadConnections )
|
||||
{
|
||||
allConnections.push_back( std::move( threadConnections ) );
|
||||
allConnections.insert( allConnections.end(),
|
||||
std::make_move_iterator( threadConnections.begin() ),
|
||||
std::make_move_iterator( threadConnections.end() ) );
|
||||
threadConnections.clear();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMainGrid* mainGrid,
|
||||
const RigConnectionContainer& nativeConnections,
|
||||
const RigActiveCellInfo* activeCellInfo,
|
||||
bool includeInactiveCells )
|
||||
std::vector<RigConnection> RigCellFaceGeometryTools::computeOtherNncs( const RigMainGrid* mainGrid,
|
||||
const std::vector<RigConnection>& nativeConnections,
|
||||
const RigActiveCellInfo* activeCellInfo,
|
||||
bool includeInactiveCells )
|
||||
{
|
||||
// Compute Non-Neighbor Connections (NNC) not reported by Eclipse. NNCs with zero transmissibility are not reported
|
||||
// by Eclipse. Use faults as basis for subset of cells to find NNC connection for. The imported connections from
|
||||
@@ -151,7 +156,7 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain
|
||||
|
||||
const cvf::Collection<RigFault>& faults = mainGrid->faults();
|
||||
|
||||
RigConnectionContainer otherConnections;
|
||||
std::vector<RigConnection> otherConnections;
|
||||
|
||||
for ( int faultIdx = 0; faultIdx < (int)faults.size(); faultIdx++ )
|
||||
{
|
||||
@@ -179,7 +184,7 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain
|
||||
|
||||
#pragma omp parallel
|
||||
{
|
||||
RigConnectionContainer threadConnections;
|
||||
std::vector<RigConnection> threadConnections;
|
||||
#pragma omp for schedule( guided )
|
||||
for ( int activeFaceIdx = 0; activeFaceIdx < static_cast<int>( activeFaceIndices.size() ); activeFaceIdx++ )
|
||||
{
|
||||
@@ -202,7 +207,9 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain
|
||||
RiaLogging::warning( txt.toStdString(), "RigCellFaceGeometryTools" );
|
||||
}
|
||||
|
||||
otherConnections.remove_duplicates();
|
||||
std::sort( otherConnections.begin(), otherConnections.end() );
|
||||
otherConnections.erase( std::unique( otherConnections.begin(), otherConnections.end() ), otherConnections.end() );
|
||||
|
||||
return otherConnections;
|
||||
}
|
||||
|
||||
@@ -212,7 +219,7 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain
|
||||
void RigCellFaceGeometryTools::extractConnectionsForFace( const RigFault::FaultFace& face,
|
||||
const RigMainGrid* mainGrid,
|
||||
const std::set<std::pair<unsigned, unsigned>>& nativeCellPairs,
|
||||
RigConnectionContainer& connections )
|
||||
std::vector<RigConnection>& connections )
|
||||
{
|
||||
size_t sourceReservoirCellIndex = face.m_nativeReservoirCellIndex;
|
||||
cvf::StructGridInterface::FaceType sourceCellFace = face.m_nativeFace;
|
||||
|
||||
@@ -45,15 +45,15 @@ public:
|
||||
std::vector<size_t>* connectionPolygon,
|
||||
std::vector<cvf::Vec3d>* connectionIntersections );
|
||||
|
||||
static RigConnectionContainer computeOtherNncs( const RigMainGrid* mainGrid,
|
||||
const RigConnectionContainer& nativeConnections,
|
||||
const RigActiveCellInfo* activeCellInfo,
|
||||
bool includeInactiveCells );
|
||||
static std::vector<RigConnection> computeOtherNncs( const RigMainGrid* mainGrid,
|
||||
const std::vector<RigConnection>& nativeConnections,
|
||||
const RigActiveCellInfo* activeCellInfo,
|
||||
bool includeInactiveCells );
|
||||
|
||||
static void extractConnectionsForFace( const RigFault::FaultFace& face,
|
||||
const RigMainGrid* mainGrid,
|
||||
const std::set<std::pair<unsigned, unsigned>>& nativeCellPairs,
|
||||
RigConnectionContainer& connections );
|
||||
std::vector<RigConnection>& connections );
|
||||
static std::vector<cvf::Vec3f> extractPolygon( const std::vector<cvf::Vec3d>& nativeNodes,
|
||||
const std::vector<size_t>& connectionPolygon,
|
||||
const std::vector<cvf::Vec3d>& connectionIntersections );
|
||||
|
||||
@@ -704,7 +704,7 @@ void RigMainGrid::distributeNNCsToFaults()
|
||||
{
|
||||
if ( m_faultsPrCellAcc.isNull() ) return;
|
||||
|
||||
const RigConnectionContainer& nncs = nncData()->allConnections();
|
||||
const std::vector<RigConnection>& nncs = nncData()->allConnections();
|
||||
for ( size_t nncIdx = 0; nncIdx < nncs.size(); ++nncIdx )
|
||||
{
|
||||
// Find the fault for each side of the nnc
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <iterator>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -95,12 +97,14 @@ void RigNNCData::buildPolygonsForEclipseConnections()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigNNCData::computeAdditionalNncs( const RigMainGrid* mainGrid, const RigActiveCellInfo* activeCellInfo, bool includeInactiveCells )
|
||||
{
|
||||
RigConnectionContainer otherConnections =
|
||||
std::vector<RigConnection> otherConnections =
|
||||
RigCellFaceGeometryTools::computeOtherNncs( mainGrid, m_connections, activeCellInfo, includeInactiveCells );
|
||||
|
||||
if ( !otherConnections.empty() )
|
||||
{
|
||||
m_connections.push_back( otherConnections );
|
||||
m_connections.insert( m_connections.end(),
|
||||
std::make_move_iterator( otherConnections.begin() ),
|
||||
std::make_move_iterator( otherConnections.end() ) );
|
||||
|
||||
// Transmissibility values from Eclipse has been read into propertyNameCombTrans in
|
||||
// RifReaderEclipseOutput::transferStaticNNCData(). Initialize computed NNCs with zero transmissibility
|
||||
@@ -241,7 +245,7 @@ bool RigNNCData::ensureAllConnectionDataIsProcessed()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigNNCData::setEclipseConnections( RigConnectionContainer& eclipseConnections )
|
||||
void RigNNCData::setEclipseConnections( std::vector<RigConnection>& eclipseConnections )
|
||||
{
|
||||
m_connections = eclipseConnections;
|
||||
m_eclipseConnectionCount = m_connections.size();
|
||||
@@ -260,7 +264,7 @@ size_t RigNNCData::eclipseConnectionCount() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigConnectionContainer& RigNNCData::availableConnections() const
|
||||
const std::vector<RigConnection>& RigNNCData::availableConnections() const
|
||||
{
|
||||
// Return connections without calling ensureConnectionDataIsProcessed() to avoid potential heavy computations
|
||||
// Relevant if only native connection data is required
|
||||
@@ -273,7 +277,7 @@ const RigConnectionContainer& RigNNCData::availableConnections() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigConnectionContainer& RigNNCData::allConnections()
|
||||
std::vector<RigConnection>& RigNNCData::allConnections()
|
||||
{
|
||||
ensureAllConnectionDataIsProcessed();
|
||||
|
||||
|
||||
@@ -52,13 +52,13 @@ public:
|
||||
|
||||
void setSourceDataForProcessing( RigMainGrid* mainGrid, const RigActiveCellInfo* activeCellInfo, bool includeInactiveCells );
|
||||
|
||||
void setEclipseConnections( RigConnectionContainer& eclipseConnections );
|
||||
void buildPolygonsForEclipseConnections();
|
||||
size_t eclipseConnectionCount() const;
|
||||
const RigConnectionContainer& availableConnections() const;
|
||||
void setEclipseConnections( std::vector<RigConnection>& eclipseConnections );
|
||||
void buildPolygonsForEclipseConnections();
|
||||
size_t eclipseConnectionCount() const;
|
||||
const std::vector<RigConnection>& availableConnections() const;
|
||||
|
||||
bool ensureAllConnectionDataIsProcessed();
|
||||
RigConnectionContainer& allConnections();
|
||||
bool ensureAllConnectionDataIsProcessed();
|
||||
std::vector<RigConnection>& allConnections();
|
||||
|
||||
std::vector<double>& makeStaticConnectionScalarResult( QString nncDataType );
|
||||
const std::vector<double>* staticConnectionScalarResult( const RigEclipseResultAddress& resVarAddr ) const;
|
||||
@@ -98,7 +98,7 @@ private:
|
||||
size_t connectionsWithNoCommonArea( QStringList& connectionTextFirstItems, size_t maxItemCount );
|
||||
|
||||
private:
|
||||
RigConnectionContainer m_connections;
|
||||
std::vector<RigConnection> m_connections;
|
||||
size_t m_eclipseConnectionCount;
|
||||
std::map<QString, std::vector<std::vector<double>>> m_connectionResults;
|
||||
std::map<RigEclipseResultAddress, QString> m_resultAddrToNNCDataType;
|
||||
|
||||
@@ -465,7 +465,7 @@ void RigNestedHybridGridReconstructor::repointNncConnections( RigEclipseCaseData
|
||||
|
||||
auto mapped = [&]( size_t idx ) { return ( idx < origCellCount && flatToLgr[idx] != cvf::UNDEFINED_SIZE_T ) ? flatToLgr[idx] : idx; };
|
||||
|
||||
RigConnectionContainer& connections = nncData->allConnections();
|
||||
std::vector<RigConnection>& connections = nncData->allConnections();
|
||||
for ( size_t i = 0; i < connections.size(); i++ )
|
||||
{
|
||||
RigConnection& conn = connections[i];
|
||||
|
||||
@@ -106,98 +106,3 @@ bool RigConnection::operator<( const RigConnection& other ) const
|
||||
|
||||
return ( m_c2GlobIdx < other.m_c2GlobIdx );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigConnection& RigConnectionContainer::operator[]( size_t i ) const
|
||||
{
|
||||
return m_connections[i];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigConnection& RigConnectionContainer::operator[]( size_t i )
|
||||
{
|
||||
return m_connections[i];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigConnectionContainer::push_back( const RigConnection& connection )
|
||||
{
|
||||
m_connections.push_back( connection );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigConnectionContainer::push_back( RigConnection&& connection )
|
||||
{
|
||||
m_connections.push_back( std::move( connection ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigConnectionContainer::push_back( const RigConnectionContainer& other )
|
||||
{
|
||||
m_connections.insert( m_connections.end(), other.m_connections.begin(), other.m_connections.end() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigConnectionContainer::push_back( RigConnectionContainer&& other )
|
||||
{
|
||||
m_connections.insert( m_connections.end(),
|
||||
std::make_move_iterator( other.m_connections.begin() ),
|
||||
std::make_move_iterator( other.m_connections.end() ) );
|
||||
other.m_connections.clear();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigConnectionContainer::size() const
|
||||
{
|
||||
return m_connections.size();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigConnectionContainer::clear()
|
||||
{
|
||||
m_connections.clear();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigConnectionContainer::empty() const
|
||||
{
|
||||
return m_connections.empty();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigConnectionContainer::remove_duplicates()
|
||||
{
|
||||
std::sort( m_connections.begin(), m_connections.end() );
|
||||
m_connections.erase( std::unique( m_connections.begin(), m_connections.end() ), m_connections.end() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigConnectionContainer::reserve( size_t requiredSize )
|
||||
{
|
||||
if ( m_connections.capacity() < requiredSize )
|
||||
{
|
||||
m_connections.reserve( requiredSize );
|
||||
}
|
||||
}
|
||||
@@ -58,25 +58,3 @@ private:
|
||||
unsigned char m_c1Face;
|
||||
std::vector<cvf::Vec3f> m_polygon;
|
||||
};
|
||||
|
||||
class RigConnectionContainer
|
||||
{
|
||||
public:
|
||||
RigConnectionContainer() = default;
|
||||
|
||||
const RigConnection& operator[]( size_t i ) const;
|
||||
RigConnection& operator[]( size_t i );
|
||||
|
||||
void push_back( const RigConnection& connection );
|
||||
void push_back( RigConnection&& connection );
|
||||
void push_back( const RigConnectionContainer& connection );
|
||||
void push_back( RigConnectionContainer&& connection );
|
||||
size_t size() const;
|
||||
void clear();
|
||||
bool empty() const;
|
||||
void remove_duplicates();
|
||||
void reserve( size_t requiredSize );
|
||||
|
||||
private:
|
||||
std::vector<RigConnection> m_connections;
|
||||
};
|
||||
@@ -100,8 +100,8 @@ RigNumberOfFloodedPoreVolumesCalculator::RigNumberOfFloodedPoreVolumesCalculator
|
||||
std::vector<const std::vector<double>*> flowrateJatAllTimeSteps;
|
||||
std::vector<const std::vector<double>*> flowrateKatAllTimeSteps;
|
||||
|
||||
RigNNCData* nncData = eclipseCaseData->mainGrid()->nncData();
|
||||
const RigConnectionContainer connections = nncData->allConnections();
|
||||
RigNNCData* nncData = eclipseCaseData->mainGrid()->nncData();
|
||||
const std::vector<RigConnection> connections = nncData->allConnections();
|
||||
|
||||
progress.incrementProgress();
|
||||
|
||||
@@ -199,7 +199,7 @@ void RigNumberOfFloodedPoreVolumesCalculator::calculate( RigMainGrid*
|
||||
std::vector<const std::vector<double>*> flowrateIatAllTimeSteps,
|
||||
std::vector<const std::vector<double>*> flowrateJatAllTimeSteps,
|
||||
std::vector<const std::vector<double>*> flowrateKatAllTimeSteps,
|
||||
const RigConnectionContainer& connections,
|
||||
const std::vector<RigConnection>& connections,
|
||||
std::vector<const std::vector<double>*> flowrateNNCatAllTimeSteps,
|
||||
std::vector<std::vector<double>> summedTracersAtAllTimesteps )
|
||||
{
|
||||
@@ -287,11 +287,11 @@ void RigNumberOfFloodedPoreVolumesCalculator::calculate( RigMainGrid*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigNumberOfFloodedPoreVolumesCalculator::distributeNNCflow( const RigConnectionContainer& connections,
|
||||
RimEclipseCase* caseToApply,
|
||||
const std::vector<double>& summedTracerValues,
|
||||
const std::vector<double>* flowrateNNC,
|
||||
std::vector<double>& flowrateIntoCell )
|
||||
void RigNumberOfFloodedPoreVolumesCalculator::distributeNNCflow( const std::vector<RigConnection>& connections,
|
||||
RimEclipseCase* caseToApply,
|
||||
const std::vector<double>& summedTracerValues,
|
||||
const std::vector<double>* flowrateNNC,
|
||||
std::vector<double>& flowrateIntoCell )
|
||||
{
|
||||
RigActiveCellInfo* actCellInfo = caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||
|
||||
|
||||
@@ -50,15 +50,15 @@ private:
|
||||
std::vector<const std::vector<double>*> flowrateIatAllTimeSteps,
|
||||
std::vector<const std::vector<double>*> flowrateJatAllTimeSteps,
|
||||
std::vector<const std::vector<double>*> flowrateKatAllTimeSteps,
|
||||
const RigConnectionContainer& connections,
|
||||
const std::vector<RigConnection>& connections,
|
||||
std::vector<const std::vector<double>*> flowrateNNCatAllTimeSteps,
|
||||
std::vector<std::vector<double>> summedTracersAtAllTimesteps );
|
||||
|
||||
void distributeNNCflow( const RigConnectionContainer& connections,
|
||||
RimEclipseCase* caseToApply,
|
||||
const std::vector<double>& summedTracerValues,
|
||||
const std::vector<double>* flowrateNNC,
|
||||
std::vector<double>& flowrateIntoCell );
|
||||
void distributeNNCflow( const std::vector<RigConnection>& connections,
|
||||
RimEclipseCase* caseToApply,
|
||||
const std::vector<double>& summedTracerValues,
|
||||
const std::vector<double>* flowrateNNC,
|
||||
std::vector<double>& flowrateIntoCell );
|
||||
|
||||
void distributeNeighbourCellFlow( RigMainGrid* mainGrid,
|
||||
RimEclipseCase* caseToApply,
|
||||
|
||||
@@ -339,7 +339,7 @@ void RigReservoirBuilderMock::addFaults( RigEclipseCaseData* eclipseCase )
|
||||
grid->setFaults( faults );
|
||||
|
||||
// NNCs
|
||||
RigConnectionContainer nncConnections;
|
||||
std::vector<RigConnection> nncConnections;
|
||||
{
|
||||
size_t i1 = 2;
|
||||
size_t j1 = 2;
|
||||
@@ -384,7 +384,14 @@ void RigReservoirBuilderMock::enableWellData( bool enableWellData )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigReservoirBuilderMock::addNnc( RigMainGrid* grid, size_t i1, size_t j1, size_t k1, size_t i2, size_t j2, size_t k2, RigConnectionContainer& nncConnections )
|
||||
void RigReservoirBuilderMock::addNnc( RigMainGrid* grid,
|
||||
size_t i1,
|
||||
size_t j1,
|
||||
size_t k1,
|
||||
size_t i2,
|
||||
size_t j2,
|
||||
size_t k2,
|
||||
std::vector<RigConnection>& nncConnections )
|
||||
{
|
||||
if ( i1 >= grid->cellCountI() || j1 >= grid->cellCountJ() || k1 >= grid->cellCountK() ) return;
|
||||
if ( i2 >= grid->cellCountI() || j2 >= grid->cellCountJ() || k2 >= grid->cellCountK() ) return;
|
||||
|
||||
@@ -60,7 +60,7 @@ private:
|
||||
void addFaults( RigEclipseCaseData* eclipseCase );
|
||||
|
||||
static void
|
||||
addNnc( RigMainGrid* grid, size_t i1, size_t j1, size_t k1, size_t i2, size_t j2, size_t k2, RigConnectionContainer& nncConnections );
|
||||
addNnc( RigMainGrid* grid, size_t i1, size_t j1, size_t k1, size_t i2, size_t j2, size_t k2, std::vector<RigConnection>& nncConnections );
|
||||
void addWellData( RigEclipseCaseData* eclipseCase, RigGridBase* grid );
|
||||
|
||||
private:
|
||||
|
||||
@@ -90,8 +90,8 @@ rips::Vec3i* createConnectionVec3i( const RigCell& cell )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
grpc::Status RiaNNCConnectionsStateHandler::assignReply( rips::NNCConnections* reply )
|
||||
{
|
||||
RigMainGrid* mainGrid = m_eclipseCase->eclipseCaseData()->mainGrid();
|
||||
const RigConnectionContainer& connections = mainGrid->nncData()->allConnections();
|
||||
RigMainGrid* mainGrid = m_eclipseCase->eclipseCaseData()->mainGrid();
|
||||
const std::vector<RigConnection>& connections = mainGrid->nncData()->allConnections();
|
||||
|
||||
size_t connectionCount = connections.size();
|
||||
const size_t packageSize = RiaGrpcHelper::numberOfDataUnitsInPackage( sizeof( rips::NNCConnection ) );
|
||||
|
||||
Reference in new issue
Block a user