mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-07 14:43:10 -06:00
Allow different definitions of valid result for StimPlan and Thermal template.
This commit is contained in:
parent
d046e2692c
commit
550110d8ab
@ -463,7 +463,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanColorInterpolatedSurfa
|
|||||||
bool includeThisTrianglePair = false;
|
bool includeThisTrianglePair = false;
|
||||||
for ( size_t j = 0; j < 6; j++ )
|
for ( size_t j = 0; j < 6; j++ )
|
||||||
{
|
{
|
||||||
if ( perNodeResultValues[triangleIndices[i + j]] > 1e-7 )
|
if ( stimPlanFracTemplate->isValidResult( perNodeResultValues[triangleIndices[i + j]] ) )
|
||||||
{
|
{
|
||||||
includeThisTrianglePair = true;
|
includeThisTrianglePair = true;
|
||||||
}
|
}
|
||||||
@ -578,7 +578,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanElementColorSurfacePar
|
|||||||
|
|
||||||
for ( size_t cIdx = 0; cIdx < stimPlanCells.size(); ++cIdx )
|
for ( size_t cIdx = 0; cIdx < stimPlanCells.size(); ++cIdx )
|
||||||
{
|
{
|
||||||
if ( prCellResults[cIdx] > 1e-7 )
|
if ( stimPlanFracTemplate->isValidResult( prCellResults[cIdx] ) )
|
||||||
{
|
{
|
||||||
const RigFractureCell& stimPlanCell = stimPlanCells[cIdx];
|
const RigFractureCell& stimPlanCell = stimPlanCells[cIdx];
|
||||||
std::vector<cvf::Vec3d> stimPlanCellPolygon = stimPlanCell.getPolygon();
|
std::vector<cvf::Vec3d> stimPlanCellPolygon = stimPlanCell.getPolygon();
|
||||||
@ -1048,7 +1048,7 @@ void RivWellFracturePartMgr::createVisibleFracturePolygons( RimMeshFractureTempl
|
|||||||
m_visibleFracturePolygons.clear();
|
m_visibleFracturePolygons.clear();
|
||||||
for ( size_t cIdx = 0; cIdx < stimPlanCells.size(); ++cIdx )
|
for ( size_t cIdx = 0; cIdx < stimPlanCells.size(); ++cIdx )
|
||||||
{
|
{
|
||||||
if ( prCellResults[cIdx] > 1e-7 )
|
if ( stimPlanFracTemplate->isValidResult( prCellResults[cIdx] ) )
|
||||||
{
|
{
|
||||||
const RigFractureCell& stimPlanCell = stimPlanCells[cIdx];
|
const RigFractureCell& stimPlanCell = stimPlanCells[cIdx];
|
||||||
std::vector<cvf::Vec3d> stimPlanCellPolygon = stimPlanCell.getPolygon();
|
std::vector<cvf::Vec3d> stimPlanCellPolygon = stimPlanCell.getPolygon();
|
||||||
@ -1081,7 +1081,7 @@ cvf::ref<cvf::DrawableGeo> RivWellFracturePartMgr::createStimPlanMeshDrawable( R
|
|||||||
|
|
||||||
for ( size_t cIdx = 0; cIdx < stimPlanCells.size(); ++cIdx )
|
for ( size_t cIdx = 0; cIdx < stimPlanCells.size(); ++cIdx )
|
||||||
{
|
{
|
||||||
if ( prCellResults[cIdx] > 1e-7 )
|
if ( stimPlanFracTemplate->isValidResult( prCellResults[cIdx] ) )
|
||||||
{
|
{
|
||||||
const RigFractureCell& stimPlanCell = stimPlanCells[cIdx];
|
const RigFractureCell& stimPlanCell = stimPlanCells[cIdx];
|
||||||
std::vector<cvf::Vec3d> stimPlanCellPolygon = stimPlanCell.getPolygon();
|
std::vector<cvf::Vec3d> stimPlanCellPolygon = stimPlanCell.getPolygon();
|
||||||
|
@ -68,6 +68,8 @@ public:
|
|||||||
size_t i,
|
size_t i,
|
||||||
size_t j ) = 0;
|
size_t j ) = 0;
|
||||||
|
|
||||||
|
virtual bool isValidResult( double value ) const = 0;
|
||||||
|
|
||||||
virtual QString getFileSelectionFilter() const = 0;
|
virtual QString getFileSelectionFilter() const = 0;
|
||||||
|
|
||||||
virtual std::vector<double> widthResultValues() const;
|
virtual std::vector<double> widthResultValues() const;
|
||||||
|
@ -838,3 +838,11 @@ void RimStimPlanFractureTemplate::appendTextIfValidValue( QString&
|
|||||||
body += QString( "%1: %2<br>" ).arg( name ).arg( RiaNumberFormat::valueToText( value, numberFormat, precision ) );
|
body += QString( "%1: %2<br>" ).arg( name ).arg( RiaNumberFormat::valueToText( value, numberFormat, precision ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimStimPlanFractureTemplate::isValidResult( double value ) const
|
||||||
|
{
|
||||||
|
return value > 1e-7;
|
||||||
|
}
|
||||||
|
@ -118,6 +118,8 @@ public:
|
|||||||
|
|
||||||
static std::pair<QString, QString> widthParameterNameAndUnit( cvf::ref<RigStimPlanFractureDefinition> def );
|
static std::pair<QString, QString> widthParameterNameAndUnit( cvf::ref<RigStimPlanFractureDefinition> def );
|
||||||
|
|
||||||
|
bool isValidResult( double value ) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initAfterRead() override;
|
void initAfterRead() override;
|
||||||
|
|
||||||
|
@ -704,3 +704,11 @@ std::pair<cvf::Vec3d, cvf::Vec3d> RimThermalFractureTemplate::computePositionAnd
|
|||||||
cvf::Vec3d rotation = cvf::Vec3d::UNDEFINED;
|
cvf::Vec3d rotation = cvf::Vec3d::UNDEFINED;
|
||||||
return std::make_pair( centerPosition, rotation );
|
return std::make_pair( centerPosition, rotation );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimThermalFractureTemplate::isValidResult( double value ) const
|
||||||
|
{
|
||||||
|
return !std::isinf( value ) && !std::isnan( value );
|
||||||
|
}
|
||||||
|
@ -75,6 +75,7 @@ public:
|
|||||||
const QString& unit,
|
const QString& unit,
|
||||||
MinMaxAccumulator& minMaxAccumulator,
|
MinMaxAccumulator& minMaxAccumulator,
|
||||||
PosNegAccumulator& posNegAccumulator ) const override;
|
PosNegAccumulator& posNegAccumulator ) const override;
|
||||||
|
bool isValidResult( double value ) const override;
|
||||||
|
|
||||||
void setDefaultConductivityResultIfEmpty();
|
void setDefaultConductivityResultIfEmpty();
|
||||||
bool setBorderPolygonResultNameToDefault();
|
bool setBorderPolygonResultNameToDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user