Next iteration.

This commit is contained in:
rubenthoms 2020-09-23 18:40:05 +02:00
parent de360c8a4c
commit 9baa24e9ef
5 changed files with 169 additions and 134 deletions

View File

@ -101,31 +101,40 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
}
float arrowScaling = arrowConstantScaling;
if ( result->scaleMethod() == RimElementVectorResult::ScaleMethod::RESULT )
if ( result->scaleMethod() == RimElementVectorResult::ScaleMethod::RESULT ||
result->scaleMethod() == RimElementVectorResult::ScaleMethod::RESULT_LOG )
{
arrowScaling = arrowConstantScaling / maxAbsResult;
}
if ( result->scaleMethod() == RimElementVectorResult::ScaleMethod::RESULT_LOG )
{
arrowScaling = scaleLogarithmically( arrowScaling );
}
std::vector<RigEclipseResultAddress> addresses;
result->resultAddressIJK( addresses );
result->resultAddressesIJK( addresses );
std::vector<cvf::StructGridInterface::FaceType> directions;
std::vector<RigEclipseResultAddress> resultAddresses;
if ( result->showVectorI() )
for ( size_t fluidIndex = 0; fluidIndex < addresses.size(); fluidIndex += 3 )
{
directions.push_back( cvf::StructGridInterface::POS_I );
resultAddresses.push_back( addresses[0] );
}
if ( result->showVectorJ() )
{
directions.push_back( cvf::StructGridInterface::POS_J );
resultAddresses.push_back( addresses[1] );
}
if ( result->showVectorK() )
{
directions.push_back( cvf::StructGridInterface::POS_K );
resultAddresses.push_back( addresses[2] );
if ( result->showVectorI() )
{
if ( fluidIndex == 0 ) directions.push_back( cvf::StructGridInterface::POS_I );
resultAddresses.push_back( addresses[0] );
}
if ( result->showVectorJ() )
{
if ( fluidIndex == 0 ) directions.push_back( cvf::StructGridInterface::POS_J );
resultAddresses.push_back( addresses[1] );
}
if ( result->showVectorK() )
{
if ( fluidIndex == 0 ) directions.push_back( cvf::StructGridInterface::POS_K );
resultAddresses.push_back( addresses[2] );
}
}
RigCaseCellResultsData* resultsData = eclipseCaseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
@ -143,8 +152,13 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
{
for ( int dir = 0; dir < static_cast<int>( directions.size() ); dir++ )
{
double resultValue =
resultsData->cellScalarResults( resultAddresses[dir], timeStepIndex ).at( resultIdx );
double resultValue = 0.0;
for ( size_t flIdx = dir; flIdx < resultAddresses.size(); flIdx += directions.size() )
{
resultValue +=
resultsData->cellScalarResults( resultAddresses[flIdx], timeStepIndex ).at( resultIdx );
}
if ( std::abs( resultValue ) >= result->threshold() )
{
cvf::Vec3d faceCenter = cells[gcIdx].faceCenter( directions[dir] ) - offset;
@ -157,8 +171,7 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
}
else if ( result->scaleMethod() == RimElementVectorResult::ScaleMethod::RESULT_LOG )
{
faceNormal *= scaleLogarithmically( std::abs( resultValue ) );
resultValue = scaleLogarithmically( resultValue );
faceNormal *= std::abs( scaleLogarithmically( std::abs( resultValue ) ) );
}
tensorVisualizations.push_back(
@ -172,10 +185,15 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
else if ( result->vectorView() == RimElementVectorResult::VectorView::AGGREGATED )
{
cvf::Vec3d aggregatedVector;
cvf::Vec3d aggregatedResult;
for ( int dir = 0; dir < static_cast<int>( directions.size() ); dir++ )
{
double resultValue =
resultsData->cellScalarResults( resultAddresses[dir], timeStepIndex ).at( resultIdx );
double resultValue = 0.0;
for ( size_t flIdx = dir; flIdx < resultAddresses.size(); flIdx += directions.size() )
{
resultValue +=
resultsData->cellScalarResults( resultAddresses[flIdx], timeStepIndex ).at( resultIdx );
}
cvf::Vec3d faceCenter = cells[gcIdx].faceCenter( directions[dir] ) - offset;
cvf::Vec3d cellCenter = cells[gcIdx].center() - offset;
cvf::Vec3d faceNormal = ( faceCenter - cellCenter ).getNormalized() * arrowScaling;
@ -190,15 +208,14 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
}
aggregatedVector += faceNormal;
aggregatedResult += ( faceCenter - cellCenter ).getNormalized() * resultValue;
}
if ( aggregatedVector.length() > 0 )
{
tensorVisualizations.push_back(
ElementVectorResultVisualization( cells[gcIdx].center() - offset,
aggregatedVector,
result->scaleMethod() == RimElementVectorResult::ScaleMethod::RESULT_LOG
? scaleLogarithmically( aggregatedVector.length() )
: aggregatedVector.length(),
aggregatedResult.length(),
std::cbrt( cells[gcIdx].volume() / 3.0 ) ) );
}
}
@ -208,44 +225,56 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
RigNNCData* nncData = eclipseCaseData->mainGrid()->nncData();
size_t numNncConnections = nncData->connections().size();
const std::vector<std::vector<double>>* nncResultVals = nullptr;
std::vector<const std::vector<std::vector<double>>*> nncResultVals;
if ( result->showNncData() )
{
if ( result->resultAddressCombined().m_resultCatType == RiaDefines::ResultCatType::DYNAMIC_NATIVE )
std::vector<RigEclipseResultAddress> combinedAddresses;
result->resultAddressesCombined( combinedAddresses );
double resultValue = 0.0;
for ( size_t flIdx = 0; flIdx < combinedAddresses.size(); flIdx++ )
{
nncResultVals = nncData->dynamicConnectionScalarResult( result->resultAddressCombined() );
for ( size_t nIdx = 0; nIdx < numNncConnections; ++nIdx )
if ( combinedAddresses[flIdx].m_resultCatType == RiaDefines::ResultCatType::DYNAMIC_NATIVE )
{
const RigConnection& conn = nncData->connections()[nIdx];
if ( conn.polygon().size() )
nncResultVals.push_back( nncData->dynamicConnectionScalarResult( combinedAddresses[flIdx] ) );
}
}
for ( size_t nIdx = 0; nIdx < numNncConnections; ++nIdx )
{
const RigConnection& conn = nncData->connections()[nIdx];
if ( conn.polygon().size() )
{
double resultValue = 0.0;
for ( size_t flIdx = 0; flIdx < nncResultVals.size(); flIdx++ )
{
double resultValue = 0;
if ( nIdx < nncResultVals->at( timeStepIndex ).size() )
if ( nIdx < nncResultVals.at( flIdx )->at( timeStepIndex ).size() )
{
resultValue = nncResultVals->at( timeStepIndex )[nIdx];
resultValue += nncResultVals.at( flIdx )->at( timeStepIndex )[nIdx];
}
cvf::Vec3d connCenter =
static_cast<cvf::Vec3d>( cvf::GeometryTools::computePolygonCenter<cvf::Vec3f>( conn.polygon() ) );
cvf::Vec3d connNormal =
cells[conn.c1GlobIdx()].faceNormalWithAreaLength( conn.face() ).getNormalized() * arrowScaling;
if ( result->scaleMethod() == RimElementVectorResult::ScaleMethod::RESULT )
{
connNormal *= std::abs( resultValue );
}
else if ( result->scaleMethod() == RimElementVectorResult::ScaleMethod::RESULT_LOG )
{
connNormal *= scaleLogarithmically( std::abs( resultValue ) );
resultValue = scaleLogarithmically( resultValue );
}
tensorVisualizations.push_back(
ElementVectorResultVisualization( connCenter - offset,
connNormal,
resultValue,
std::cbrt( cells[conn.c1GlobIdx()].volume() / 3.0 ) ) );
}
cvf::Vec3d connCenter =
static_cast<cvf::Vec3d>( cvf::GeometryTools::computePolygonCenter<cvf::Vec3f>( conn.polygon() ) );
cvf::Vec3d connNormal = ( ( static_cast<cvf::Vec3d>( conn.polygon()[0] ) - connCenter ) ^
( static_cast<cvf::Vec3d>( conn.polygon()[1] ) - connCenter ) )
.getNormalized() *
arrowScaling;
if ( result->scaleMethod() == RimElementVectorResult::ScaleMethod::RESULT )
{
connNormal *= std::abs( resultValue );
}
else if ( result->scaleMethod() == RimElementVectorResult::ScaleMethod::RESULT_LOG )
{
connNormal *= scaleLogarithmically( std::abs( resultValue ) );
}
tensorVisualizations.push_back(
ElementVectorResultVisualization( connCenter - offset,
connNormal,
resultValue,
std::cbrt( cells[conn.c1GlobIdx()].volume() / 3.0 ) ) );
}
}
}
@ -270,10 +299,10 @@ cvf::ref<cvf::Part>
shaftIndices.reserve( tensorVisualizations.size() * 2 );
std::vector<uint> headIndices;
headIndices.reserve( tensorVisualizations.size() * 6 );
headIndices.reserve( tensorVisualizations.size() * 3 );
std::vector<cvf::Vec3f> vertices;
vertices.reserve( tensorVisualizations.size() * 7 );
vertices.reserve( tensorVisualizations.size() * 5 );
uint counter = 0;
for ( ElementVectorResultVisualization tensor : tensorVisualizations )
@ -293,7 +322,7 @@ cvf::ref<cvf::Part>
headIndices.push_back( index );
}
counter += 7;
counter += 5;
}
cvf::ref<cvf::PrimitiveSetIndexedUInt> indexedUIntShaft =
@ -362,12 +391,12 @@ void RivElementVectorResultPartMgr::createResultColorTextureCoords(
CVF_ASSERT( textureCoords );
CVF_ASSERT( mapper );
size_t vertexCount = elementVectorResultVisualizations.size() * 7;
size_t vertexCount = elementVectorResultVisualizations.size() * 5;
if ( textureCoords->size() != vertexCount ) textureCoords->reserve( vertexCount );
for ( auto evrViz : elementVectorResultVisualizations )
{
for ( size_t vxIdx = 0; vxIdx < 7; ++vxIdx )
for ( size_t vxIdx = 0; vxIdx < 5; ++vxIdx )
{
cvf::Vec2f texCoord = mapper->mapToTextureCoord( evrViz.result );
textureCoords->add( texCoord );
@ -378,10 +407,10 @@ void RivElementVectorResultPartMgr::createResultColorTextureCoords(
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::array<cvf::Vec3f, 7>
std::array<cvf::Vec3f, 5>
RivElementVectorResultPartMgr::createArrowVertices( const ElementVectorResultVisualization& evrViz ) const
{
std::array<cvf::Vec3f, 7> vertices;
std::array<cvf::Vec3f, 5> vertices;
cvf::Vec3f headTop = evrViz.faceCenter + evrViz.faceNormal;
cvf::Vec3f shaftStart = evrViz.faceCenter;
@ -401,16 +430,12 @@ std::array<cvf::Vec3f, 7>
cvf::Vec3f headBottomDirectionH = evrViz.faceNormal ^ evrViz.faceCenter;
cvf::Vec3f arrowBottomSegmentH = headBottomDirectionH.getNormalized() * headLength / 8.0f;
cvf::Vec3f headBottomDirectionV = evrViz.faceNormal ^ headBottomDirectionH;
cvf::Vec3f arrowBottomSegmentV = headBottomDirectionV.getNormalized() * headLength / 8.0f;
vertices[0] = shaftStart;
vertices[1] = headBottom;
vertices[2] = headBottom + arrowBottomSegmentH;
vertices[3] = headBottom - arrowBottomSegmentH;
vertices[4] = headTop;
vertices[5] = headBottom + arrowBottomSegmentV;
vertices[6] = headBottom - arrowBottomSegmentV;
return vertices;
}
@ -431,17 +456,13 @@ std::array<uint, 2> RivElementVectorResultPartMgr::createArrowShaftIndices( uint
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::array<uint, 6> RivElementVectorResultPartMgr::createArrowHeadIndices( uint startIndex ) const
std::array<uint, 3> RivElementVectorResultPartMgr::createArrowHeadIndices( uint startIndex ) const
{
std::array<uint, 6> indices;
std::array<uint, 3> indices;
indices[0] = startIndex + 2;
indices[1] = startIndex + 3;
indices[2] = startIndex + 4;
indices[3] = startIndex + 5;
indices[4] = startIndex + 6;
indices[5] = startIndex + 4;
return indices;
}
@ -450,12 +471,9 @@ std::array<uint, 6> RivElementVectorResultPartMgr::createArrowHeadIndices( uint
//--------------------------------------------------------------------------------------------------
double RivElementVectorResultPartMgr::scaleLogarithmically( double value ) const
{
if ( value <= 1 )
if ( value <= 1.0 )
{
return value;
}
else
{
return std::log10( value );
value += 1.0;
}
return std::log10( value );
}

View File

@ -77,9 +77,9 @@ private:
const std::vector<ElementVectorResultVisualization>& elementVectorResultVisualizations,
const cvf::ScalarMapper* mapper );
std::array<cvf::Vec3f, 7> createArrowVertices( const ElementVectorResultVisualization& tensorVisualization ) const;
std::array<cvf::Vec3f, 5> createArrowVertices( const ElementVectorResultVisualization& tensorVisualization ) const;
std::array<uint, 2> createArrowShaftIndices( uint startIndex ) const;
std::array<uint, 6> createArrowHeadIndices( uint startIndex ) const;
std::array<uint, 3> createArrowHeadIndices( uint startIndex ) const;
double scaleLogarithmically( double value ) const;

View File

@ -75,9 +75,9 @@ RimElementVectorResult::RimElementVectorResult()
m_legendConfig = new RimRegularLegendConfig();
m_legendConfig.uiCapability()->setUiHidden( true );
CAF_PDM_InitField( &m_resultName, "ResultVariable", QString( "Oil" ), "Value", "", "", "" );
m_resultName.uiCapability()->setUiEditorTypeName( caf::PdmUiListEditor::uiEditorTypeName() );
m_resultName.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
CAF_PDM_InitField( &m_resultNames, "ResultVariable", std::vector<QString>{QString( "Oil" )}, "Fluid", "", "", "" );
m_resultNames.uiCapability()->setUiEditorTypeName( caf::PdmUiListEditor::uiEditorTypeName() );
m_resultNames.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
CAF_PDM_InitField( &m_showResult, "ShowResult", false, "", "", "", "" );
@ -210,30 +210,41 @@ const cvf::Color3f& RimElementVectorResult::getUniformVectorColor() const
//--------------------------------------------------------------------------------------------------
void RimElementVectorResult::mappingRange( double& min, double& max ) const
{
min = cvf::UNDEFINED_DOUBLE;
max = cvf::UNDEFINED_DOUBLE;
min = 0.0;
max = 0.0;
Rim3dView* view = nullptr;
firstAncestorOrThisOfType( view );
int currentTimeStep = view->currentTimeStep();
RigEclipseResultAddress resVarAddr = resultAddressCombined();
if ( !resVarAddr.isValid() ) return;
std::vector<RigEclipseResultAddress> resVarAddresses;
if ( !resultAddressesCombined( resVarAddresses ) ) return;
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( view );
RigCaseCellResultsData* resultsData =
eclipseView->eclipseCase()->eclipseCaseData()->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
resultsData->ensureKnownResultLoaded( resVarAddr );
if ( m_legendConfig->rangeMode() == RimRegularLegendConfig::RangeModeType::AUTOMATIC_ALLTIMESTEPS )
for ( size_t index = 0; index < resVarAddresses.size(); index++ )
{
resultsData->minMaxCellScalarValues( resVarAddr, min, max );
}
else if ( m_legendConfig->rangeMode() == RimRegularLegendConfig::RangeModeType::AUTOMATIC_CURRENT_TIMESTEP )
{
resultsData->minMaxCellScalarValues( resVarAddr, currentTimeStep, min, max );
double localMin = cvf::UNDEFINED_DOUBLE;
double localMax = cvf::UNDEFINED_DOUBLE;
RigEclipseResultAddress resVarAddr = resVarAddresses.at( index );
if ( !resVarAddr.isValid() ) return;
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( view );
RigCaseCellResultsData* resultsData =
eclipseView->eclipseCase()->eclipseCaseData()->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
resultsData->ensureKnownResultLoaded( resVarAddr );
if ( m_legendConfig->rangeMode() == RimRegularLegendConfig::RangeModeType::AUTOMATIC_ALLTIMESTEPS )
{
resultsData->minMaxCellScalarValues( resVarAddr, localMin, localMax );
}
else if ( m_legendConfig->rangeMode() == RimRegularLegendConfig::RangeModeType::AUTOMATIC_CURRENT_TIMESTEP )
{
resultsData->minMaxCellScalarValues( resVarAddr, currentTimeStep, localMin, localMax );
}
min += localMin;
max += localMax;
}
}
@ -243,13 +254,21 @@ void RimElementVectorResult::mappingRange( double& min, double& max ) const
void RimElementVectorResult::updateLegendRangesTextAndVisibility( RiuViewer* nativeOrOverrideViewer,
bool isUsingOverrideViewer )
{
m_legendConfig->setTitle( QString( "Element Vector Result: \n" ) + resultName() );
QStringList resultNames;
for ( size_t i = 0; i < m_resultNames().size(); i++ )
{
resultNames << m_resultNames().at( i );
}
m_legendConfig->setTitle( QString( "Element Vector Result: \n" ) + resultNames.join( ", " ) );
double minResultValue;
double maxResultValue;
mappingRange( minResultValue, maxResultValue );
m_legendConfig->setAutomaticRanges( minResultValue, maxResultValue, minResultValue, maxResultValue );
m_legendConfig->setMappingMode( RimRegularLegendConfig::MappingType::LINEAR_CONTINUOUS );
double posClosestToZero = HUGE_VAL;
double negClosestToZero = -HUGE_VAL;
m_legendConfig->setClosestToZeroValues( posClosestToZero, negClosestToZero, posClosestToZero, negClosestToZero );
@ -267,9 +286,9 @@ const RimRegularLegendConfig* RimElementVectorResult::legendConfig() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimElementVectorResult::resultName() const
std::vector<QString> RimElementVectorResult::resultNames() const
{
return m_resultName();
return m_resultNames();
}
//--------------------------------------------------------------------------------------------------
@ -319,7 +338,7 @@ QList<caf::PdmOptionItemInfo>
QList<caf::PdmOptionItemInfo> options;
*useOptionsOnly = true;
if ( fieldNeedingOptions == &m_resultName )
if ( fieldNeedingOptions == &m_resultNames )
{
std::vector<std::string> fieldCompNames = getResultMetaDataForUIFieldSetting();
@ -338,7 +357,7 @@ QList<caf::PdmOptionItemInfo>
//--------------------------------------------------------------------------------------------------
void RimElementVectorResult::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
uiOrdering.add( &m_resultName );
uiOrdering.add( &m_resultNames );
caf::PdmUiGroup* visibilityGroup = uiOrdering.addNewGroup( "Visibility" );
visibilityGroup->add( &m_vectorView );
@ -369,7 +388,7 @@ void RimElementVectorResult::defineEditorAttribute( const caf::PdmFieldHandle* f
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute )
{
if ( field == &m_resultName )
if ( field == &m_resultNames )
{
caf::PdmUiListEditorAttribute* listEditAttr = dynamic_cast<caf::PdmUiListEditorAttribute*>( attribute );
if ( listEditAttr )
@ -382,58 +401,56 @@ void RimElementVectorResult::defineEditorAttribute( const caf::PdmFieldHandle* f
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigEclipseResultAddress RimElementVectorResult::resultAddressCombined() const
bool RimElementVectorResult::resultAddressesCombined( std::vector<RigEclipseResultAddress>& addresses ) const
{
if ( resultName() == "Oil" )
{
return RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaDefines::combinedOilFluxResultName() );
}
else if ( resultName() == "Gas" )
{
return RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaDefines::combinedGasFluxResultName() );
}
else if ( resultName() == "Water" )
{
return RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaDefines::combinedWaterFluxResultName() );
}
addresses.clear();
return RigEclipseResultAddress();
if ( std::count( m_resultNames().begin(), m_resultNames().end(), "Oil" ) )
{
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaDefines::combinedOilFluxResultName() ) );
}
if ( std::count( m_resultNames().begin(), m_resultNames().end(), "Gas" ) )
{
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaDefines::combinedGasFluxResultName() ) );
}
if ( std::count( m_resultNames().begin(), m_resultNames().end(), "Water" ) )
{
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaDefines::combinedWaterFluxResultName() ) );
}
return addresses.size() > 0;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimElementVectorResult::resultAddressIJK( std::vector<RigEclipseResultAddress>& addresses ) const
bool RimElementVectorResult::resultAddressesIJK( std::vector<RigEclipseResultAddress>& addresses ) const
{
addresses.clear();
// TODO: use enum??
if ( resultName() == "Oil" )
if ( std::count( m_resultNames().begin(), m_resultNames().end(), "Oil" ) )
{
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLROILI+" ) );
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLROILJ+" ) );
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLROILK+" ) );
return true;
}
else if ( resultName() == "Gas" )
if ( std::count( m_resultNames().begin(), m_resultNames().end(), "Gas" ) )
{
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRGASI+" ) );
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRGASJ+" ) );
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRGASK+" ) );
return true;
}
else if ( resultName() == "Water" )
if ( std::count( m_resultNames().begin(), m_resultNames().end(), "Water" ) )
{
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATI+" ) );
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATJ+" ) );
addresses.push_back( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FLRWATK+" ) );
return true;
}
return false;
return addresses.size() > 0;
}
//--------------------------------------------------------------------------------------------------

View File

@ -84,10 +84,10 @@ public:
void mappingRange( double& min, double& max ) const;
RigEclipseResultAddress resultAddressCombined() const;
bool resultAddressIJK( std::vector<RigEclipseResultAddress>& addresses ) const;
bool resultAddressesCombined( std::vector<RigEclipseResultAddress>& addresses ) const;
bool resultAddressesIJK( std::vector<RigEclipseResultAddress>& addresses ) const;
QString resultName() const;
std::vector<QString> resultNames() const;
void updateLegendRangesTextAndVisibility( RiuViewer* nativeOrOverrideViewer, bool isUsingOverrideViewer );
@ -107,7 +107,7 @@ private:
private:
caf::PdmField<bool> m_showResult;
caf::PdmField<QString> m_resultName;
caf::PdmField<std::vector<QString>> m_resultNames;
caf::PdmField<caf::AppEnum<VectorView>> m_vectorView;
caf::PdmField<bool> m_showVectorI;
caf::PdmField<bool> m_showVectorJ;

View File

@ -30,7 +30,7 @@ Vec3Type GeometryTools::computePolygonCenter(const std::vector<Vec3Type>& polygo
{
Vec3Type s;
for (int i = 0; i < polygon.size(); i++)
for (size_t i = 0; i < polygon.size(); i++)
{
s.x() += polygon[i].x();
s.y() += polygon[i].y();