mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5273 Allen Diagrams: Move result names to RiaNccDefines
This commit is contained in:
parent
5f7df7f7f5
commit
6761a71798
@ -18,6 +18,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RiaFontCache.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaEclipseFileNameTools.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaFeatureCommandContext.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaStringListSerializer.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaNncDefines.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
@ -40,6 +41,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RiaFontCache.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaEclipseFileNameTools.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaFeatureCommandContext.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaStringListSerializer.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaNncDefines.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
75
ApplicationCode/Application/RiaNncDefines.cpp
Normal file
75
ApplicationCode/Application/RiaNncDefines.cpp
Normal file
@ -0,0 +1,75 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2020 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaNncDefines.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::propertyNameFluxWat()
|
||||
{
|
||||
return "FLRWAT";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::propertyNameFluxOil()
|
||||
{
|
||||
return "FLROIL";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::propertyNameFluxGas()
|
||||
{
|
||||
return "FLRGAS";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::propertyNameCombTrans()
|
||||
{
|
||||
return "TRAN";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::propertyNameRiCombTrans()
|
||||
{
|
||||
return "riTRAN";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::propertyNameRiCombTransByArea()
|
||||
{
|
||||
return "riTRANbyArea";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaDefines::propertyNameRiCombMult()
|
||||
{
|
||||
return "riMULT";
|
||||
}
|
32
ApplicationCode/Application/RiaNncDefines.h
Normal file
32
ApplicationCode/Application/RiaNncDefines.h
Normal file
@ -0,0 +1,32 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2020 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace RiaDefines
|
||||
{
|
||||
QString propertyNameFluxWat();
|
||||
QString propertyNameFluxOil();
|
||||
QString propertyNameFluxGas();
|
||||
QString propertyNameCombTrans();
|
||||
QString propertyNameRiCombTrans();
|
||||
QString propertyNameRiCombTransByArea();
|
||||
QString propertyNameRiCombMult();
|
||||
}; // namespace RiaDefines
|
@ -731,7 +731,7 @@ void RifReaderEclipseOutput::transferStaticNNCData( const ecl_grid_type* mainEcl
|
||||
|
||||
mainGrid->nncData()->connections().resize( numNNC );
|
||||
std::vector<double>& transmissibilityValues = mainGrid->nncData()->makeStaticConnectionScalarResult(
|
||||
RigNNCData::propertyNameCombTrans() );
|
||||
RiaDefines::propertyNameCombTrans() );
|
||||
const double* transValues = ecl_nnc_data_get_values( tran_data );
|
||||
|
||||
for ( int nIdx = 0; nIdx < numNNC; ++nIdx )
|
||||
@ -767,11 +767,11 @@ void RifReaderEclipseOutput::transferDynamicNNCData( const ecl_grid_type* mainEc
|
||||
size_t timeStepCount = m_dynamicResultsAccess->timeStepCount();
|
||||
|
||||
std::vector<std::vector<double>>& waterFluxData =
|
||||
mainGrid->nncData()->makeDynamicConnectionScalarResult( RigNNCData::propertyNameFluxWat(), timeStepCount );
|
||||
mainGrid->nncData()->makeDynamicConnectionScalarResult( RiaDefines::propertyNameFluxWat(), timeStepCount );
|
||||
std::vector<std::vector<double>>& oilFluxData =
|
||||
mainGrid->nncData()->makeDynamicConnectionScalarResult( RigNNCData::propertyNameFluxOil(), timeStepCount );
|
||||
mainGrid->nncData()->makeDynamicConnectionScalarResult( RiaDefines::propertyNameFluxOil(), timeStepCount );
|
||||
std::vector<std::vector<double>>& gasFluxData =
|
||||
mainGrid->nncData()->makeDynamicConnectionScalarResult( RigNNCData::propertyNameFluxGas(), timeStepCount );
|
||||
mainGrid->nncData()->makeDynamicConnectionScalarResult( RiaDefines::propertyNameFluxGas(), timeStepCount );
|
||||
|
||||
for ( size_t timeStep = 0; timeStep < timeStepCount; ++timeStep )
|
||||
{
|
||||
|
@ -828,7 +828,7 @@ bool RimEclipseCase::openReserviorCase()
|
||||
RiaDefines::combinedTransmissibilityResultName() );
|
||||
if ( results->hasResultEntry( combinedTransmissibilityResAddr ) )
|
||||
{
|
||||
eclipseCaseData()->mainGrid()->nncData()->setEclResultAddress( RigNNCData::propertyNameCombTrans(),
|
||||
eclipseCaseData()->mainGrid()->nncData()->setEclResultAddress( RiaDefines::propertyNameCombTrans(),
|
||||
combinedTransmissibilityResAddr );
|
||||
}
|
||||
|
||||
@ -836,7 +836,7 @@ bool RimEclipseCase::openReserviorCase()
|
||||
RiaDefines::combinedWaterFluxResultName() );
|
||||
if ( results->hasResultEntry( combinedWaterFluxResAddr ) )
|
||||
{
|
||||
eclipseCaseData()->mainGrid()->nncData()->setEclResultAddress( RigNNCData::propertyNameFluxWat(),
|
||||
eclipseCaseData()->mainGrid()->nncData()->setEclResultAddress( RiaDefines::propertyNameFluxWat(),
|
||||
combinedWaterFluxResAddr );
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ bool RimEclipseCase::openReserviorCase()
|
||||
RiaDefines::combinedOilFluxResultName() );
|
||||
if ( results->hasResultEntry( combinedOilFluxResAddr ) )
|
||||
{
|
||||
eclipseCaseData()->mainGrid()->nncData()->setEclResultAddress( RigNNCData::propertyNameFluxOil(),
|
||||
eclipseCaseData()->mainGrid()->nncData()->setEclResultAddress( RiaDefines::propertyNameFluxOil(),
|
||||
combinedOilFluxResAddr );
|
||||
}
|
||||
RigEclipseResultAddress combinedGasFluxResAddr( RiaDefines::DYNAMIC_NATIVE,
|
||||
@ -852,7 +852,7 @@ bool RimEclipseCase::openReserviorCase()
|
||||
|
||||
if ( results->hasResultEntry( combinedGasFluxResAddr ) )
|
||||
{
|
||||
eclipseCaseData()->mainGrid()->nncData()->setEclResultAddress( RigNNCData::propertyNameFluxGas(),
|
||||
eclipseCaseData()->mainGrid()->nncData()->setEclResultAddress( RiaDefines::propertyNameFluxGas(),
|
||||
combinedGasFluxResAddr );
|
||||
}
|
||||
}
|
||||
|
@ -2196,8 +2196,8 @@ void RigCaseCellResultsData::computeNncCombRiTrans()
|
||||
std::vector<double>& permYResults = m_cellScalarResults[permYResultIdx][0];
|
||||
std::vector<double>& permZResults = m_cellScalarResults[permZResultIdx][0];
|
||||
std::vector<double>& riCombTransResults = m_ownerMainGrid->nncData()->makeStaticConnectionScalarResult(
|
||||
RigNNCData::propertyNameRiCombTrans() );
|
||||
m_ownerMainGrid->nncData()->setEclResultAddress( RigNNCData::propertyNameRiCombTrans(), riCombTransEclResAddr );
|
||||
RiaDefines::propertyNameRiCombTrans() );
|
||||
m_ownerMainGrid->nncData()->setEclResultAddress( RiaDefines::propertyNameRiCombTrans(), riCombTransEclResAddr );
|
||||
|
||||
std::vector<double>* ntgResults = nullptr;
|
||||
if ( hasNTGResults )
|
||||
@ -2444,7 +2444,7 @@ void RigCaseCellResultsData::computeNncCombRiMULT()
|
||||
if ( m_ownerMainGrid->nncData()->staticConnectionScalarResult( riCombMultEclResAddr ) ) return;
|
||||
|
||||
std::vector<double>& riMultResults = m_ownerMainGrid->nncData()->makeStaticConnectionScalarResult(
|
||||
RigNNCData::propertyNameRiCombMult() );
|
||||
RiaDefines::propertyNameRiCombMult() );
|
||||
|
||||
const std::vector<double>* riTransResults = m_ownerMainGrid->nncData()->staticConnectionScalarResult(
|
||||
riCombTransEclResAddr );
|
||||
@ -2452,7 +2452,7 @@ void RigCaseCellResultsData::computeNncCombRiMULT()
|
||||
const std::vector<double>* transResults = m_ownerMainGrid->nncData()->staticConnectionScalarResult(
|
||||
combTransEclResAddr );
|
||||
|
||||
m_ownerMainGrid->nncData()->setEclResultAddress( RigNNCData::propertyNameRiCombMult(), riCombMultEclResAddr );
|
||||
m_ownerMainGrid->nncData()->setEclResultAddress( RiaDefines::propertyNameRiCombMult(), riCombMultEclResAddr );
|
||||
|
||||
for ( size_t nncConIdx = 0; nncConIdx < riMultResults.size(); ++nncConIdx )
|
||||
{
|
||||
@ -2585,9 +2585,9 @@ void RigCaseCellResultsData::computeNncCombRiTRANSbyArea()
|
||||
if ( m_ownerMainGrid->nncData()->staticConnectionScalarResult( riCombTransByAreaEclResAddr ) ) return;
|
||||
|
||||
std::vector<double>& riAreaNormTransResults = m_ownerMainGrid->nncData()->makeStaticConnectionScalarResult(
|
||||
RigNNCData::propertyNameRiCombTransByArea() );
|
||||
RiaDefines::propertyNameRiCombTransByArea() );
|
||||
|
||||
m_ownerMainGrid->nncData()->setEclResultAddress( RigNNCData::propertyNameRiCombTransByArea(),
|
||||
m_ownerMainGrid->nncData()->setEclResultAddress( RiaDefines::propertyNameRiCombTransByArea(),
|
||||
riCombTransByAreaEclResAddr );
|
||||
|
||||
const std::vector<double>* transResults = m_ownerMainGrid->nncData()->staticConnectionScalarResult(
|
||||
|
@ -529,10 +529,10 @@ const QString RigNNCData::getNNCDataTypeFromScalarResultIndex( const RigEclipseR
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigNNCData::isNative( QString nncDataType ) const
|
||||
{
|
||||
if ( nncDataType == RigNNCData::propertyNameCombTrans() || nncDataType == RigNNCData::propertyNameFluxGas() ||
|
||||
nncDataType == RigNNCData::propertyNameFluxOil() || nncDataType == RigNNCData::propertyNameFluxWat() ||
|
||||
nncDataType == RigNNCData::propertyNameRiCombMult() || nncDataType == RigNNCData::propertyNameRiCombTrans() ||
|
||||
nncDataType == RigNNCData::propertyNameRiCombTransByArea() )
|
||||
if ( nncDataType == RiaDefines::propertyNameCombTrans() || nncDataType == RiaDefines::propertyNameFluxGas() ||
|
||||
nncDataType == RiaDefines::propertyNameFluxOil() || nncDataType == RiaDefines::propertyNameFluxWat() ||
|
||||
nncDataType == RiaDefines::propertyNameRiCombMult() || nncDataType == RiaDefines::propertyNameRiCombTrans() ||
|
||||
nncDataType == RiaDefines::propertyNameRiCombTransByArea() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaNncDefines.h"
|
||||
|
||||
#include "cvfObject.h"
|
||||
#include "cvfStructGrid.h"
|
||||
#include "cvfVector3.h"
|
||||
@ -63,35 +65,6 @@ public:
|
||||
NNC_GENERATED
|
||||
};
|
||||
|
||||
static QString propertyNameFluxWat()
|
||||
{
|
||||
return "FLRWAT";
|
||||
}
|
||||
static QString propertyNameFluxOil()
|
||||
{
|
||||
return "FLROIL";
|
||||
}
|
||||
static QString propertyNameFluxGas()
|
||||
{
|
||||
return "FLRGAS";
|
||||
}
|
||||
static QString propertyNameCombTrans()
|
||||
{
|
||||
return "TRAN";
|
||||
}
|
||||
static QString propertyNameRiCombTrans()
|
||||
{
|
||||
return "riTRAN";
|
||||
}
|
||||
static QString propertyNameRiCombTransByArea()
|
||||
{
|
||||
return "riTRANbyArea";
|
||||
}
|
||||
static QString propertyNameRiCombMult()
|
||||
{
|
||||
return "riMULT";
|
||||
}
|
||||
|
||||
RigNNCData();
|
||||
|
||||
void processConnections( const RigMainGrid& mainGrid );
|
||||
|
@ -103,9 +103,9 @@ RigNumberOfFloodedPoreVolumesCalculator::RigNumberOfFloodedPoreVolumesCalculator
|
||||
|
||||
progress.incrementProgress();
|
||||
|
||||
// TODO: oil or gas flowrate
|
||||
// TODO: oil or gas flow rate
|
||||
std::vector<const std::vector<double>*> flowrateNNCatAllTimeSteps;
|
||||
QString nncConnectionProperty = mainGrid->nncData()->propertyNameFluxWat();
|
||||
QString nncConnectionProperty = RiaDefines::propertyNameFluxWat();
|
||||
|
||||
progress.incrementProgress();
|
||||
|
||||
|
@ -562,7 +562,7 @@ void RigReservoirBuilderMock::addFaults( RigEclipseCaseData* eclipseCase )
|
||||
}
|
||||
|
||||
std::vector<double>& tranVals = grid->nncData()->makeStaticConnectionScalarResult(
|
||||
RigNNCData::propertyNameCombTrans() );
|
||||
RiaDefines::propertyNameCombTrans() );
|
||||
for ( size_t cIdx = 0; cIdx < tranVals.size(); ++cIdx )
|
||||
{
|
||||
tranVals[cIdx] = 0.2;
|
||||
|
Loading…
Reference in New Issue
Block a user