mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-13 17:02:13 -05:00
Streamlines : Avoid load of a single step
If only one time step is loaded, all other logic must be able to handle this situation. Load data for all time steps when asking for flow related data Use absolute value when comparing flow values
This commit is contained in:
1 parent
9bd0a9ebac
commit
4a9e759e4b
3 files changed
+13
-9
No files matched your search
@@ -97,8 +97,9 @@ cvf::ref<RigResultAccessor> RimStreamlineDataAccess::getDataAccessor( cvf::Struc
|
||||
|
||||
RigEclipseResultAddress address( RiaDefines::ResultCatType::DYNAMIC_NATIVE, resultname );
|
||||
|
||||
// Make sure we have the data we need loaded for the given phase and time step index
|
||||
data->ensureKnownResultLoadedForTimeStep( address, timeIdx );
|
||||
// Make sure we have the data loaded.
|
||||
// NB, will trigger load of data for all time steps
|
||||
data->ensureKnownResultLoaded( address );
|
||||
|
||||
return RigResultAccessorFactory::createFromResultAddress( m_data, gridIdx, porModel, timeIdx, address );
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ void RimStreamlineGenerator2::generateTracer( RigCell cell,
|
||||
for ( auto faceIdx : m_allFaces )
|
||||
{
|
||||
double flowVelocity = m_dataAccess->combinedFaceValueByArea( cell, faceIdx, m_phases, dominantPhase ) * direction;
|
||||
if ( flowVelocity > m_flowThreshold )
|
||||
if ( std::abs( flowVelocity ) > m_flowThreshold )
|
||||
{
|
||||
m_seeds.push_back( std::make_pair( cellIdx, faceIdx ) );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user