mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Clang-format after merge
This commit is contained in:
@@ -32,40 +32,48 @@
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
template <>
|
||||
void RimWellBoreStabilityPlot::ParameterSourceEnum::setUp()
|
||||
{
|
||||
addItem(RigGeoMechWellLogExtractor::AUTO, "AUTO", "Automatic");
|
||||
addItem(RigGeoMechWellLogExtractor::GRID, "GRID", "Grid");
|
||||
addItem(RigGeoMechWellLogExtractor::LAS_FILE, "LAS_FILE", "LAS File");
|
||||
addItem(RigGeoMechWellLogExtractor::ELEMENT_PROPERTY_TABLE, "ELEMENT_PROPERTY_TABLE", "Element Property Table");
|
||||
addItem(RigGeoMechWellLogExtractor::USER_DEFINED, "USER_DEFINED", "User Defined");
|
||||
addItem(RigGeoMechWellLogExtractor::HYDROSTATIC_PP, "HYDROSTATIC_PP", "Hydrostatic");
|
||||
setDefault(RigGeoMechWellLogExtractor::AUTO);
|
||||
addItem( RigGeoMechWellLogExtractor::AUTO, "AUTO", "Automatic" );
|
||||
addItem( RigGeoMechWellLogExtractor::GRID, "GRID", "Grid" );
|
||||
addItem( RigGeoMechWellLogExtractor::LAS_FILE, "LAS_FILE", "LAS File" );
|
||||
addItem( RigGeoMechWellLogExtractor::ELEMENT_PROPERTY_TABLE, "ELEMENT_PROPERTY_TABLE", "Element Property Table" );
|
||||
addItem( RigGeoMechWellLogExtractor::USER_DEFINED, "USER_DEFINED", "User Defined" );
|
||||
addItem( RigGeoMechWellLogExtractor::HYDROSTATIC_PP, "HYDROSTATIC_PP", "Hydrostatic" );
|
||||
setDefault( RigGeoMechWellLogExtractor::AUTO );
|
||||
}
|
||||
} // End namespace caf
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellBoreStabilityPlot, "WellBoreStabilityPlot");
|
||||
CAF_PDM_SOURCE_INIT( RimWellBoreStabilityPlot, "WellBoreStabilityPlot" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellBoreStabilityPlot::RimWellBoreStabilityPlot()
|
||||
{
|
||||
CAF_PDM_InitObject("Well Bore Stability Plot", ":/WellLogPlot16x16.png", "", "");
|
||||
CAF_PDM_InitObject( "Well Bore Stability Plot", ":/WellLogPlot16x16.png", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(
|
||||
&m_porePressureSource, "PorePressureSource", "Pore Pressure", "", "Data source for Pore Pressure", "");
|
||||
CAF_PDM_InitFieldNoDefault(
|
||||
&m_poissonRatioSource, "PoissionRatioSource", "Poisson Ratio", "", "Data source for Poisson Ratio", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_ucsSource, "UcsSource", "Uniaxial Compressive Strength", "", "Data source for UCS", "");
|
||||
CAF_PDM_InitFieldNoDefault( &m_porePressureSource,
|
||||
"PorePressureSource",
|
||||
"Pore Pressure",
|
||||
"",
|
||||
"Data source for Pore Pressure",
|
||||
"" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_poissonRatioSource,
|
||||
"PoissionRatioSource",
|
||||
"Poisson Ratio",
|
||||
"",
|
||||
"Data source for Poisson Ratio",
|
||||
"" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_ucsSource, "UcsSource", "Uniaxial Compressive Strength", "", "Data source for UCS", "" );
|
||||
|
||||
CAF_PDM_InitField(&m_userDefinedPoissionRatio, "UserPoissionRatio", 0.25, "", "", "User defined Poisson Ratio", "");
|
||||
m_userDefinedPoissionRatio.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
||||
CAF_PDM_InitField( &m_userDefinedPoissionRatio, "UserPoissionRatio", 0.25, "", "", "User defined Poisson Ratio", "" );
|
||||
m_userDefinedPoissionRatio.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
// Typical UCS: http://ceae.colorado.edu/~amadei/CVEN5768/PDF/NOTES8.pdf
|
||||
// Typical UCS for Shale is 5 - 100 MPa -> 50 - 1000 bar.
|
||||
CAF_PDM_InitField(&m_userDefinedUcs, "UserUcs", 100.0, "", "", "User defined UCS [bar]", "");
|
||||
m_userDefinedUcs.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
||||
CAF_PDM_InitField( &m_userDefinedUcs, "UserUcs", 100.0, "", "", "User defined UCS [bar]", "" );
|
||||
m_userDefinedUcs.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -111,110 +119,111 @@ double RimWellBoreStabilityPlot::userDefinedUcs() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellBoreStabilityPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
void RimWellBoreStabilityPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
caf::PdmUiGroup* parameterSources = uiOrdering.addNewGroup("Parameter Sources");
|
||||
parameterSources->add(&m_porePressureSource);
|
||||
parameterSources->add(&m_poissonRatioSource);
|
||||
parameterSources->add(&m_userDefinedPoissionRatio, {false, 1, 1});
|
||||
parameterSources->add(&m_ucsSource);
|
||||
parameterSources->add(&m_userDefinedUcs, {false, 1, 1});
|
||||
caf::PdmUiGroup* parameterSources = uiOrdering.addNewGroup( "Parameter Sources" );
|
||||
parameterSources->add( &m_porePressureSource );
|
||||
parameterSources->add( &m_poissonRatioSource );
|
||||
parameterSources->add( &m_userDefinedPoissionRatio, {false, 1, 1} );
|
||||
parameterSources->add( &m_ucsSource );
|
||||
parameterSources->add( &m_userDefinedUcs, {false, 1, 1} );
|
||||
|
||||
m_userDefinedPoissionRatio.uiCapability()->setUiReadOnly(m_poissonRatioSource() != RigGeoMechWellLogExtractor::USER_DEFINED);
|
||||
m_userDefinedUcs.uiCapability()->setUiReadOnly(m_ucsSource() != RigGeoMechWellLogExtractor::USER_DEFINED);
|
||||
RimWellLogPlot::defineUiOrdering(uiConfigName, uiOrdering);
|
||||
m_userDefinedPoissionRatio.uiCapability()->setUiReadOnly( m_poissonRatioSource() !=
|
||||
RigGeoMechWellLogExtractor::USER_DEFINED );
|
||||
m_userDefinedUcs.uiCapability()->setUiReadOnly( m_ucsSource() != RigGeoMechWellLogExtractor::USER_DEFINED );
|
||||
RimWellLogPlot::defineUiOrdering( uiConfigName, uiOrdering );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimWellBoreStabilityPlot::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly)
|
||||
QList<caf::PdmOptionItemInfo>
|
||||
RimWellBoreStabilityPlot::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options = RimWellLogPlot::calculateValueOptions(fieldNeedingOptions, useOptionsOnly);
|
||||
QList<caf::PdmOptionItemInfo> options = RimWellLogPlot::calculateValueOptions( fieldNeedingOptions, useOptionsOnly );
|
||||
|
||||
RimWellPath* wellPath = m_commonDataSource->wellPathToApply();
|
||||
RimGeoMechCase* geoMechCase = dynamic_cast<RimGeoMechCase*>(m_commonDataSource->caseToApply());
|
||||
RimGeoMechCase* geoMechCase = dynamic_cast<RimGeoMechCase*>( m_commonDataSource->caseToApply() );
|
||||
int timeStep = m_commonDataSource->timeStepToApply();
|
||||
|
||||
RigFemPartResultsCollection* femPartResults = nullptr;
|
||||
if (geoMechCase)
|
||||
if ( geoMechCase )
|
||||
{
|
||||
femPartResults = geoMechCase->geoMechData()->femPartResults();
|
||||
}
|
||||
|
||||
if (fieldNeedingOptions == &m_porePressureSource)
|
||||
if ( fieldNeedingOptions == &m_porePressureSource )
|
||||
{
|
||||
for (auto source : RigGeoMechWellLogExtractor::supportedSourcesForPorePressure())
|
||||
for ( auto source : RigGeoMechWellLogExtractor::supportedSourcesForPorePressure() )
|
||||
{
|
||||
if (source == RigGeoMechWellLogExtractor::LAS_FILE)
|
||||
if ( source == RigGeoMechWellLogExtractor::LAS_FILE )
|
||||
{
|
||||
if (wellPath && !RimWellLogFile::findMdAndChannelValuesForWellPath(wellPath, "PP").empty())
|
||||
if ( wellPath && !RimWellLogFile::findMdAndChannelValuesForWellPath( wellPath, "PP" ).empty() )
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(ParameterSourceEnum::uiText(source), source));
|
||||
options.push_back( caf::PdmOptionItemInfo( ParameterSourceEnum::uiText( source ), source ) );
|
||||
}
|
||||
}
|
||||
else if (source == RigGeoMechWellLogExtractor::ELEMENT_PROPERTY_TABLE)
|
||||
else if ( source == RigGeoMechWellLogExtractor::ELEMENT_PROPERTY_TABLE )
|
||||
{
|
||||
RigFemResultAddress resAddr(RIG_ELEMENT, "POR", "");
|
||||
if (timeStep > 0 && femPartResults && !femPartResults->resultValues(resAddr, 0, timeStep).empty())
|
||||
RigFemResultAddress resAddr( RIG_ELEMENT, "POR", "" );
|
||||
if ( timeStep > 0 && femPartResults && !femPartResults->resultValues( resAddr, 0, timeStep ).empty() )
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(ParameterSourceEnum::uiText(source), source));
|
||||
options.push_back( caf::PdmOptionItemInfo( ParameterSourceEnum::uiText( source ), source ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(ParameterSourceEnum::uiText(source), source));
|
||||
options.push_back( caf::PdmOptionItemInfo( ParameterSourceEnum::uiText( source ), source ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_poissonRatioSource)
|
||||
else if ( fieldNeedingOptions == &m_poissonRatioSource )
|
||||
{
|
||||
for (auto source : RigGeoMechWellLogExtractor::supportedSourcesForPoissonRatio())
|
||||
for ( auto source : RigGeoMechWellLogExtractor::supportedSourcesForPoissonRatio() )
|
||||
{
|
||||
if (source == RigGeoMechWellLogExtractor::LAS_FILE)
|
||||
if ( source == RigGeoMechWellLogExtractor::LAS_FILE )
|
||||
{
|
||||
if (wellPath && !RimWellLogFile::findMdAndChannelValuesForWellPath(wellPath, "POISSON_RATIO").empty())
|
||||
if ( wellPath && !RimWellLogFile::findMdAndChannelValuesForWellPath( wellPath, "POISSON_RATIO" ).empty() )
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(ParameterSourceEnum::uiText(source), source));
|
||||
options.push_back( caf::PdmOptionItemInfo( ParameterSourceEnum::uiText( source ), source ) );
|
||||
}
|
||||
}
|
||||
else if (source == RigGeoMechWellLogExtractor::ELEMENT_PROPERTY_TABLE)
|
||||
else if ( source == RigGeoMechWellLogExtractor::ELEMENT_PROPERTY_TABLE )
|
||||
{
|
||||
RigFemResultAddress resAddr(RIG_ELEMENT, "RATIO", "");
|
||||
if (timeStep > 0 && femPartResults && !femPartResults->resultValues(resAddr, 0, timeStep).empty())
|
||||
RigFemResultAddress resAddr( RIG_ELEMENT, "RATIO", "" );
|
||||
if ( timeStep > 0 && femPartResults && !femPartResults->resultValues( resAddr, 0, timeStep ).empty() )
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(ParameterSourceEnum::uiText(source), source));
|
||||
options.push_back( caf::PdmOptionItemInfo( ParameterSourceEnum::uiText( source ), source ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(ParameterSourceEnum::uiText(source), source));
|
||||
options.push_back( caf::PdmOptionItemInfo( ParameterSourceEnum::uiText( source ), source ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_ucsSource)
|
||||
else if ( fieldNeedingOptions == &m_ucsSource )
|
||||
{
|
||||
for (auto source : RigGeoMechWellLogExtractor::supportedSourcesForUcs())
|
||||
for ( auto source : RigGeoMechWellLogExtractor::supportedSourcesForUcs() )
|
||||
{
|
||||
if (source == RigGeoMechWellLogExtractor::LAS_FILE)
|
||||
if ( source == RigGeoMechWellLogExtractor::LAS_FILE )
|
||||
{
|
||||
if (wellPath && !RimWellLogFile::findMdAndChannelValuesForWellPath(wellPath, "UCS").empty())
|
||||
if ( wellPath && !RimWellLogFile::findMdAndChannelValuesForWellPath( wellPath, "UCS" ).empty() )
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(ParameterSourceEnum::uiText(source), source));
|
||||
options.push_back( caf::PdmOptionItemInfo( ParameterSourceEnum::uiText( source ), source ) );
|
||||
}
|
||||
}
|
||||
else if (source == RigGeoMechWellLogExtractor::ELEMENT_PROPERTY_TABLE)
|
||||
else if ( source == RigGeoMechWellLogExtractor::ELEMENT_PROPERTY_TABLE )
|
||||
{
|
||||
RigFemResultAddress resAddr(RIG_ELEMENT, "UCS", "");
|
||||
if (timeStep > 0 && femPartResults && !femPartResults->resultValues(resAddr, 0, timeStep).empty())
|
||||
RigFemResultAddress resAddr( RIG_ELEMENT, "UCS", "" );
|
||||
if ( timeStep > 0 && femPartResults && !femPartResults->resultValues( resAddr, 0, timeStep ).empty() )
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(ParameterSourceEnum::uiText(source), source));
|
||||
options.push_back( caf::PdmOptionItemInfo( ParameterSourceEnum::uiText( source ), source ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(ParameterSourceEnum::uiText(source), source));
|
||||
options.push_back( caf::PdmOptionItemInfo( ParameterSourceEnum::uiText( source ), source ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,14 +233,14 @@ QList<caf::PdmOptionItemInfo> RimWellBoreStabilityPlot::calculateValueOptions(co
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellBoreStabilityPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
void RimWellBoreStabilityPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
{
|
||||
RimWellLogPlot::fieldChangedByUi(changedField, oldValue, newValue);
|
||||
RimWellLogPlot::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
|
||||
if (changedField == &m_porePressureSource || changedField == &m_poissonRatioSource || changedField == &m_ucsSource ||
|
||||
changedField == &m_userDefinedPoissionRatio || changedField == &m_userDefinedUcs)
|
||||
if ( changedField == &m_porePressureSource || changedField == &m_poissonRatioSource || changedField == &m_ucsSource ||
|
||||
changedField == &m_userDefinedPoissionRatio || changedField == &m_userDefinedUcs )
|
||||
{
|
||||
this->loadDataAndUpdate();
|
||||
}
|
||||
|
||||
@@ -278,12 +278,12 @@ std::set<RifEclipseSummaryAddress> RimSummaryCaseCollection::ensembleSummaryAddr
|
||||
}
|
||||
}
|
||||
|
||||
if (maxAddrIndex >= 0 && m_cases[maxAddrIndex]->summaryReader())
|
||||
{
|
||||
const std::set<RifEclipseSummaryAddress>& addrs = m_cases[maxAddrIndex]->summaryReader()->allResultAddresses();
|
||||
addresses.insert(addrs.begin(), addrs.end());
|
||||
}
|
||||
return addresses;
|
||||
if ( maxAddrIndex >= 0 && m_cases[maxAddrIndex]->summaryReader() )
|
||||
{
|
||||
const std::set<RifEclipseSummaryAddress>& addrs = m_cases[maxAddrIndex]->summaryReader()->allResultAddresses();
|
||||
addresses.insert( addrs.begin(), addrs.end() );
|
||||
}
|
||||
return addresses;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -513,18 +513,21 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
if ( plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE )
|
||||
{
|
||||
auto reader = summaryCaseY()->summaryReader();
|
||||
if (reader)
|
||||
if ( reader )
|
||||
{
|
||||
auto errAddress = reader->errorAddress(summaryAddressY());
|
||||
if (errAddress.isValid())
|
||||
auto errAddress = reader->errorAddress( summaryAddressY() );
|
||||
if ( errAddress.isValid() )
|
||||
{
|
||||
std::vector<double> errValues;
|
||||
reader->values(errAddress, &errValues);
|
||||
m_qwtPlotCurve->setSamplesFromTimeTAndYValues(curveTimeStepsY, curveValuesY, errValues, isLogCurve);
|
||||
reader->values( errAddress, &errValues );
|
||||
m_qwtPlotCurve->setSamplesFromTimeTAndYValues( curveTimeStepsY,
|
||||
curveValuesY,
|
||||
errValues,
|
||||
isLogCurve );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_qwtPlotCurve->setSamplesFromTimeTAndYValues(curveTimeStepsY, curveValuesY, isLogCurve);
|
||||
m_qwtPlotCurve->setSamplesFromTimeTAndYValues( curveTimeStepsY, curveValuesY, isLogCurve );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -583,12 +583,12 @@ std::vector<RifSummaryReaderInterface*> RimSummaryPlotSourceStepping::summaryRea
|
||||
{
|
||||
for ( auto curve : curveCollection->curves() )
|
||||
{
|
||||
if (isYAxisStepping() && curve->summaryCaseY() && curve->summaryCaseY()->summaryReader())
|
||||
if ( isYAxisStepping() && curve->summaryCaseY() && curve->summaryCaseY()->summaryReader() )
|
||||
{
|
||||
readers.push_back( curve->summaryCaseY()->summaryReader() );
|
||||
}
|
||||
|
||||
if (isXAxisStepping() && curve->summaryCaseX() && curve->summaryCaseX()->summaryReader())
|
||||
if ( isXAxisStepping() && curve->summaryCaseX() && curve->summaryCaseX()->summaryReader() )
|
||||
{
|
||||
readers.push_back( curve->summaryCaseX()->summaryReader() );
|
||||
}
|
||||
@@ -604,7 +604,7 @@ std::vector<RifSummaryReaderInterface*> RimSummaryPlotSourceStepping::summaryRea
|
||||
{
|
||||
for ( auto curve : curveSet->curves() )
|
||||
{
|
||||
if (isYAxisStepping() && curve->summaryCaseY() && curve->summaryCaseY()->summaryReader())
|
||||
if ( isYAxisStepping() && curve->summaryCaseY() && curve->summaryCaseY()->summaryReader() )
|
||||
{
|
||||
readers.push_back( curve->summaryCaseY()->summaryReader() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user