#6035 Handle missing values in fracture model plot.

This commit is contained in:
Kristian Bendiksen
2020-06-05 15:58:25 +02:00
parent 3085fe22e8
commit 89473aa9bd
11 changed files with 298 additions and 48 deletions

View File

@@ -195,32 +195,17 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
std::vector<double> faciesValues;
eclExtractor.curveData( faciesResultAccessor.p(), &faciesValues );
// Extract porosity data
// m_eclipseResultDefinition->setResultType();
cvf::ref<RigResultAccessor> poroResAcc =
RigResultAccessorFactory::createFromResultAddress( eclipseCase->eclipseCaseData(),
0,
RiaDefines::PorosityModelType::MATRIX_MODEL,
0,
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
"PORO" ) );
if ( !poroResAcc.notNull() )
// Extract porosity data: get the porosity values from parent
RimFractureModelPlot* fractureModelPlot;
firstAncestorOrThisOfType( fractureModelPlot );
if ( !fractureModelPlot )
{
std::cerr << "NO PORO RES ACCESSOR" << std::endl;
std::cerr << "NO PORO VALUES FOUND" << std::endl;
return;
}
std::vector<double> poroValues;
eclExtractor.curveData( poroResAcc.p(), &poroValues );
std::cout << "Dims: FOrmation names to plot: " << formationNamesToPlot.size() << " Y: " << yValues.size()
<< " FACIES: " << faciesValues.size() << " PORO: " << poroValues.size() << std::endl;
for ( size_t i = 0; i < yValues.size(); i++ )
{
std::cout << i << ": " << yValues[i].first << "-" << yValues[i].second << " ==> "
<< formationNamesToPlot[i].toStdString() << std::endl;
}
fractureModelPlot->getPorosityValues( poroValues );
// TODO: make this settable??
RimColorLegend* colorLegend = RimProject::current()->colorLegendCollection()->findByName( "Facies colors" );
@@ -245,10 +230,6 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
QString formationName = findFormationNameForDepth( formationNamesToPlot, yValues, tvDepthValues[i] );
double porosity = poroValues[i];
// std::cout << i << ": Depth: " << tvDepthValues[i] << " Poro: " << poroValues[i]
// << " Facies: " << faciesValues[i] << " name: " << faciesName.toStdString()
// << " formation: " << formationName.toStdString();
FaciesKey faciesKey = std::make_tuple( fieldName, formationName, faciesName );
if ( elasticProperties->hasPropertiesForFacies( faciesKey ) )
{