mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Update clang-format.yml (#10068)
* Update to clang-format-15 Removed two custom .clang-format files in subfolders of AppFwk * Fixes by clang-format
This commit is contained in:
15
.github/workflows/clang-format.yml
vendored
15
.github/workflows/clang-format.yml
vendored
@@ -4,7 +4,7 @@ on: [push]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clang-format-job:
|
clang-format-job:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Set apt mirror
|
- name: Set apt mirror
|
||||||
# GitHub Actions apt proxy is super unstable
|
# GitHub Actions apt proxy is super unstable
|
||||||
@@ -15,25 +15,26 @@ jobs:
|
|||||||
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
|
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
|
||||||
sudo sed -i 's/http:\/\/azure.archive.ubuntu.com\/ubuntu\//mirror+file:\/etc\/apt\/mirrors.txt/' /etc/apt/sources.list
|
sudo sed -i 's/http:\/\/azure.archive.ubuntu.com\/ubuntu\//mirror+file:\/etc\/apt\/mirrors.txt/' /etc/apt/sources.list
|
||||||
|
|
||||||
- name: Install clang-format 10.0
|
- name: Install clang-format 15.0
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install --option="APT::Acquire::Retries=3" clang-format-10
|
sudo apt-get update
|
||||||
clang-format-10 --version
|
sudo apt-get install --option="APT::Acquire::Retries=3" clang-format-15
|
||||||
|
clang-format-15 --version
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Check format - ApplicationLibCode
|
- name: Check format - ApplicationLibCode
|
||||||
run: |
|
run: |
|
||||||
cd ApplicationLibCode
|
cd ApplicationLibCode
|
||||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-10 -i
|
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-15 -i
|
||||||
git diff
|
git diff
|
||||||
- name: Check format - ApplicationExeCode
|
- name: Check format - ApplicationExeCode
|
||||||
run: |
|
run: |
|
||||||
cd ApplicationExeCode
|
cd ApplicationExeCode
|
||||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-10 -i
|
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-15 -i
|
||||||
git diff
|
git diff
|
||||||
- name: Check format - AppFwk
|
- name: Check format - AppFwk
|
||||||
run: |
|
run: |
|
||||||
cd Fwk/AppFwk
|
cd Fwk/AppFwk
|
||||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | grep -v gtest | xargs clang-format-10 -i
|
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | grep -v gtest | xargs clang-format-15 -i
|
||||||
git diff
|
git diff
|
||||||
- uses: peter-evans/create-pull-request@v4
|
- uses: peter-evans/create-pull-request@v4
|
||||||
with:
|
with:
|
||||||
|
@@ -48,7 +48,7 @@ private:
|
|||||||
~RiaCompletionTypeCalculationScheduler() override;
|
~RiaCompletionTypeCalculationScheduler() override;
|
||||||
|
|
||||||
RiaCompletionTypeCalculationScheduler( const RiaCompletionTypeCalculationScheduler& o ) = delete;
|
RiaCompletionTypeCalculationScheduler( const RiaCompletionTypeCalculationScheduler& o ) = delete;
|
||||||
void operator=( const RiaCompletionTypeCalculationScheduler& o ) = delete;
|
void operator=( const RiaCompletionTypeCalculationScheduler& o ) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<caf::PdmPointer<RimEclipseCase>> m_eclipseCasesToRecalculate;
|
std::vector<caf::PdmPointer<RimEclipseCase>> m_eclipseCasesToRecalculate;
|
||||||
|
@@ -1446,10 +1446,10 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences*
|
|||||||
reply = QMessageBox::question( activeMainWindow(),
|
reply = QMessageBox::question( activeMainWindow(),
|
||||||
QString( "Apply %1 to Existing Views or Plots?" ).arg( listString ),
|
QString( "Apply %1 to Existing Views or Plots?" ).arg( listString ),
|
||||||
QString( "You have changed default %1 and have existing views or plots with "
|
QString( "You have changed default %1 and have existing views or plots with "
|
||||||
"different settings.\n" )
|
"different settings.\n" )
|
||||||
.arg( listString ) +
|
.arg( listString ) +
|
||||||
QString( "Do you want to apply the new default settings to all existing "
|
QString( "Do you want to apply the new default settings to all existing "
|
||||||
"views?" ),
|
"views?" ),
|
||||||
QMessageBox::Ok | QMessageBox::Cancel );
|
QMessageBox::Ok | QMessageBox::Cancel );
|
||||||
applySettingsToAllViews = ( reply == QMessageBox::Ok );
|
applySettingsToAllViews = ( reply == QMessageBox::Ok );
|
||||||
}
|
}
|
||||||
@@ -1674,7 +1674,7 @@ bool RiaGuiApplication::notify( QObject* receiver, QEvent* event )
|
|||||||
memoryExhaustedBox = new QMessageBox( QMessageBox::Critical,
|
memoryExhaustedBox = new QMessageBox( QMessageBox::Critical,
|
||||||
"ResInsight Exhausted Memory",
|
"ResInsight Exhausted Memory",
|
||||||
"Memory is Exhausted!\n ResInsight could not allocate the memory needed, and is now "
|
"Memory is Exhausted!\n ResInsight could not allocate the memory needed, and is now "
|
||||||
"unstable and will probably crash soon." );
|
"unstable and will probably crash soon." );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool done = false;
|
bool done = false;
|
||||||
|
@@ -64,12 +64,14 @@ QDateTime RiaDateStringParser::parseDateString( const std::string& dateString, O
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RiaDateStringParser::parseDateStringWithSeparators( const std::string& dateString, int& year, int& month, int& day, OrderPreference preference )
|
bool RiaDateStringParser::parseDateStringWithSeparators( const std::string& dateString, int& year, int& month, int& day, OrderPreference preference )
|
||||||
{
|
{
|
||||||
auto tryParseAllYearFirst = []( const std::string& dateString, int& year, int& month, int& day ) {
|
auto tryParseAllYearFirst = []( const std::string& dateString, int& year, int& month, int& day )
|
||||||
|
{
|
||||||
return tryParseYearFirst( dateString, year, month, day ) || tryParseDayFirst( dateString, year, month, day ) ||
|
return tryParseYearFirst( dateString, year, month, day ) || tryParseDayFirst( dateString, year, month, day ) ||
|
||||||
tryParseMonthFirst( dateString, year, month, day );
|
tryParseMonthFirst( dateString, year, month, day );
|
||||||
};
|
};
|
||||||
|
|
||||||
auto tryParseAllDayFirst = []( const std::string& dateString, int& year, int& month, int& day ) {
|
auto tryParseAllDayFirst = []( const std::string& dateString, int& year, int& month, int& day )
|
||||||
|
{
|
||||||
return tryParseDayFirst( dateString, year, month, day ) || tryParseYearFirst( dateString, year, month, day ) ||
|
return tryParseDayFirst( dateString, year, month, day ) || tryParseYearFirst( dateString, year, month, day ) ||
|
||||||
tryParseMonthFirst( dateString, year, month, day );
|
tryParseMonthFirst( dateString, year, month, day );
|
||||||
};
|
};
|
||||||
@@ -83,12 +85,14 @@ bool RiaDateStringParser::parseDateStringWithSeparators( const std::string& date
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RiaDateStringParser::parseDateStringWithoutSeparators( const std::string& dateString, int& year, int& month, int& day, OrderPreference preference )
|
bool RiaDateStringParser::parseDateStringWithoutSeparators( const std::string& dateString, int& year, int& month, int& day, OrderPreference preference )
|
||||||
{
|
{
|
||||||
auto tryParseAllYearFirstNoSeparators = []( const std::string& dateString, int& year, int& month, int& day ) {
|
auto tryParseAllYearFirstNoSeparators = []( const std::string& dateString, int& year, int& month, int& day )
|
||||||
|
{
|
||||||
return tryParseYearFirstNoSeparators( dateString, year, month, day ) ||
|
return tryParseYearFirstNoSeparators( dateString, year, month, day ) ||
|
||||||
tryParseDayFirstNoSeparators( dateString, year, month, day ) || tryParseMonthFirstNoSeparators( dateString, year, month, day );
|
tryParseDayFirstNoSeparators( dateString, year, month, day ) || tryParseMonthFirstNoSeparators( dateString, year, month, day );
|
||||||
};
|
};
|
||||||
|
|
||||||
auto tryParseAllDayFirstNoSeparators = []( const std::string& dateString, int& year, int& month, int& day ) {
|
auto tryParseAllDayFirstNoSeparators = []( const std::string& dateString, int& year, int& month, int& day )
|
||||||
|
{
|
||||||
return tryParseDayFirstNoSeparators( dateString, year, month, day ) || tryParseYearFirstNoSeparators( dateString, year, month, day ) ||
|
return tryParseDayFirstNoSeparators( dateString, year, month, day ) || tryParseYearFirstNoSeparators( dateString, year, month, day ) ||
|
||||||
tryParseMonthFirstNoSeparators( dateString, year, month, day );
|
tryParseMonthFirstNoSeparators( dateString, year, month, day );
|
||||||
};
|
};
|
||||||
|
@@ -61,11 +61,11 @@ void RiaImageTools::distanceTransform2d( std::vector<std::vector<unsigned int>>&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto f = []( int64_t x, int64_t i, const std::vector<std::vector<int64_t>>& g, int64_t y ) {
|
auto f = []( int64_t x, int64_t i, const std::vector<std::vector<int64_t>>& g, int64_t y )
|
||||||
return ( x - i ) * ( x - i ) + g[i][y] * g[i][y];
|
{ return ( x - i ) * ( x - i ) + g[i][y] * g[i][y]; };
|
||||||
};
|
|
||||||
|
|
||||||
auto sep = []( int64_t i, int64_t u, const std::vector<std::vector<int64_t>>& g, int64_t y ) {
|
auto sep = []( int64_t i, int64_t u, const std::vector<std::vector<int64_t>>& g, int64_t y )
|
||||||
|
{
|
||||||
if ( i == u ) return (int64_t)0;
|
if ( i == u ) return (int64_t)0;
|
||||||
|
|
||||||
int64_t numerator = u * u - i * i + g[u][y] * g[u][y] - g[i][y] * g[i][y];
|
int64_t numerator = u * u - i * i + g[u][y] * g[u][y] - g[i][y] * g[i][y];
|
||||||
|
@@ -89,7 +89,7 @@ public:
|
|||||||
dateFormatString( const QString& fullDateFormat,
|
dateFormatString( const QString& fullDateFormat,
|
||||||
RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
|
RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
|
||||||
static QString
|
static QString
|
||||||
timeFormatString( const QString& fullTimeFormat,
|
timeFormatString( const QString& fullTimeFormat,
|
||||||
RiaDefines::TimeFormatComponents timeComponents = RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND );
|
RiaDefines::TimeFormatComponents timeComponents = RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND );
|
||||||
|
|
||||||
static QList<caf::PdmOptionItemInfo> createOptionItems( const std::vector<time_t>& timeSteps );
|
static QList<caf::PdmOptionItemInfo> createOptionItems( const std::vector<time_t>& timeSteps );
|
||||||
|
@@ -33,10 +33,13 @@ std::vector<const RigWellPath*> RiaSimWellBranchTools::simulationWellBranches( c
|
|||||||
{
|
{
|
||||||
std::vector<RimEclipseCase*> simCases = RimEclipseCaseTools::eclipseCases();
|
std::vector<RimEclipseCase*> simCases = RimEclipseCaseTools::eclipseCases();
|
||||||
|
|
||||||
auto caseItr = std::find_if( simCases.begin(), simCases.end(), [&simWellName]( const RimEclipseCase* eclCase ) {
|
auto caseItr = std::find_if( simCases.begin(),
|
||||||
const auto& eclData = eclCase->eclipseCaseData();
|
simCases.end(),
|
||||||
return eclData != nullptr && eclData->hasSimulationWell( simWellName );
|
[&simWellName]( const RimEclipseCase* eclCase )
|
||||||
} );
|
{
|
||||||
|
const auto& eclData = eclCase->eclipseCaseData();
|
||||||
|
return eclData != nullptr && eclData->hasSimulationWell( simWellName );
|
||||||
|
} );
|
||||||
RimEclipseCase* eclipseCase = caseItr != simCases.end() ? *caseItr : nullptr;
|
RimEclipseCase* eclipseCase = caseItr != simCases.end() ? *caseItr : nullptr;
|
||||||
RigEclipseCaseData* eclCaseData = eclipseCase != nullptr ? eclipseCase->eclipseCaseData() : nullptr;
|
RigEclipseCaseData* eclCaseData = eclipseCase != nullptr ? eclipseCase->eclipseCaseData() : nullptr;
|
||||||
return eclCaseData != nullptr ? eclCaseData->simulationWellBranches( simWellName, false, useAutoDetectionOfBranches )
|
return eclCaseData != nullptr ? eclCaseData->simulationWellBranches( simWellName, false, useAutoDetectionOfBranches )
|
||||||
|
@@ -80,9 +80,8 @@ void RiaStdStringTools::splitByDelimiter( const std::string& str, Container& con
|
|||||||
template <typename InputIt>
|
template <typename InputIt>
|
||||||
std::string join( InputIt begin, InputIt end, const std::string& separator = ", " )
|
std::string join( InputIt begin, InputIt end, const std::string& separator = ", " )
|
||||||
{
|
{
|
||||||
auto compose_key = [&separator]( std::string& key, const std::string& key_part ) -> std::string {
|
auto compose_key = [&separator]( std::string& key, const std::string& key_part ) -> std::string
|
||||||
return key.empty() ? key_part : key + separator + key_part;
|
{ return key.empty() ? key_part : key + separator + key_part; };
|
||||||
};
|
|
||||||
|
|
||||||
return std::accumulate( begin, end, std::string(), compose_key );
|
return std::accumulate( begin, end, std::string(), compose_key );
|
||||||
}
|
}
|
||||||
|
@@ -243,7 +243,7 @@ QStringList RiaSummaryStringTools::dataSourceNames( const std::vector<RimSummary
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::set<RifEclipseSummaryAddress> RiaSummaryStringTools::computeFilteredAddresses( const QStringList& textFilters,
|
std::set<RifEclipseSummaryAddress> RiaSummaryStringTools::computeFilteredAddresses( const QStringList& textFilters,
|
||||||
const std::set<RifEclipseSummaryAddress>& sourceAddresses,
|
const std::set<RifEclipseSummaryAddress>& sourceAddresses,
|
||||||
bool includeDiffCurves )
|
bool includeDiffCurves )
|
||||||
{
|
{
|
||||||
|
@@ -79,11 +79,14 @@ QString RiaWellNameComparer::tryMatchNameInList( QString searchName, const std::
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Try matching ignoring spaces, dashes and underscores
|
// Try matching ignoring spaces, dashes and underscores
|
||||||
matchedName = tryMatchName( searchName, nameList, []( const QString& str ) {
|
matchedName = tryMatchName( searchName,
|
||||||
QString s = str;
|
nameList,
|
||||||
s = removeWellNamePrefix( s );
|
[]( const QString& str )
|
||||||
return s.remove( ' ' ).remove( '-' ).remove( '_' );
|
{
|
||||||
} );
|
QString s = str;
|
||||||
|
s = removeWellNamePrefix( s );
|
||||||
|
return s.remove( ' ' ).remove( '-' ).remove( '_' );
|
||||||
|
} );
|
||||||
|
|
||||||
if ( !matchedName.isEmpty() )
|
if ( !matchedName.isEmpty() )
|
||||||
{
|
{
|
||||||
|
@@ -223,8 +223,8 @@ void RiaSCurveCalculator::initializeByFinding_q1q2( cvf::Vec3d p1, double azi1,
|
|||||||
const double maxStepSize = 1.0e9;
|
const double maxStepSize = 1.0e9;
|
||||||
const double maxLengthToQ = 1.0e10;
|
const double maxLengthToQ = 1.0e10;
|
||||||
bool enableBackstepping = false;
|
bool enableBackstepping = false;
|
||||||
//#define USE_JACOBI_UPDATE
|
// #define USE_JACOBI_UPDATE
|
||||||
//#define DEBUG_OUTPUT_ON
|
// #define DEBUG_OUTPUT_ON
|
||||||
|
|
||||||
// Needs the initial partial derivatives to see the direction of change
|
// Needs the initial partial derivatives to see the direction of change
|
||||||
// dR1/dq1, dR1/dq2, dR2/dq1, dR2/dq2
|
// dR1/dq1, dR1/dq2, dR2/dq1, dR2/dq2
|
||||||
|
@@ -78,7 +78,7 @@ RimStimPlanModelPlot* RicNewStimPlanModelPlotFeature::createPlot( RimStimPlanMod
|
|||||||
plot->setStimPlanModel( stimPlanModel );
|
plot->setStimPlanModel( stimPlanModel );
|
||||||
|
|
||||||
{
|
{
|
||||||
auto task = progInfo.task( "Creating formation track", 2 );
|
auto task = progInfo.task( "Creating formation track", 2 );
|
||||||
RimEclipseCase* formationEclipseCase = stimPlanModel->eclipseCaseForType( RimExtractionConfiguration::EclipseCaseType::STATIC_CASE );
|
RimEclipseCase* formationEclipseCase = stimPlanModel->eclipseCaseForType( RimExtractionConfiguration::EclipseCaseType::STATIC_CASE );
|
||||||
createFormationTrack( plot, stimPlanModel, formationEclipseCase );
|
createFormationTrack( plot, stimPlanModel, formationEclipseCase );
|
||||||
}
|
}
|
||||||
|
@@ -704,7 +704,8 @@ std::vector<cvf::Vec3d> RicExportFractureCompletionsImpl::computeWellPointsInFra
|
|||||||
RiaLogging::info( QString( "Angle: %1 degrees." ).arg( cvf::Math::toDegrees( angle ) ) );
|
RiaLogging::info( QString( "Angle: %1 degrees." ).arg( cvf::Math::toDegrees( angle ) ) );
|
||||||
auto rotMat = cvf::GeometryTools::rotationMatrixBetweenVectors( directionToStartPos, directionToStartPosInFracturePlane );
|
auto rotMat = cvf::GeometryTools::rotationMatrixBetweenVectors( directionToStartPos, directionToStartPosInFracturePlane );
|
||||||
|
|
||||||
auto rotatePoint = []( const cvf::Vec3d& point, const cvf::Vec3d& offset, auto rotMat ) {
|
auto rotatePoint = []( const cvf::Vec3d& point, const cvf::Vec3d& offset, auto rotMat )
|
||||||
|
{
|
||||||
cvf::Vec3d p = point - offset;
|
cvf::Vec3d p = point - offset;
|
||||||
p.transformPoint( rotMat );
|
p.transformPoint( rotMat );
|
||||||
p += offset;
|
p += offset;
|
||||||
|
@@ -412,7 +412,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::computeStaticCompletionsForWellPath( RimWellPath* wellPath,
|
std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::computeStaticCompletionsForWellPath( RimWellPath* wellPath,
|
||||||
RimEclipseCase* eclipseCase )
|
RimEclipseCase* eclipseCase )
|
||||||
{
|
{
|
||||||
std::vector<RigCompletionData> completionsPerEclipseCell;
|
std::vector<RigCompletionData> completionsPerEclipseCell;
|
||||||
@@ -448,7 +448,7 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::compu
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::computeDynamicCompletionsForWellPath( RimWellPath* wellPath,
|
std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::computeDynamicCompletionsForWellPath( RimWellPath* wellPath,
|
||||||
RimEclipseCase* eclipseCase,
|
RimEclipseCase* eclipseCase,
|
||||||
size_t timeStepIndex )
|
size_t timeStepIndex )
|
||||||
{
|
{
|
||||||
@@ -761,8 +761,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspecsToFile( RimEclips
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile( RimEclipseCase* gridCase,
|
void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile( RimEclipseCase* gridCase,
|
||||||
QFilePtr exportFile,
|
QFilePtr exportFile,
|
||||||
const std::map<QString, std::vector<RigCompletionData>>& completions )
|
const std::map<QString, std::vector<RigCompletionData>>& completions )
|
||||||
{
|
{
|
||||||
QTextStream stream( exportFile.get() );
|
QTextStream stream( exportFile.get() );
|
||||||
|
@@ -102,14 +102,14 @@ public:
|
|||||||
calculateCellMainDirection( RimEclipseCase* eclipseCase, size_t globalCellIndex, const cvf::Vec3d& lengthsInCell );
|
calculateCellMainDirection( RimEclipseCase* eclipseCase, size_t globalCellIndex, const cvf::Vec3d& lengthsInCell );
|
||||||
|
|
||||||
static TransmissibilityData
|
static TransmissibilityData
|
||||||
calculateTransmissibilityData( RimEclipseCase* eclipseCase,
|
calculateTransmissibilityData( RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
const cvf::Vec3d& internalCellLengths,
|
const cvf::Vec3d& internalCellLengths,
|
||||||
double skinFactor,
|
double skinFactor,
|
||||||
double wellRadius,
|
double wellRadius,
|
||||||
size_t globalCellIndex,
|
size_t globalCellIndex,
|
||||||
bool useLateralNTG,
|
bool useLateralNTG,
|
||||||
size_t volumeScaleConstant = 1,
|
size_t volumeScaleConstant = 1,
|
||||||
RigCompletionData::CellDirection directionForVolumeScaling = RigCompletionData::CellDirection::DIR_I );
|
RigCompletionData::CellDirection directionForVolumeScaling = RigCompletionData::CellDirection::DIR_I );
|
||||||
|
|
||||||
static double calculateDFactor( RimEclipseCase* eclipseCase,
|
static double calculateDFactor( RimEclipseCase* eclipseCase,
|
||||||
|
@@ -115,14 +115,18 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( c
|
|||||||
auto allCompletions = wellPath->allCompletionsRecursively();
|
auto allCompletions = wellPath->allCompletionsRecursively();
|
||||||
|
|
||||||
bool exportFractures =
|
bool exportFractures =
|
||||||
exportSettings.includeFractures() && std::any_of( allCompletions.begin(), allCompletions.end(), []( auto completion ) {
|
exportSettings.includeFractures() &&
|
||||||
return completion->isEnabled() && completion->componentType() == RiaDefines::WellPathComponentType::FRACTURE;
|
std::any_of( allCompletions.begin(),
|
||||||
} );
|
allCompletions.end(),
|
||||||
|
[]( auto completion )
|
||||||
|
{ return completion->isEnabled() && completion->componentType() == RiaDefines::WellPathComponentType::FRACTURE; } );
|
||||||
|
|
||||||
bool exportFishbones =
|
bool exportFishbones =
|
||||||
exportSettings.includeFishbones() && std::any_of( allCompletions.begin(), allCompletions.end(), []( auto completion ) {
|
exportSettings.includeFishbones() &&
|
||||||
return completion->isEnabled() && completion->componentType() == RiaDefines::WellPathComponentType::FISHBONES;
|
std::any_of( allCompletions.begin(),
|
||||||
} );
|
allCompletions.end(),
|
||||||
|
[]( auto completion )
|
||||||
|
{ return completion->isEnabled() && completion->componentType() == RiaDefines::WellPathComponentType::FISHBONES; } );
|
||||||
|
|
||||||
if ( exportSettings.fileSplit() == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL && !unifiedWellPathFile )
|
if ( exportSettings.fileSplit() == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL && !unifiedWellPathFile )
|
||||||
{
|
{
|
||||||
@@ -157,11 +161,14 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( c
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool anyPerforationsPresent =
|
bool anyPerforationsPresent = exportSettings.includeFractures() &&
|
||||||
exportSettings.includeFractures() && std::any_of( allCompletions.begin(), allCompletions.end(), []( auto completion ) {
|
std::any_of( allCompletions.begin(),
|
||||||
return completion->isEnabled() &&
|
allCompletions.end(),
|
||||||
completion->componentType() == RiaDefines::WellPathComponentType::PERFORATION_INTERVAL;
|
[]( auto completion ) {
|
||||||
} );
|
return completion->isEnabled() &&
|
||||||
|
completion->componentType() ==
|
||||||
|
RiaDefines::WellPathComponentType::PERFORATION_INTERVAL;
|
||||||
|
} );
|
||||||
|
|
||||||
QString perforationText = anyPerforationsPresent ? "Perforation_" : "";
|
QString perforationText = anyPerforationsPresent ? "Perforation_" : "";
|
||||||
QString fileName =
|
QString fileName =
|
||||||
@@ -202,11 +209,11 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( c
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString fileName = QString( "%1_Fracture_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
QString fileName = QString( "%1_Fracture_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||||
exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||||
fileName,
|
fileName,
|
||||||
"",
|
"",
|
||||||
exportSettings.exportDataSourceAsComment() );
|
exportSettings.exportDataSourceAsComment() );
|
||||||
lgrExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
lgrExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||||
fileName + "_LGR",
|
fileName + "_LGR",
|
||||||
"",
|
"",
|
||||||
exportSettings.exportDataSourceAsComment() );
|
exportSettings.exportDataSourceAsComment() );
|
||||||
@@ -237,11 +244,11 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( c
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString fileName = QString( "%1_Fishbones_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
QString fileName = QString( "%1_Fishbones_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||||
exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||||
fileName,
|
fileName,
|
||||||
"",
|
"",
|
||||||
exportSettings.exportDataSourceAsComment() );
|
exportSettings.exportDataSourceAsComment() );
|
||||||
lgrExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
lgrExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||||
fileName + "_LGR",
|
fileName + "_LGR",
|
||||||
"",
|
"",
|
||||||
exportSettings.exportDataSourceAsComment() );
|
exportSettings.exportDataSourceAsComment() );
|
||||||
@@ -350,7 +357,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFractures( RimEcl
|
|||||||
RicMswExportInfo& exportInfo,
|
RicMswExportInfo& exportInfo,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
bool completionSegmentsAfterMainBore,
|
bool completionSegmentsAfterMainBore,
|
||||||
bool exportLgrData ) {
|
bool exportLgrData )
|
||||||
|
{
|
||||||
formatter.setOptionalComment( exportDataSourceAsComment );
|
formatter.setOptionalComment( exportDataSourceAsComment );
|
||||||
|
|
||||||
double maxSegmentLength = wellPath->mswCompletionParameters()->maxSegmentLength();
|
double maxSegmentLength = wellPath->mswCompletionParameters()->maxSegmentLength();
|
||||||
@@ -555,9 +563,9 @@ void RicWellPathExportMswCompletionsImpl::updateDataForMultipleItemsInSameGridCe
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( const RimEclipseCase* eclipseCase,
|
void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( const RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
double initialMD,
|
double initialMD,
|
||||||
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
||||||
bool enableSegmentSplitting,
|
bool enableSegmentSplitting,
|
||||||
gsl::not_null<RicMswExportInfo*> exportInfo,
|
gsl::not_null<RicMswExportInfo*> exportInfo,
|
||||||
@@ -572,14 +580,14 @@ void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( const RimEclipseCase* eclipseCase,
|
void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( const RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
double initialMD,
|
double initialMD,
|
||||||
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
||||||
const std::vector<RimFishbones*>& fishbonesSubs,
|
const std::vector<RimFishbones*>& fishbonesSubs,
|
||||||
bool enableSegmentSplitting,
|
bool enableSegmentSplitting,
|
||||||
gsl::not_null<RicMswExportInfo*> exportInfo,
|
gsl::not_null<RicMswExportInfo*> exportInfo,
|
||||||
gsl::not_null<RicMswBranch*> branch )
|
gsl::not_null<RicMswBranch*> branch )
|
||||||
{
|
{
|
||||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections =
|
std::vector<WellPathCellIntersectionInfo> filteredIntersections =
|
||||||
filterIntersections( cellIntersections, initialMD, wellPath->wellPathGeometry(), eclipseCase );
|
filterIntersections( cellIntersections, initialMD, wellPath->wellPathGeometry(), eclipseCase );
|
||||||
@@ -762,12 +770,12 @@ void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfoForWell(
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( RimEclipseCase* eclipseCase,
|
bool RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
double initialMD,
|
double initialMD,
|
||||||
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
||||||
gsl::not_null<RicMswExportInfo*> exportInfo,
|
gsl::not_null<RicMswExportInfo*> exportInfo,
|
||||||
gsl::not_null<RicMswBranch*> branch )
|
gsl::not_null<RicMswBranch*> branch )
|
||||||
{
|
{
|
||||||
auto mswParameters = wellPath->mswCompletionParameters();
|
auto mswParameters = wellPath->mswCompletionParameters();
|
||||||
auto fractures = wellPath->fractureCollection()->activeFractures();
|
auto fractures = wellPath->fractureCollection()->activeFractures();
|
||||||
@@ -827,13 +835,13 @@ bool RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( RimEcl
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RicWellPathExportMswCompletionsImpl::generatePerforationsMswExportInfo( RimEclipseCase* eclipseCase,
|
bool RicWellPathExportMswCompletionsImpl::generatePerforationsMswExportInfo( RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
int timeStep,
|
int timeStep,
|
||||||
double initialMD,
|
double initialMD,
|
||||||
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
|
||||||
gsl::not_null<RicMswExportInfo*> exportInfo,
|
gsl::not_null<RicMswExportInfo*> exportInfo,
|
||||||
gsl::not_null<RicMswBranch*> branch )
|
gsl::not_null<RicMswBranch*> branch )
|
||||||
{
|
{
|
||||||
auto perforationIntervals = wellPath->perforationIntervalCollection()->activePerforations();
|
auto perforationIntervals = wellPath->perforationIntervalCollection()->activePerforations();
|
||||||
|
|
||||||
@@ -938,9 +946,9 @@ std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::g
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
double RicWellPathExportMswCompletionsImpl::computeIntitialMeasuredDepth( const RimEclipseCase* eclipseCase,
|
double RicWellPathExportMswCompletionsImpl::computeIntitialMeasuredDepth( const RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
const RimMswCompletionParameters* mswParameters,
|
const RimMswCompletionParameters* mswParameters,
|
||||||
const std::vector<WellPathCellIntersectionInfo>& allIntersections )
|
const std::vector<WellPathCellIntersectionInfo>& allIntersections )
|
||||||
{
|
{
|
||||||
if ( allIntersections.empty() ) return 0.0;
|
if ( allIntersections.empty() ) return 0.0;
|
||||||
@@ -1866,10 +1874,10 @@ std::vector<RimWellPath*> RicWellPathExportMswCompletionsImpl::wellPathsWithTieI
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::pair<double, double>
|
std::pair<double, double>
|
||||||
RicWellPathExportMswCompletionsImpl::calculateOverlapWithActiveCells( double startMD,
|
RicWellPathExportMswCompletionsImpl::calculateOverlapWithActiveCells( double startMD,
|
||||||
double endMD,
|
double endMD,
|
||||||
const std::vector<WellPathCellIntersectionInfo>& wellPathIntersections,
|
const std::vector<WellPathCellIntersectionInfo>& wellPathIntersections,
|
||||||
const RigActiveCellInfo* activeCellInfo )
|
const RigActiveCellInfo* activeCellInfo )
|
||||||
{
|
{
|
||||||
for ( const WellPathCellIntersectionInfo& intersection : wellPathIntersections )
|
for ( const WellPathCellIntersectionInfo& intersection : wellPathIntersections )
|
||||||
{
|
{
|
||||||
|
@@ -122,10 +122,10 @@ private:
|
|||||||
gsl::not_null<const RigWellPath*> wellPathGeometry,
|
gsl::not_null<const RigWellPath*> wellPathGeometry,
|
||||||
gsl::not_null<const RimEclipseCase*> eclipseCase );
|
gsl::not_null<const RimEclipseCase*> eclipseCase );
|
||||||
|
|
||||||
static std::pair<double, double> calculateOverlapWithActiveCells( double startMD,
|
static std::pair<double, double> calculateOverlapWithActiveCells( double startMD,
|
||||||
double endMD,
|
double endMD,
|
||||||
const std::vector<WellPathCellIntersectionInfo>& wellPathIntersections,
|
const std::vector<WellPathCellIntersectionInfo>& wellPathIntersections,
|
||||||
const RigActiveCellInfo* activeCellInfo );
|
const RigActiveCellInfo* activeCellInfo );
|
||||||
|
|
||||||
static void createWellPathSegments( gsl::not_null<RicMswBranch*> branch,
|
static void createWellPathSegments( gsl::not_null<RicMswBranch*> branch,
|
||||||
const std::vector<WellPathCellIntersectionInfo>& cellSegmentIntersections,
|
const std::vector<WellPathCellIntersectionInfo>& cellSegmentIntersections,
|
||||||
@@ -167,10 +167,10 @@ private:
|
|||||||
gsl::not_null<RicMswSegment*> segment,
|
gsl::not_null<RicMswSegment*> segment,
|
||||||
bool* foundSubGridIntersections );
|
bool* foundSubGridIntersections );
|
||||||
|
|
||||||
static std::vector<RigCompletionData> generatePerforationIntersections( gsl::not_null<const RimWellPath*> wellPath,
|
static std::vector<RigCompletionData> generatePerforationIntersections( gsl::not_null<const RimWellPath*> wellPath,
|
||||||
gsl::not_null<const RimPerforationInterval*> perforationInterval,
|
gsl::not_null<const RimPerforationInterval*> perforationInterval,
|
||||||
int timeStep,
|
int timeStep,
|
||||||
gsl::not_null<const RimEclipseCase*> eclipseCase );
|
gsl::not_null<const RimEclipseCase*> eclipseCase );
|
||||||
|
|
||||||
static void assignPerforationIntersections( const std::vector<RigCompletionData>& completionData,
|
static void assignPerforationIntersections( const std::vector<RigCompletionData>& completionData,
|
||||||
gsl::not_null<RicMswCompletion*> perforationCompletion,
|
gsl::not_null<RicMswCompletion*> perforationCompletion,
|
||||||
|
@@ -628,7 +628,7 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureCompletionSummar
|
|||||||
RifTextDataTableColumn( "" ), // Fracture
|
RifTextDataTableColumn( "" ), // Fracture
|
||||||
RifTextDataTableColumn( "" ), // Template
|
RifTextDataTableColumn( "" ), // Template
|
||||||
floatNumberColumn( "" ), // Tr
|
floatNumberColumn( "" ), // Tr
|
||||||
floatNumberColumn( "" ), //#con
|
floatNumberColumn( "" ), // #con
|
||||||
floatNumberColumn( "" ), // Fcd
|
floatNumberColumn( "" ), // Fcd
|
||||||
RifTextDataTableColumn( "", RifTextDataTableDoubleFormatting( RIF_FLOAT, 1 ), RIGHT ), // Area
|
RifTextDataTableColumn( "", RifTextDataTableDoubleFormatting( RIF_FLOAT, 1 ), RIGHT ), // Area
|
||||||
RifTextDataTableColumn( meanText, RifTextDataTableDoubleFormatting( RIF_FLOAT, 1 ), RIGHT ), // KfWf
|
RifTextDataTableColumn( meanText, RifTextDataTableDoubleFormatting( RIF_FLOAT, 1 ), RIGHT ), // KfWf
|
||||||
|
@@ -115,7 +115,7 @@ void RicCreateDepthAdjustedLasFilesFeature::createDepthAdjustedWellLogFileFromEc
|
|||||||
RimWellPath* sourceWell,
|
RimWellPath* sourceWell,
|
||||||
const std::vector<RimWellPath*> destinationWells,
|
const std::vector<RimWellPath*> destinationWells,
|
||||||
const std::vector<QString>& selectedResultProperties,
|
const std::vector<QString>& selectedResultProperties,
|
||||||
const QString& exportFolder )
|
const QString& exportFolder )
|
||||||
{
|
{
|
||||||
if ( sourceWell->wellLogFiles().empty() ) return;
|
if ( sourceWell->wellLogFiles().empty() ) return;
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ void RicCreateDepthAdjustedLasFilesFeature::createDepthAdjustedWellLogFileFromGe
|
|||||||
RimWellPath* sourceWell,
|
RimWellPath* sourceWell,
|
||||||
const std::vector<RimWellPath*> destinationWells,
|
const std::vector<RimWellPath*> destinationWells,
|
||||||
const std::vector<QString>& selectedResultProperties,
|
const std::vector<QString>& selectedResultProperties,
|
||||||
const QString& exportFolder )
|
const QString& exportFolder )
|
||||||
{
|
{
|
||||||
if ( sourceWell->wellLogFiles().empty() ) return;
|
if ( sourceWell->wellLogFiles().empty() ) return;
|
||||||
|
|
||||||
|
@@ -265,9 +265,9 @@ std::string RicCreateDepthAdjustedLasFilesImpl::createDepthUnitText( RiaDefines:
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::string RicCreateDepthAdjustedLasFilesImpl::createDepthUnitComment( RiaDefines::DepthUnitType depthUnitType )
|
std::string RicCreateDepthAdjustedLasFilesImpl::createDepthUnitComment( RiaDefines::DepthUnitType depthUnitType )
|
||||||
{
|
{
|
||||||
return depthUnitType == RiaDefines::DepthUnitType::UNIT_METER
|
return depthUnitType == RiaDefines::DepthUnitType::UNIT_METER ? "in meters"
|
||||||
? "in meters"
|
: depthUnitType == RiaDefines::DepthUnitType::UNIT_FEET ? "in feet"
|
||||||
: depthUnitType == RiaDefines::DepthUnitType::UNIT_FEET ? "in feet" : "in Connection number";
|
: "in Connection number";
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@@ -100,7 +100,7 @@ void RicExportEclipseSectorModelFeature::executeCommand( RimEclipseView*
|
|||||||
|
|
||||||
int faultsProgressPercentage = exportSettings.exportFaults() ? 10 : 0;
|
int faultsProgressPercentage = exportSettings.exportFaults() ? 10 : 0;
|
||||||
|
|
||||||
int gridProgressPercentage = 100 - resultProgressPercentage - faultsProgressPercentage;
|
int gridProgressPercentage = 100 - resultProgressPercentage - faultsProgressPercentage;
|
||||||
caf::ProgressInfo progress( gridProgressPercentage + resultProgressPercentage + faultsProgressPercentage, "Export Eclipse Sector Model" );
|
caf::ProgressInfo progress( gridProgressPercentage + resultProgressPercentage + faultsProgressPercentage, "Export Eclipse Sector Model" );
|
||||||
|
|
||||||
cvf::Vec3st refinement( exportSettings.refinementCountI(), exportSettings.refinementCountJ(), exportSettings.refinementCountK() );
|
cvf::Vec3st refinement( exportSettings.refinementCountI(), exportSettings.refinementCountJ(), exportSettings.refinementCountK() );
|
||||||
@@ -157,7 +157,7 @@ void RicExportEclipseSectorModelFeature::executeCommand( RimEclipseView*
|
|||||||
QString fileName = dirPath.absoluteFilePath( keyword + ".GRDECL" );
|
QString fileName = dirPath.absoluteFilePath( keyword + ".GRDECL" );
|
||||||
bool worked = RifEclipseInputFileTools::exportKeywords( fileName,
|
bool worked = RifEclipseInputFileTools::exportKeywords( fileName,
|
||||||
view->eclipseCase()->eclipseCaseData(),
|
view->eclipseCase()->eclipseCaseData(),
|
||||||
{ keyword },
|
{ keyword },
|
||||||
exportSettings.writeEchoKeywords(),
|
exportSettings.writeEchoKeywords(),
|
||||||
min,
|
min,
|
||||||
max,
|
max,
|
||||||
|
@@ -114,9 +114,10 @@ public:
|
|||||||
|
|
||||||
int priority() const
|
int priority() const
|
||||||
{
|
{
|
||||||
return type == RigCompletionData::CompletionType::FRACTURE
|
return type == RigCompletionData::CompletionType::FRACTURE ? 1
|
||||||
? 1
|
: type == RigCompletionData::CompletionType::FISHBONES ? 2
|
||||||
: type == RigCompletionData::CompletionType::FISHBONES ? 2 : type == RigCompletionData::CompletionType::PERFORATION ? 3 : 4;
|
: type == RigCompletionData::CompletionType::PERFORATION ? 3
|
||||||
|
: 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort by priority, then name, then number
|
// Sort by priority, then name, then number
|
||||||
@@ -190,8 +191,8 @@ private:
|
|||||||
const std::vector<RigCompletionDataGridCell>& intersectingCells,
|
const std::vector<RigCompletionDataGridCell>& intersectingCells,
|
||||||
const caf::VecIjk& lgrSizes,
|
const caf::VecIjk& lgrSizes,
|
||||||
LgrNameFactory& lgrNameFactory );
|
LgrNameFactory& lgrNameFactory );
|
||||||
static std::vector<LgrInfo> buildLgrsPerCompletion( int firstLgrId,
|
static std::vector<LgrInfo> buildLgrsPerCompletion( int firstLgrId,
|
||||||
RimEclipseCase* eclipseCase,
|
RimEclipseCase* eclipseCase,
|
||||||
const std::map<CompletionInfo, std::vector<RigCompletionDataGridCell>>& completionInfo,
|
const std::map<CompletionInfo, std::vector<RigCompletionDataGridCell>>& completionInfo,
|
||||||
const caf::VecIjk& lgrSizesPerMainGridCell,
|
const caf::VecIjk& lgrSizesPerMainGridCell,
|
||||||
LgrNameFactory& lgrNameFactory );
|
LgrNameFactory& lgrNameFactory );
|
||||||
|
@@ -39,7 +39,7 @@ public:
|
|||||||
static void saveViewWindowToFile( RimViewWindow* viewWindow, const QString& defaultFileBaseName = "image" );
|
static void saveViewWindowToFile( RimViewWindow* viewWindow, const QString& defaultFileBaseName = "image" );
|
||||||
static void saveImageToFile( const QImage& image, const QString& defaultFileBaseName = "image" );
|
static void saveImageToFile( const QImage& image, const QString& defaultFileBaseName = "image" );
|
||||||
static QString
|
static QString
|
||||||
generateSaveFileName( const QString& defaultFileBaseName = "image", bool supportPDF = false, const QString& defaultExtension = "png" );
|
generateSaveFileName( const QString& defaultFileBaseName = "image", bool supportPDF = false, const QString& defaultExtension = "png" );
|
||||||
static QIcon icon();
|
static QIcon icon();
|
||||||
static QString text();
|
static QString text();
|
||||||
|
|
||||||
|
@@ -70,7 +70,7 @@ public:
|
|||||||
std::vector<MultipleFracturesOption> fractureOptions( const RigEclipseCaseData* caseData,
|
std::vector<MultipleFracturesOption> fractureOptions( const RigEclipseCaseData* caseData,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
const std::vector<RicCreateMultipleFracturesOptionItemUi*>& allUiOptions );
|
const std::vector<RicCreateMultipleFracturesOptionItemUi*>& allUiOptions );
|
||||||
RicCreateMultipleFracturesOptionItemUi* firstUiOptionContainingK( size_t k,
|
RicCreateMultipleFracturesOptionItemUi* firstUiOptionContainingK( size_t k,
|
||||||
const std::vector<RicCreateMultipleFracturesOptionItemUi*>& allUiOptions );
|
const std::vector<RicCreateMultipleFracturesOptionItemUi*>& allUiOptions );
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@@ -116,7 +116,8 @@ std::vector<T*> RicMeshFractureTemplateHelper<T>::createNewTemplatesFromFiles( c
|
|||||||
RimFractureTemplateCollection* fracDefColl = oilfield->fractureDefinitionCollection();
|
RimFractureTemplateCollection* fracDefColl = oilfield->fractureDefinitionCollection();
|
||||||
if ( !fracDefColl ) return std::vector<T*>();
|
if ( !fracDefColl ) return std::vector<T*>();
|
||||||
|
|
||||||
auto findTemplateByName = []( RimFractureTemplateCollection* coll, const QString& name ) -> T* {
|
auto findTemplateByName = []( RimFractureTemplateCollection* coll, const QString& name ) -> T*
|
||||||
|
{
|
||||||
for ( auto t : coll->fractureTemplates() )
|
for ( auto t : coll->fractureTemplates() )
|
||||||
if ( t->name() == name ) return dynamic_cast<T*>( t );
|
if ( t->name() == name ) return dynamic_cast<T*>( t );
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@ private:
|
|||||||
~RicExportToSharingServerScheduler() override;
|
~RicExportToSharingServerScheduler() override;
|
||||||
|
|
||||||
RicExportToSharingServerScheduler( const RicExportToSharingServerScheduler& o ) = delete;
|
RicExportToSharingServerScheduler( const RicExportToSharingServerScheduler& o ) = delete;
|
||||||
void operator=( const RicExportToSharingServerScheduler& o ) = delete;
|
void operator=( const RicExportToSharingServerScheduler& o ) = delete;
|
||||||
|
|
||||||
void startTimer( int msecs );
|
void startTimer( int msecs );
|
||||||
void triggerUpdateSession();
|
void triggerUpdateSession();
|
||||||
|
@@ -63,9 +63,8 @@ bool RicCloseSummaryCaseInCollectionFeature::isCommandEnabled()
|
|||||||
|
|
||||||
summaryCaseCollections.erase( std::remove_if( summaryCaseCollections.begin(),
|
summaryCaseCollections.erase( std::remove_if( summaryCaseCollections.begin(),
|
||||||
summaryCaseCollections.end(),
|
summaryCaseCollections.end(),
|
||||||
[]( RimSummaryCaseCollection* coll ) {
|
[]( RimSummaryCaseCollection* coll )
|
||||||
return dynamic_cast<RimDerivedEnsembleCaseCollection*>( coll ) != nullptr;
|
{ return dynamic_cast<RimDerivedEnsembleCaseCollection*>( coll ) != nullptr; } ),
|
||||||
} ),
|
|
||||||
summaryCaseCollections.end() );
|
summaryCaseCollections.end() );
|
||||||
|
|
||||||
return ( summaryCaseMainCollections.size() > 0 || summaryCaseCollections.size() > 0 );
|
return ( summaryCaseMainCollections.size() > 0 || summaryCaseCollections.size() > 0 );
|
||||||
|
@@ -188,14 +188,15 @@ std::vector<std::pair<QString, RiaDefines::ResultCatType>>
|
|||||||
const RigEclipseCaseData* caseData )
|
const RigEclipseCaseData* caseData )
|
||||||
{
|
{
|
||||||
auto findResultCategory =
|
auto findResultCategory =
|
||||||
[]( const QString& keyword, const std::vector<RiaDefines::ResultCatType>& categories, const RigEclipseCaseData* caseData ) {
|
[]( const QString& keyword, const std::vector<RiaDefines::ResultCatType>& categories, const RigEclipseCaseData* caseData )
|
||||||
// Find the result category for a given keyword
|
{
|
||||||
auto resultData = caseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
// Find the result category for a given keyword
|
||||||
for ( auto category : categories )
|
auto resultData = caseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||||
if ( resultData->hasResultEntry( RigEclipseResultAddress( category, keyword ) ) ) return category;
|
for ( auto category : categories )
|
||||||
|
if ( resultData->hasResultEntry( RigEclipseResultAddress( category, keyword ) ) ) return category;
|
||||||
|
|
||||||
return RiaDefines::ResultCatType::UNDEFINED;
|
return RiaDefines::ResultCatType::UNDEFINED;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<std::pair<QString, RiaDefines::ResultCatType>> props;
|
std::vector<std::pair<QString, RiaDefines::ResultCatType>> props;
|
||||||
for ( auto keyword : resultNames )
|
for ( auto keyword : resultNames )
|
||||||
|
@@ -61,9 +61,9 @@ public:
|
|||||||
|
|
||||||
std::vector<std::pair<QString, RiaDefines::ResultCatType>> properties() const;
|
std::vector<std::pair<QString, RiaDefines::ResultCatType>> properties() const;
|
||||||
|
|
||||||
static std::vector<std::pair<QString, RiaDefines::ResultCatType>> properties( const std::vector<QString>& resultNames,
|
static std::vector<std::pair<QString, RiaDefines::ResultCatType>> properties( const std::vector<QString>& resultNames,
|
||||||
const std::vector<RiaDefines::ResultCatType>& resultCategories,
|
const std::vector<RiaDefines::ResultCatType>& resultCategories,
|
||||||
const RigEclipseCaseData* caseData );
|
const RigEclipseCaseData* caseData );
|
||||||
|
|
||||||
void setCaseData( RigEclipseCaseData* caseData );
|
void setCaseData( RigEclipseCaseData* caseData );
|
||||||
|
|
||||||
|
@@ -70,9 +70,8 @@ bool RicDeleteSummaryCaseCollectionFeature::isCommandEnabled()
|
|||||||
|
|
||||||
selection.erase( std::remove_if( selection.begin(),
|
selection.erase( std::remove_if( selection.begin(),
|
||||||
selection.end(),
|
selection.end(),
|
||||||
[]( RimSummaryCaseCollection* coll ) {
|
[]( RimSummaryCaseCollection* coll )
|
||||||
return dynamic_cast<RimDerivedEnsembleCaseCollection*>( coll ) != nullptr;
|
{ return dynamic_cast<RimDerivedEnsembleCaseCollection*>( coll ) != nullptr; } ),
|
||||||
} ),
|
|
||||||
selection.end() );
|
selection.end() );
|
||||||
return ( selection.size() > 0 );
|
return ( selection.size() > 0 );
|
||||||
}
|
}
|
||||||
|
@@ -112,9 +112,9 @@ void RicElasticPropertiesImportTools::importElasticPropertiesFromFile( const QSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sort the matching items by porosity
|
// Sort the matching items by porosity
|
||||||
std::sort( matchingFacies.begin(), matchingFacies.end(), []( const RifElasticProperties& a, const RifElasticProperties& b ) {
|
std::sort( matchingFacies.begin(),
|
||||||
return a.porosity < b.porosity;
|
matchingFacies.end(),
|
||||||
} );
|
[]( const RifElasticProperties& a, const RifElasticProperties& b ) { return a.porosity < b.porosity; } );
|
||||||
|
|
||||||
std::vector<QString> matchingFormations;
|
std::vector<QString> matchingFormations;
|
||||||
if ( formationName == formationWildCard )
|
if ( formationName == formationWildCard )
|
||||||
|
@@ -144,11 +144,12 @@ void RicImportEnsembleFeature::setupActionLook( QAction* actionToSetup )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QString RicImportEnsembleFeature::askForEnsembleName( const QString& suggestion )
|
QString RicImportEnsembleFeature::askForEnsembleName( const QString& suggestion )
|
||||||
{
|
{
|
||||||
RimProject* project = RimProject::current();
|
RimProject* project = RimProject::current();
|
||||||
std::vector<RimSummaryCaseCollection*> groups = project->summaryGroups();
|
std::vector<RimSummaryCaseCollection*> groups = project->summaryGroups();
|
||||||
int ensemblesStartingWithRoot = std::count_if( groups.begin(), groups.end(), [suggestion]( RimSummaryCaseCollection* group ) {
|
int ensemblesStartingWithRoot = std::count_if( groups.begin(),
|
||||||
return group->isEnsemble() && group->name().startsWith( suggestion );
|
groups.end(),
|
||||||
} );
|
[suggestion]( RimSummaryCaseCollection* group )
|
||||||
|
{ return group->isEnsemble() && group->name().startsWith( suggestion ); } );
|
||||||
|
|
||||||
QInputDialog dialog;
|
QInputDialog dialog;
|
||||||
dialog.setInputMode( QInputDialog::TextInput );
|
dialog.setInputMode( QInputDialog::TextInput );
|
||||||
|
@@ -80,8 +80,8 @@ void RicImportObservedDataFeature::selectObservedDataFileInDialog()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorText = "Not able to import file. Make sure '*.rsm' is used as extension if data is in RMS format "
|
errorText = "Not able to import file. Make sure '*.rsm' is used as extension if data is in RMS format "
|
||||||
"or '*.txt' or '*.csv' if data is in CSV format.";
|
"or '*.txt' or '*.csv' if data is in CSV format.";
|
||||||
retryImport = false;
|
retryImport = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -436,9 +436,9 @@ RicSummaryCaseRestartDialogResult RicSummaryCaseRestartDialog::openDialog( const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RicSummaryCaseRestartDialog::ImportOptions RicSummaryCaseRestartDialog::selectedSummaryImportOption() const
|
RicSummaryCaseRestartDialog::ImportOptions RicSummaryCaseRestartDialog::selectedSummaryImportOption() const
|
||||||
{
|
{
|
||||||
return m_summaryReadAllBtn->isChecked()
|
return m_summaryReadAllBtn->isChecked() ? ImportOptions::IMPORT_ALL
|
||||||
? ImportOptions::IMPORT_ALL
|
: m_summarySeparateCasesBtn->isChecked() ? ImportOptions::SEPARATE_CASES
|
||||||
: m_summarySeparateCasesBtn->isChecked() ? ImportOptions::SEPARATE_CASES : ImportOptions::NOT_IMPORT;
|
: ImportOptions::NOT_IMPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@@ -90,7 +90,8 @@ void RicThemeColorEditorFeature::onActionTriggered( bool isChecked )
|
|||||||
completer->setWrapAround( false );
|
completer->setWrapAround( false );
|
||||||
editor->setCompleter( completer );
|
editor->setCompleter( completer );
|
||||||
|
|
||||||
auto generateColorFields = [themeSelector, widget, editor]() -> void {
|
auto generateColorFields = [themeSelector, widget, editor]() -> void
|
||||||
|
{
|
||||||
QLayoutItem* item;
|
QLayoutItem* item;
|
||||||
if ( widget->layout() )
|
if ( widget->layout() )
|
||||||
{
|
{
|
||||||
@@ -114,17 +115,20 @@ void RicThemeColorEditorFeature::onActionTriggered( bool isChecked )
|
|||||||
column );
|
column );
|
||||||
QPushButton* colorBox = new QPushButton( "" );
|
QPushButton* colorBox = new QPushButton( "" );
|
||||||
colorBox->setStyleSheet( QString( "background-color: %0;" ).arg( variableValueMap.value( variableName ) ) );
|
colorBox->setStyleSheet( QString( "background-color: %0;" ).arg( variableValueMap.value( variableName ) ) );
|
||||||
connect( colorBox, &QPushButton::clicked, [variableValueMap, variableName, theme, editor, widget, colorBox]() -> void {
|
connect( colorBox,
|
||||||
QColor color = QColorDialog::getColor( colorBox->palette().color( QPalette::Button ), widget );
|
&QPushButton::clicked,
|
||||||
if ( color.isValid() )
|
[variableValueMap, variableName, theme, editor, widget, colorBox]() -> void
|
||||||
{
|
{
|
||||||
colorBox->setStyleSheet( QString( "background-color: %0;" ).arg( color.name() ) );
|
QColor color = QColorDialog::getColor( colorBox->palette().color( QPalette::Button ), widget );
|
||||||
colorBox->style()->unpolish( colorBox );
|
if ( color.isValid() )
|
||||||
colorBox->style()->polish( colorBox );
|
{
|
||||||
RiuGuiTheme::changeVariableValue( theme, variableName, color.name() );
|
colorBox->setStyleSheet( QString( "background-color: %0;" ).arg( color.name() ) );
|
||||||
editor->setPlainText( RiuGuiTheme::applyVariableValueMapToStyleSheet( theme ) );
|
colorBox->style()->unpolish( colorBox );
|
||||||
}
|
colorBox->style()->polish( colorBox );
|
||||||
} );
|
RiuGuiTheme::changeVariableValue( theme, variableName, color.name() );
|
||||||
|
editor->setPlainText( RiuGuiTheme::applyVariableValueMapToStyleSheet( theme ) );
|
||||||
|
}
|
||||||
|
} );
|
||||||
innerLayout->addWidget( colorBox, row++, column + 1 );
|
innerLayout->addWidget( colorBox, row++, column + 1 );
|
||||||
if ( row == 10 )
|
if ( row == 10 )
|
||||||
{
|
{
|
||||||
@@ -137,12 +141,15 @@ void RicThemeColorEditorFeature::onActionTriggered( bool isChecked )
|
|||||||
|
|
||||||
// A more elegant way, but not supported in old Qt version.
|
// A more elegant way, but not supported in old Qt version.
|
||||||
// connect( themeSelector, qOverload<int>( &QComboBox::currentIndexChanged ), [=]() {
|
// connect( themeSelector, qOverload<int>( &QComboBox::currentIndexChanged ), [=]() {
|
||||||
connect( themeSelector, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), [=]() {
|
connect( themeSelector,
|
||||||
generateColorFields();
|
static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ),
|
||||||
RiaDefines::ThemeEnum theme = static_cast<RiaDefines::ThemeEnum>( themeSelector->currentData().toInt() );
|
[=]()
|
||||||
RiuGuiTheme::updateGuiTheme( static_cast<RiaDefines::ThemeEnum>( theme ) );
|
{
|
||||||
editor->setPlainText( RiuGuiTheme::loadStyleSheet( theme ) );
|
generateColorFields();
|
||||||
} );
|
RiaDefines::ThemeEnum theme = static_cast<RiaDefines::ThemeEnum>( themeSelector->currentData().toInt() );
|
||||||
|
RiuGuiTheme::updateGuiTheme( static_cast<RiaDefines::ThemeEnum>( theme ) );
|
||||||
|
editor->setPlainText( RiuGuiTheme::loadStyleSheet( theme ) );
|
||||||
|
} );
|
||||||
|
|
||||||
generateColorFields();
|
generateColorFields();
|
||||||
|
|
||||||
@@ -156,11 +163,14 @@ void RicThemeColorEditorFeature::onActionTriggered( bool isChecked )
|
|||||||
|
|
||||||
QPushButton* button = new QPushButton( "Apply style sheet changes" );
|
QPushButton* button = new QPushButton( "Apply style sheet changes" );
|
||||||
layout->addWidget( button, 6, 1 );
|
layout->addWidget( button, 6, 1 );
|
||||||
connect( button, &QPushButton::clicked, [themeSelector, editor, generateColorFields]() {
|
connect( button,
|
||||||
RiaDefines::ThemeEnum theme = static_cast<RiaDefines::ThemeEnum>( themeSelector->currentData().toInt() );
|
&QPushButton::clicked,
|
||||||
RiuGuiTheme::writeStyleSheetToFile( theme, editor->toPlainText() );
|
[themeSelector, editor, generateColorFields]()
|
||||||
generateColorFields();
|
{
|
||||||
} );
|
RiaDefines::ThemeEnum theme = static_cast<RiaDefines::ThemeEnum>( themeSelector->currentData().toInt() );
|
||||||
|
RiuGuiTheme::writeStyleSheetToFile( theme, editor->toPlainText() );
|
||||||
|
generateColorFields();
|
||||||
|
} );
|
||||||
|
|
||||||
dialog->setLayout( layout );
|
dialog->setLayout( layout );
|
||||||
|
|
||||||
|
@@ -151,7 +151,7 @@ bool RicPasteAsciiDataToSummaryPlotFeature::hasPastedText()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<RimAsciiDataCurve*> RicPasteAsciiDataToSummaryPlotFeature::parseCurves( QString& data,
|
std::vector<RimAsciiDataCurve*> RicPasteAsciiDataToSummaryPlotFeature::parseCurves( QString& data,
|
||||||
const RicPasteAsciiDataToSummaryPlotFeatureUi& settings )
|
const RicPasteAsciiDataToSummaryPlotFeatureUi& settings )
|
||||||
{
|
{
|
||||||
std::vector<RimAsciiDataCurve*> curves;
|
std::vector<RimAsciiDataCurve*> curves;
|
||||||
|
@@ -509,9 +509,10 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std:
|
|||||||
|
|
||||||
// Set single curve set color
|
// Set single curve set color
|
||||||
auto allCurveSets = m_previewPlot->ensembleCurveSetCollection()->curveSets();
|
auto allCurveSets = m_previewPlot->ensembleCurveSetCollection()->curveSets();
|
||||||
size_t colorIndex = std::count_if( allCurveSets.begin(), allCurveSets.end(), []( RimEnsembleCurveSet* curveSet ) {
|
size_t colorIndex = std::count_if( allCurveSets.begin(),
|
||||||
return curveSet->colorMode() == RimEnsembleCurveSet::ColorMode::SINGLE_COLOR;
|
allCurveSets.end(),
|
||||||
} );
|
[]( RimEnsembleCurveSet* curveSet )
|
||||||
|
{ return curveSet->colorMode() == RimEnsembleCurveSet::ColorMode::SINGLE_COLOR; } );
|
||||||
curveSet->setColor( RiaColorTables::summaryCurveDefaultPaletteColors().cycledColor3f( colorIndex ) );
|
curveSet->setColor( RiaColorTables::summaryCurveDefaultPaletteColors().cycledColor3f( colorIndex ) );
|
||||||
|
|
||||||
// Add curve to plot
|
// Add curve to plot
|
||||||
@@ -976,9 +977,9 @@ void RicSummaryPlotEditorUi::setInitialCurveVisibility( const RimSummaryPlot* ta
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
int ensembleCurveCount( const std::set<RiaSummaryCurveDefinition>& allCurveDefs )
|
int ensembleCurveCount( const std::set<RiaSummaryCurveDefinition>& allCurveDefs )
|
||||||
{
|
{
|
||||||
return std::count_if( allCurveDefs.begin(), allCurveDefs.end(), []( const RiaSummaryCurveDefinition& def ) {
|
return std::count_if( allCurveDefs.begin(),
|
||||||
return def.isEnsembleCurve();
|
allCurveDefs.end(),
|
||||||
} );
|
[]( const RiaSummaryCurveDefinition& def ) { return def.isEnsembleCurve(); } );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@@ -33,7 +33,7 @@ class RicAsciiExportWellLogPlotFeature : public caf::CmdFeature
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static QString
|
static QString
|
||||||
makeValidExportFileName( const RimWellLogPlot* wellLogPlot, const QString& folder, const QString& prefix, bool capitalizeFileName );
|
makeValidExportFileName( const RimWellLogPlot* wellLogPlot, const QString& folder, const QString& prefix, bool capitalizeFileName );
|
||||||
static bool exportAsciiForWellLogPlot( const QString& fileName, const RimWellLogPlot* wellLogPlot );
|
static bool exportAsciiForWellLogPlot( const QString& fileName, const RimWellLogPlot* wellLogPlot );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -52,7 +52,7 @@ bool RicNewWellLogPlotFeature::isCommandEnabled()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicNewWellLogPlotFeature::onActionTriggered( bool isChecked )
|
void RicNewWellLogPlotFeature::onActionTriggered( bool isChecked )
|
||||||
{
|
{
|
||||||
RimWellLogTrack* plotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack();
|
RimWellLogTrack* plotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack();
|
||||||
RimWellLogExtractionCurve* curve = RicWellLogTools::addWellLogExtractionCurve( plotTrack, nullptr, nullptr, nullptr, nullptr, -1, true );
|
RimWellLogExtractionCurve* curve = RicWellLogTools::addWellLogExtractionCurve( plotTrack, nullptr, nullptr, nullptr, nullptr, -1, true );
|
||||||
curve->loadDataAndUpdate( true );
|
curve->loadDataAndUpdate( true );
|
||||||
RimWellLogPlot* plot = nullptr;
|
RimWellLogPlot* plot = nullptr;
|
||||||
|
@@ -107,9 +107,10 @@ std::set<RimViewWindow*> RicWellLogFileCloseFeature::referringWellLogPlots( cons
|
|||||||
obj->firstAncestorOrThisOfType( wellLogPlot );
|
obj->firstAncestorOrThisOfType( wellLogPlot );
|
||||||
|
|
||||||
RimViewWindow* plot = allocationPlot ? dynamic_cast<RimViewWindow*>( allocationPlot )
|
RimViewWindow* plot = allocationPlot ? dynamic_cast<RimViewWindow*>( allocationPlot )
|
||||||
: pltPlot ? dynamic_cast<RimViewWindow*>( pltPlot )
|
: pltPlot ? dynamic_cast<RimViewWindow*>( pltPlot )
|
||||||
: rftPlot ? dynamic_cast<RimViewWindow*>( rftPlot )
|
: rftPlot ? dynamic_cast<RimViewWindow*>( rftPlot )
|
||||||
: wellLogPlot ? dynamic_cast<RimViewWindow*>( wellLogPlot ) : nullptr;
|
: wellLogPlot ? dynamic_cast<RimViewWindow*>( wellLogPlot )
|
||||||
|
: nullptr;
|
||||||
|
|
||||||
if ( plot != nullptr )
|
if ( plot != nullptr )
|
||||||
{
|
{
|
||||||
|
@@ -92,7 +92,7 @@ private:
|
|||||||
|
|
||||||
static cvf::ref<cvf::DrawableGeo> createTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray );
|
static cvf::ref<cvf::DrawableGeo> createTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray );
|
||||||
static cvf::ref<cvf::DrawableGeo> createIndexedTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray, cvf::UIntArray* triangleIndices );
|
static cvf::ref<cvf::DrawableGeo> createIndexedTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray, cvf::UIntArray* triangleIndices );
|
||||||
static cvf::ref<cvf::Part> createPart( cvf::DrawableGeo* geo, const cvf::Color4f& color, const cvf::String& partName );
|
static cvf::ref<cvf::Part> createPart( cvf::DrawableGeo* geo, const cvf::Color4f& color, const cvf::String& partName );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::map<HandleType, cvf::ref<cvf::Part>> m_handleParts; // These arrays have the same length
|
std::map<HandleType, cvf::ref<cvf::Part>> m_handleParts; // These arrays have the same length
|
||||||
|
@@ -1037,13 +1037,13 @@ QString RifEclipseInputFileTools::faultFaceText( cvf::StructGridInterface::FaceT
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RifEclipseInputFileTools::readFaultsAndParseIncludeStatementsRecursively( QFile& file,
|
bool RifEclipseInputFileTools::readFaultsAndParseIncludeStatementsRecursively( QFile& file,
|
||||||
qint64 startPos,
|
qint64 startPos,
|
||||||
const std::vector<std::pair<QString, QString>>& pathAliasDefinitions,
|
const std::vector<std::pair<QString, QString>>& pathAliasDefinitions,
|
||||||
cvf::Collection<RigFault>* faults,
|
cvf::Collection<RigFault>* faults,
|
||||||
std::vector<QString>* filenamesWithFaults,
|
std::vector<QString>* filenamesWithFaults,
|
||||||
bool* isEditKeywordDetected,
|
bool* isEditKeywordDetected,
|
||||||
const QString& faultIncludeFileAbsolutePathPrefix )
|
const QString& faultIncludeFileAbsolutePathPrefix )
|
||||||
{
|
{
|
||||||
QString line;
|
QString line;
|
||||||
|
|
||||||
|
@@ -276,7 +276,7 @@ void RifEclipseRestartFilesetAccess::openTimeStep( size_t timeStep )
|
|||||||
|
|
||||||
if ( m_ecl_files[timeStep] == nullptr )
|
if ( m_ecl_files[timeStep] == nullptr )
|
||||||
{
|
{
|
||||||
int index = static_cast<int>( timeStep );
|
int index = static_cast<int>( timeStep );
|
||||||
ecl_file_type* ecl_file = ecl_file_open( RiaStringEncodingTools::toNativeEncoded( m_fileNames[index] ).data(), ECL_FILE_CLOSE_STREAM );
|
ecl_file_type* ecl_file = ecl_file_open( RiaStringEncodingTools::toNativeEncoded( m_fileNames[index] ).data(), ECL_FILE_CLOSE_STREAM );
|
||||||
|
|
||||||
m_ecl_files[timeStep] = ecl_file;
|
m_ecl_files[timeStep] = ecl_file;
|
||||||
|
@@ -104,14 +104,14 @@ public:
|
|||||||
static RifEclipseSummaryAddress miscAddress( const std::string& vectorName, int calculationId = -1 );
|
static RifEclipseSummaryAddress miscAddress( const std::string& vectorName, int calculationId = -1 );
|
||||||
static RifEclipseSummaryAddress regionAddress( const std::string& vectorName, int regionNumber, int calculationId = -1 );
|
static RifEclipseSummaryAddress regionAddress( const std::string& vectorName, int regionNumber, int calculationId = -1 );
|
||||||
static RifEclipseSummaryAddress
|
static RifEclipseSummaryAddress
|
||||||
regionToRegionAddress( const std::string& vectorName, int regionNumber, int region2Number, int calculationId = -1 );
|
regionToRegionAddress( const std::string& vectorName, int regionNumber, int region2Number, int calculationId = -1 );
|
||||||
static RifEclipseSummaryAddress groupAddress( const std::string& vectorName, const std::string& groupName, int calculationId = -1 );
|
static RifEclipseSummaryAddress groupAddress( const std::string& vectorName, const std::string& groupName, int calculationId = -1 );
|
||||||
static RifEclipseSummaryAddress wellAddress( const std::string& vectorName, const std::string& wellName, int calculationId = -1 );
|
static RifEclipseSummaryAddress wellAddress( const std::string& vectorName, const std::string& wellName, int calculationId = -1 );
|
||||||
|
|
||||||
static RifEclipseSummaryAddress
|
static RifEclipseSummaryAddress
|
||||||
wellCompletionAddress( const std::string& vectorName, const std::string& wellName, int i, int j, int k, int calculationId = -1 );
|
wellCompletionAddress( const std::string& vectorName, const std::string& wellName, int i, int j, int k, int calculationId = -1 );
|
||||||
static RifEclipseSummaryAddress
|
static RifEclipseSummaryAddress
|
||||||
wellLgrAddress( const std::string& vectorName, const std::string& lgrName, const std::string& wellName, int calculationId = -1 );
|
wellLgrAddress( const std::string& vectorName, const std::string& lgrName, const std::string& wellName, int calculationId = -1 );
|
||||||
static RifEclipseSummaryAddress wellCompletionLgrAddress( const std::string& vectorName,
|
static RifEclipseSummaryAddress wellCompletionLgrAddress( const std::string& vectorName,
|
||||||
const std::string& lgrName,
|
const std::string& lgrName,
|
||||||
const std::string& wellName,
|
const std::string& wellName,
|
||||||
@@ -120,10 +120,10 @@ public:
|
|||||||
int k,
|
int k,
|
||||||
int calculationId = -1 );
|
int calculationId = -1 );
|
||||||
static RifEclipseSummaryAddress
|
static RifEclipseSummaryAddress
|
||||||
wellSegmentAddress( const std::string& vectorName, const std::string& wellName, int segmentNumber, int calculationId = -1 );
|
wellSegmentAddress( const std::string& vectorName, const std::string& wellName, int segmentNumber, int calculationId = -1 );
|
||||||
static RifEclipseSummaryAddress blockAddress( const std::string& vectorName, int i, int j, int k, int calculationId = -1 );
|
static RifEclipseSummaryAddress blockAddress( const std::string& vectorName, int i, int j, int k, int calculationId = -1 );
|
||||||
static RifEclipseSummaryAddress
|
static RifEclipseSummaryAddress
|
||||||
blockLgrAddress( const std::string& vectorName, const std::string& lgrName, int i, int j, int k, int calculationId = -1 );
|
blockLgrAddress( const std::string& vectorName, const std::string& lgrName, int i, int j, int k, int calculationId = -1 );
|
||||||
static RifEclipseSummaryAddress importedAddress( const std::string& vectorName, int calculationId = -1 );
|
static RifEclipseSummaryAddress importedAddress( const std::string& vectorName, int calculationId = -1 );
|
||||||
static RifEclipseSummaryAddress ensembleStatisticsAddress( const std::string& vectorName, const std::string& datavectorName );
|
static RifEclipseSummaryAddress ensembleStatisticsAddress( const std::string& vectorName, const std::string& datavectorName );
|
||||||
|
|
||||||
|
@@ -89,7 +89,8 @@ std::pair<std::string, std::vector<float>>
|
|||||||
{
|
{
|
||||||
std::vector<float> values;
|
std::vector<float> values;
|
||||||
|
|
||||||
auto isKeywordWithoutData = []( const std::string& keyword ) {
|
auto isKeywordWithoutData = []( const std::string& keyword )
|
||||||
|
{
|
||||||
std::vector<std::string> keywords = { "ECHO", "NOECHO" };
|
std::vector<std::string> keywords = { "ECHO", "NOECHO" };
|
||||||
return std::find( keywords.begin(), keywords.end(), keyword ) != keywords.end();
|
return std::find( keywords.begin(), keywords.end(), keyword ) != keywords.end();
|
||||||
};
|
};
|
||||||
|
@@ -52,7 +52,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
static void readElasticProperties( std::vector<RifElasticProperties>& elasticProperties, const QString& filePath, const QString& separator );
|
static void readElasticProperties( std::vector<RifElasticProperties>& elasticProperties, const QString& filePath, const QString& separator );
|
||||||
static RifElasticProperties parseElasticProperties( const QString& line, int lineNumber, const QString& filePath, const QString& separator );
|
static RifElasticProperties parseElasticProperties( const QString& line, int lineNumber, const QString& filePath, const QString& separator );
|
||||||
static QStringList tokenize( const QString& line, const QString& separator );
|
static QStringList tokenize( const QString& line, const QString& separator );
|
||||||
static void
|
static void
|
||||||
verifyNonEmptyTokens( const QStringList& tokens, const QStringList& nameOfNonEmptyTokens, int lineNumber, const QString& filePath );
|
verifyNonEmptyTokens( const QStringList& tokens, const QStringList& nameOfNonEmptyTokens, int lineNumber, const QString& filePath );
|
||||||
|
|
||||||
|
@@ -98,9 +98,8 @@ std::vector<time_t> RifHdf5SummaryReader::timeSteps() const
|
|||||||
// Add custom method to convert from time_point to time_t. The usual implementation of
|
// Add custom method to convert from time_point to time_t. The usual implementation of
|
||||||
// chrono::system_clock::to_time_t() uses nanoseconds which will overflow on data with
|
// chrono::system_clock::to_time_t() uses nanoseconds which will overflow on data with
|
||||||
// long time spans.
|
// long time spans.
|
||||||
auto convertTimePointToTimeT = []( const TP& value ) {
|
auto convertTimePointToTimeT = []( const TP& value )
|
||||||
return std::chrono::duration_cast<std::chrono::seconds>( value.time_since_epoch() ).count();
|
{ return std::chrono::duration_cast<std::chrono::seconds>( value.time_since_epoch() ).count(); };
|
||||||
};
|
|
||||||
|
|
||||||
auto startDat = std::chrono::system_clock::from_time_t( startDate() );
|
auto startDat = std::chrono::system_clock::from_time_t( startDate() );
|
||||||
|
|
||||||
|
@@ -348,7 +348,8 @@ std::vector<std::vector<cvf::Vec3d>>
|
|||||||
|
|
||||||
std::sort( zDistanceAlongPillar.begin(), zDistanceAlongPillar.end() );
|
std::sort( zDistanceAlongPillar.begin(), zDistanceAlongPillar.end() );
|
||||||
|
|
||||||
auto normalize = []( const std::vector<double>& values ) -> std::vector<double> {
|
auto normalize = []( const std::vector<double>& values ) -> std::vector<double>
|
||||||
|
{
|
||||||
if ( values.size() < 2 ) return {};
|
if ( values.size() < 2 ) return {};
|
||||||
|
|
||||||
std::vector<double> normalizedValues;
|
std::vector<double> normalizedValues;
|
||||||
|
@@ -168,9 +168,9 @@ void RifOpmHdf5Summary::buildMetaData()
|
|||||||
|
|
||||||
{
|
{
|
||||||
auto [addresses, smspecIndices, addressToKeywordMap] = RifOpmCommonSummaryTools::buildAddressesSmspecAndKeywordMap( m_eSmry.get() );
|
auto [addresses, smspecIndices, addressToKeywordMap] = RifOpmCommonSummaryTools::buildAddressesSmspecAndKeywordMap( m_eSmry.get() );
|
||||||
m_allResultAddresses = addresses;
|
m_allResultAddresses = addresses;
|
||||||
m_adrToSmspecIndices = smspecIndices;
|
m_adrToSmspecIndices = smspecIndices;
|
||||||
m_summaryAddressToKeywordMap = addressToKeywordMap;
|
m_summaryAddressToKeywordMap = addressToKeywordMap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1815,7 +1815,7 @@ void RifReaderEclipseOutput::readWellCells( const ecl_grid_type* mainEclGrid, bo
|
|||||||
if ( well_segment_has_grid_connections( outletSegment, gridName.data() ) )
|
if ( well_segment_has_grid_connections( outletSegment, gridName.data() ) )
|
||||||
{
|
{
|
||||||
const well_conn_collection_type* connections = well_segment_get_connections( outletSegment, gridName.data() );
|
const well_conn_collection_type* connections = well_segment_get_connections( outletSegment, gridName.data() );
|
||||||
int connectionCount = well_conn_collection_get_size( connections );
|
int connectionCount = well_conn_collection_get_size( connections );
|
||||||
|
|
||||||
// Select the deepest connection
|
// Select the deepest connection
|
||||||
well_conn_type* ert_connection = well_conn_collection_iget( connections, connectionCount - 1 );
|
well_conn_type* ert_connection = well_conn_collection_iget( connections, connectionCount - 1 );
|
||||||
|
@@ -113,7 +113,7 @@ std::set<QDateTime> RifReaderEnsembleStatisticsRft::availableTimeSteps( const QS
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::set<QDateTime> RifReaderEnsembleStatisticsRft::availableTimeSteps( const QString& wellName,
|
std::set<QDateTime> RifReaderEnsembleStatisticsRft::availableTimeSteps( const QString& wellName,
|
||||||
const RifEclipseRftAddress::RftWellLogChannelType& wellLogChannelName )
|
const RifEclipseRftAddress::RftWellLogChannelType& wellLogChannelName )
|
||||||
{
|
{
|
||||||
std::set<QDateTime> allTimeSteps;
|
std::set<QDateTime> allTimeSteps;
|
||||||
|
@@ -167,7 +167,7 @@ std::set<QDateTime> RifReaderPressureDepthData::availableTimeSteps( const QStrin
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::set<QDateTime> RifReaderPressureDepthData::availableTimeSteps( const QString& wellName,
|
std::set<QDateTime> RifReaderPressureDepthData::availableTimeSteps( const QString& wellName,
|
||||||
const std::set<RifEclipseRftAddress::RftWellLogChannelType>& relevantChannels )
|
const std::set<RifEclipseRftAddress::RftWellLogChannelType>& relevantChannels )
|
||||||
{
|
{
|
||||||
if ( relevantChannels.count( RifEclipseRftAddress::RftWellLogChannelType::TVD ) ||
|
if ( relevantChannels.count( RifEclipseRftAddress::RftWellLogChannelType::TVD ) ||
|
||||||
|
@@ -72,7 +72,8 @@ bool RifRoffFileTools::openGridFile( const QString& fileName, RigEclipseCaseData
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto getInt = []( auto values, const std::string& name ) {
|
auto getInt = []( auto values, const std::string& name )
|
||||||
|
{
|
||||||
auto v = std::find_if( values.begin(), values.end(), [&name]( const auto& arg ) { return arg.first == name; } );
|
auto v = std::find_if( values.begin(), values.end(), [&name]( const auto& arg ) { return arg.first == name; } );
|
||||||
if ( v != values.end() )
|
if ( v != values.end() )
|
||||||
return std::get<int>( v->second );
|
return std::get<int>( v->second );
|
||||||
@@ -80,7 +81,8 @@ bool RifRoffFileTools::openGridFile( const QString& fileName, RigEclipseCaseData
|
|||||||
throw std::runtime_error( "Missing parameter (integer): " + name );
|
throw std::runtime_error( "Missing parameter (integer): " + name );
|
||||||
};
|
};
|
||||||
|
|
||||||
auto getFloat = []( auto values, const std::string& name ) {
|
auto getFloat = []( auto values, const std::string& name )
|
||||||
|
{
|
||||||
auto v = std::find_if( values.begin(), values.end(), [&name]( const auto& arg ) { return arg.first == name; } );
|
auto v = std::find_if( values.begin(), values.end(), [&name]( const auto& arg ) { return arg.first == name; } );
|
||||||
if ( v != values.end() )
|
if ( v != values.end() )
|
||||||
return std::get<float>( v->second );
|
return std::get<float>( v->second );
|
||||||
|
@@ -72,7 +72,7 @@ public:
|
|||||||
std::pair<int, int> convertToInlineXline( double worldx, double worldy );
|
std::pair<int, int> convertToInlineXline( double worldx, double worldy );
|
||||||
|
|
||||||
std::shared_ptr<ZGYAccess::SeismicSliceData>
|
std::shared_ptr<ZGYAccess::SeismicSliceData>
|
||||||
slice( RiaDefines::SeismicSliceDirection direction, int sliceIndex, int zStartIndex = -1, int zSize = 0 );
|
slice( RiaDefines::SeismicSliceDirection direction, int sliceIndex, int zStartIndex = -1, int zSize = 0 );
|
||||||
std::shared_ptr<ZGYAccess::SeismicSliceData> trace( int inlineIndex, int xlineIndex, int zStartIndex = -1, int zSize = 0 );
|
std::shared_ptr<ZGYAccess::SeismicSliceData> trace( int inlineIndex, int xlineIndex, int zStartIndex = -1, int zSize = 0 );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -40,7 +40,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static bool
|
static bool
|
||||||
writeToFrkFile( const QString& filepath, const std::vector<QString>& labels, const std::map<QString, std::vector<double>>& values );
|
writeToFrkFile( const QString& filepath, const std::vector<QString>& labels, const std::map<QString, std::vector<double>>& values );
|
||||||
static bool writeToCsvFile( const QString& filepath,
|
static bool writeToCsvFile( const QString& filepath,
|
||||||
const std::vector<QString>& labels,
|
const std::vector<QString>& labels,
|
||||||
const std::map<QString, std::vector<double>>& values,
|
const std::map<QString, std::vector<double>>& values,
|
||||||
|
@@ -55,11 +55,10 @@ bool vectorContains( const std::vector<T>& vector, T item )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RicSummaryCaseRestartDialog::ImportOptions mapReadOption( RiaPreferencesSummary::SummaryRestartFilesImportMode mode )
|
RicSummaryCaseRestartDialog::ImportOptions mapReadOption( RiaPreferencesSummary::SummaryRestartFilesImportMode mode )
|
||||||
{
|
{
|
||||||
return mode == RiaPreferencesSummary::SummaryRestartFilesImportMode::NOT_IMPORT
|
return mode == RiaPreferencesSummary::SummaryRestartFilesImportMode::NOT_IMPORT ? RicSummaryCaseRestartDialog::ImportOptions::NOT_IMPORT
|
||||||
? RicSummaryCaseRestartDialog::ImportOptions::NOT_IMPORT
|
: mode == RiaPreferencesSummary::SummaryRestartFilesImportMode::SEPARATE_CASES
|
||||||
: mode == RiaPreferencesSummary::SummaryRestartFilesImportMode::SEPARATE_CASES
|
? RicSummaryCaseRestartDialog::ImportOptions::SEPARATE_CASES
|
||||||
? RicSummaryCaseRestartDialog::ImportOptions::SEPARATE_CASES
|
: RicSummaryCaseRestartDialog::ImportOptions::IMPORT_ALL;
|
||||||
: RicSummaryCaseRestartDialog::ImportOptions::IMPORT_ALL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@@ -377,7 +377,8 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceImporter::re
|
|||||||
// of axesVectorCandidates. Also increases the number of occurrences of vector candidates.
|
// of axesVectorCandidates. Also increases the number of occurrences of vector candidates.
|
||||||
auto maybeInsertAxisVectorCandidate = [epsilon]( const cvf::Vec2d vector,
|
auto maybeInsertAxisVectorCandidate = [epsilon]( const cvf::Vec2d vector,
|
||||||
std::map<cvf::Vec2d, double, vec2dCompare>& axesVectorCandidates,
|
std::map<cvf::Vec2d, double, vec2dCompare>& axesVectorCandidates,
|
||||||
std::map<cvf::Vec2d, unsigned, vec2dCompare>& axesVectorCandidatesNum ) -> bool {
|
std::map<cvf::Vec2d, unsigned, vec2dCompare>& axesVectorCandidatesNum ) -> bool
|
||||||
|
{
|
||||||
double length = vector.length();
|
double length = vector.length();
|
||||||
cvf::Vec2d normalizedVector = vector.getNormalized();
|
cvf::Vec2d normalizedVector = vector.getNormalized();
|
||||||
for ( std::map<cvf::Vec2d, double, vec2dCompare>::iterator iter = axesVectorCandidates.begin(); iter != axesVectorCandidates.end();
|
for ( std::map<cvf::Vec2d, double, vec2dCompare>::iterator iter = axesVectorCandidates.begin(); iter != axesVectorCandidates.end();
|
||||||
@@ -471,9 +472,9 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceImporter::re
|
|||||||
pairs.push_back( *itr );
|
pairs.push_back( *itr );
|
||||||
}
|
}
|
||||||
|
|
||||||
sort( pairs.begin(), pairs.end(), [=]( std::pair<cvf::Vec2d, unsigned>& a, std::pair<cvf::Vec2d, unsigned>& b ) {
|
sort( pairs.begin(),
|
||||||
return a.second > b.second;
|
pairs.end(),
|
||||||
} );
|
[=]( std::pair<cvf::Vec2d, unsigned>& a, std::pair<cvf::Vec2d, unsigned>& b ) { return a.second > b.second; } );
|
||||||
|
|
||||||
cvf::Vec2d primaryAxisVector = pairs[0].first * axesVectorCandidates[pairs[0].first];
|
cvf::Vec2d primaryAxisVector = pairs[0].first * axesVectorCandidates[pairs[0].first];
|
||||||
|
|
||||||
@@ -488,7 +489,8 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceImporter::re
|
|||||||
|
|
||||||
auto distanceOnLine = [to3d, to2d, surfacePoints, primaryAxisVector, epsilon]( const cvf::Vec2d linePoint1,
|
auto distanceOnLine = [to3d, to2d, surfacePoints, primaryAxisVector, epsilon]( const cvf::Vec2d linePoint1,
|
||||||
const cvf::Vec2d linePoint2,
|
const cvf::Vec2d linePoint2,
|
||||||
const cvf::Vec2d point ) -> int {
|
const cvf::Vec2d point ) -> int
|
||||||
|
{
|
||||||
double normalizedIntersection = 0.0;
|
double normalizedIntersection = 0.0;
|
||||||
cvf::Vec2d projectedPoint =
|
cvf::Vec2d projectedPoint =
|
||||||
to2d( cvf::GeometryTools::projectPointOnLine( to3d( linePoint1 ), to3d( linePoint2 ), to3d( point ), &normalizedIntersection ) );
|
to2d( cvf::GeometryTools::projectPointOnLine( to3d( linePoint1 ), to3d( linePoint2 ), to3d( point ), &normalizedIntersection ) );
|
||||||
@@ -632,7 +634,8 @@ bool RifSurfaceImporter::generateTriangleIndices( const std::vector<std::vector<
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RifSurfaceImporter::vectorFuzzyCompare( const cvf::Vec2d& vector1, const cvf::Vec2d& vector2, double epsilon )
|
bool RifSurfaceImporter::vectorFuzzyCompare( const cvf::Vec2d& vector1, const cvf::Vec2d& vector2, double epsilon )
|
||||||
{
|
{
|
||||||
auto AlmostEqualRelativeAndAbs = [=]( double A, double B, double maxRelDiff ) -> bool {
|
auto AlmostEqualRelativeAndAbs = [=]( double A, double B, double maxRelDiff ) -> bool
|
||||||
|
{
|
||||||
// Check if the numbers are really close -- needed
|
// Check if the numbers are really close -- needed
|
||||||
// when comparing numbers near zero.
|
// when comparing numbers near zero.
|
||||||
double diff = fabs( A - B );
|
double diff = fabs( A - B );
|
||||||
|
@@ -49,7 +49,8 @@ std::pair<std::shared_ptr<RigThermalFractureDefinition>, QString> RifThermalFrac
|
|||||||
|
|
||||||
QString separator = ",";
|
QString separator = ",";
|
||||||
|
|
||||||
auto appendPropertyValues = [definition]( int nodeIndex, int valueOffset, const QStringList& values, double conductivityFactor ) {
|
auto appendPropertyValues = [definition]( int nodeIndex, int valueOffset, const QStringList& values, double conductivityFactor )
|
||||||
|
{
|
||||||
CAF_ASSERT( valueOffset <= values.size() );
|
CAF_ASSERT( valueOffset <= values.size() );
|
||||||
for ( int i = valueOffset; i < values.size(); i++ )
|
for ( int i = valueOffset; i < values.size(); i++ )
|
||||||
{
|
{
|
||||||
|
@@ -268,9 +268,10 @@ void RifWellPathImporter::readAllAsciiWellData( const QString& filePath )
|
|||||||
// name <WellNameA>
|
// name <WellNameA>
|
||||||
// wellname: <WellNameA>
|
// wellname: <WellNameA>
|
||||||
std::string lineLowerCase = line;
|
std::string lineLowerCase = line;
|
||||||
transform( lineLowerCase.begin(), lineLowerCase.end(), lineLowerCase.begin(), []( const char c ) -> char {
|
transform( lineLowerCase.begin(),
|
||||||
return (char)::tolower( c );
|
lineLowerCase.end(),
|
||||||
} );
|
lineLowerCase.begin(),
|
||||||
|
[]( const char c ) -> char { return (char)::tolower( c ); } );
|
||||||
|
|
||||||
std::string tokenName = "name";
|
std::string tokenName = "name";
|
||||||
std::size_t foundNameIdx = lineLowerCase.find( tokenName );
|
std::size_t foundNameIdx = lineLowerCase.find( tokenName );
|
||||||
|
@@ -62,7 +62,8 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorEV::calculate( int partIndex
|
|||||||
|
|
||||||
caf::ProgressInfo stepCountProgress( static_cast<size_t>( m_resultCollection->timeStepCount() ) * 4, progressText );
|
caf::ProgressInfo stepCountProgress( static_cast<size_t>( m_resultCollection->timeStepCount() ) * 4, progressText );
|
||||||
|
|
||||||
auto loadFrameLambda = [&]( const QString& component ) {
|
auto loadFrameLambda = [&]( const QString& component )
|
||||||
|
{
|
||||||
auto task = stepCountProgress.task( "Loading " + component, m_resultCollection->timeStepCount() );
|
auto task = stepCountProgress.task( "Loading " + component, m_resultCollection->timeStepCount() );
|
||||||
return m_resultCollection->findOrLoadScalarResult( partIndex, resAddr.copyWithComponent( component.toStdString() ) );
|
return m_resultCollection->findOrLoadScalarResult( partIndex, resAddr.copyWithComponent( component.toStdString() ) );
|
||||||
};
|
};
|
||||||
|
@@ -107,14 +107,14 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorMudWeightWindow::calculate(
|
|||||||
// Stress (ST.S3)
|
// Stress (ST.S3)
|
||||||
RigFemScalarResultFrames* stressDataFrames = nullptr;
|
RigFemScalarResultFrames* stressDataFrames = nullptr;
|
||||||
{
|
{
|
||||||
auto task = stepCountProgress.task( "Loading ST.S3", m_resultCollection->timeStepCount() );
|
auto task = stepCountProgress.task( "Loading ST.S3", m_resultCollection->timeStepCount() );
|
||||||
stressDataFrames = m_resultCollection->findOrLoadScalarResult( partIndex, RigFemResultAddress( resVarAddr.resultPosType, "ST", "S3" ) );
|
stressDataFrames = m_resultCollection->findOrLoadScalarResult( partIndex, RigFemResultAddress( resVarAddr.resultPosType, "ST", "S3" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initial overburden gradient (ST.S33)
|
// Initial overburden gradient (ST.S33)
|
||||||
RigFemScalarResultFrames* obg0DataFrames = nullptr;
|
RigFemScalarResultFrames* obg0DataFrames = nullptr;
|
||||||
{
|
{
|
||||||
auto task = stepCountProgress.task( "Loading ST.S33", m_resultCollection->timeStepCount() );
|
auto task = stepCountProgress.task( "Loading ST.S33", m_resultCollection->timeStepCount() );
|
||||||
obg0DataFrames = m_resultCollection->findOrLoadScalarResult( partIndex, RigFemResultAddress( resVarAddr.resultPosType, "ST", "S33" ) );
|
obg0DataFrames = m_resultCollection->findOrLoadScalarResult( partIndex, RigFemResultAddress( resVarAddr.resultPosType, "ST", "S33" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -51,7 +51,7 @@ private:
|
|||||||
|
|
||||||
static std::vector<float> loadDataForFrame( RimMudWeightWindowParameters::ParameterType parameterType,
|
static std::vector<float> loadDataForFrame( RimMudWeightWindowParameters::ParameterType parameterType,
|
||||||
std::map<RimMudWeightWindowParameters::ParameterType, RigFemScalarResultFrames*>& parameterFrames,
|
std::map<RimMudWeightWindowParameters::ParameterType, RigFemScalarResultFrames*>& parameterFrames,
|
||||||
int stepIndex,
|
int stepIndex,
|
||||||
int frameIndex );
|
int frameIndex );
|
||||||
|
|
||||||
static float getValueForElement( RimMudWeightWindowParameters::ParameterType parameterType,
|
static float getValueForElement( RimMudWeightWindowParameters::ParameterType parameterType,
|
||||||
|
@@ -149,8 +149,8 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNormalized::calculate( int p
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Over/under/sideburden. Use hydrostatic pressure from cell centroid.
|
// Over/under/sideburden. Use hydrostatic pressure from cell centroid.
|
||||||
cvf::Vec3d cellCentroid = femPartGrid->cellCentroid( elmIdx );
|
cvf::Vec3d cellCentroid = femPartGrid->cellCentroid( elmIdx );
|
||||||
double cellCentroidTvdRKB = std::abs( cellCentroid.z() ) + m_resultCollection->normalizationAirGap();
|
double cellCentroidTvdRKB = std::abs( cellCentroid.z() ) + m_resultCollection->normalizationAirGap();
|
||||||
double cellCenterHydroStaticPressure = RiaWellLogUnitTools<double>::hydrostaticPorePressureBar( cellCentroidTvdRKB );
|
double cellCenterHydroStaticPressure = RiaWellLogUnitTools<double>::hydrostaticPorePressureBar( cellCentroidTvdRKB );
|
||||||
|
|
||||||
for ( int elmLocalNodeIdx = 0; elmLocalNodeIdx < 8; ++elmLocalNodeIdx )
|
for ( int elmLocalNodeIdx = 0; elmLocalNodeIdx < 8; ++elmLocalNodeIdx )
|
||||||
|
@@ -63,7 +63,8 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorPoreCompressibility::calcula
|
|||||||
{
|
{
|
||||||
caf::ProgressInfo stepCountProgress( static_cast<size_t>( m_resultCollection->timeStepCount() ) * 7, "Calculating Pore Compressibility" );
|
caf::ProgressInfo stepCountProgress( static_cast<size_t>( m_resultCollection->timeStepCount() ) * 7, "Calculating Pore Compressibility" );
|
||||||
|
|
||||||
auto loadFrameLambda = [&]( RigFemResultAddress addr, const QString& errMsg = "" ) -> RigFemScalarResultFrames* {
|
auto loadFrameLambda = [&]( RigFemResultAddress addr, const QString& errMsg = "" ) -> RigFemScalarResultFrames*
|
||||||
|
{
|
||||||
auto task = stepCountProgress.task( QString( "Loading %1: %2" )
|
auto task = stepCountProgress.task( QString( "Loading %1: %2" )
|
||||||
.arg( QString::fromStdString( addr.fieldName ) )
|
.arg( QString::fromStdString( addr.fieldName ) )
|
||||||
.arg( QString::fromStdString( addr.componentName ) ),
|
.arg( QString::fromStdString( addr.componentName ) ),
|
||||||
|
@@ -76,7 +76,8 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorPrincipalStrain::calculate(
|
|||||||
|
|
||||||
caf::ProgressInfo stepCountProgress( static_cast<size_t>( m_resultCollection->timeStepCount() ) * 7, progressText );
|
caf::ProgressInfo stepCountProgress( static_cast<size_t>( m_resultCollection->timeStepCount() ) * 7, progressText );
|
||||||
|
|
||||||
auto loadFrameLambda = [&]( const std::string& component ) {
|
auto loadFrameLambda = [&]( const std::string& component )
|
||||||
|
{
|
||||||
auto task = stepCountProgress.task( QString::fromStdString( "Loading " + component ), m_resultCollection->timeStepCount() );
|
auto task = stepCountProgress.task( QString::fromStdString( "Loading " + component ), m_resultCollection->timeStepCount() );
|
||||||
return m_resultCollection->findOrLoadScalarResult( partIndex, resAddr.copyWithComponent( component ) );
|
return m_resultCollection->findOrLoadScalarResult( partIndex, resAddr.copyWithComponent( component ) );
|
||||||
};
|
};
|
||||||
|
@@ -62,7 +62,8 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorSFI::calculate( int partInde
|
|||||||
|
|
||||||
caf::ProgressInfo stepCountProgress( static_cast<size_t>( m_resultCollection->timeStepCount() ) * 3, progressText );
|
caf::ProgressInfo stepCountProgress( static_cast<size_t>( m_resultCollection->timeStepCount() ) * 3, progressText );
|
||||||
|
|
||||||
auto loadFrameLambda = [&]( const QString& component ) {
|
auto loadFrameLambda = [&]( const QString& component )
|
||||||
|
{
|
||||||
auto task = stepCountProgress.task( "Loading " + component, m_resultCollection->timeStepCount() );
|
auto task = stepCountProgress.task( "Loading " + component, m_resultCollection->timeStepCount() );
|
||||||
return m_resultCollection->findOrLoadScalarResult( partIndex, resAddr.copyWithComponent( component.toStdString() ) );
|
return m_resultCollection->findOrLoadScalarResult( partIndex, resAddr.copyWithComponent( component.toStdString() ) );
|
||||||
};
|
};
|
||||||
|
@@ -62,7 +62,8 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorSM::calculate( int partIndex
|
|||||||
|
|
||||||
caf::ProgressInfo stepCountProgress( static_cast<size_t>( m_resultCollection->timeStepCount() ) * 4, progressText );
|
caf::ProgressInfo stepCountProgress( static_cast<size_t>( m_resultCollection->timeStepCount() ) * 4, progressText );
|
||||||
|
|
||||||
auto loadFrameLambda = [&]( const QString& component ) {
|
auto loadFrameLambda = [&]( const QString& component )
|
||||||
|
{
|
||||||
auto task = stepCountProgress.task( component );
|
auto task = stepCountProgress.task( component );
|
||||||
return m_resultCollection->findOrLoadScalarResult( partIndex, resVarAddr.copyWithComponent( component.toStdString() ) );
|
return m_resultCollection->findOrLoadScalarResult( partIndex, resVarAddr.copyWithComponent( component.toStdString() ) );
|
||||||
};
|
};
|
||||||
|
@@ -1812,7 +1812,7 @@ void RigFemPartResultsCollection::setMudWeightWindowParameters( double
|
|||||||
RimMudWeightWindowParameters::LowerLimitType lowerLimit,
|
RimMudWeightWindowParameters::LowerLimitType lowerLimit,
|
||||||
int referenceLayer,
|
int referenceLayer,
|
||||||
RimMudWeightWindowParameters::FractureGradientCalculationType fgCalculationType,
|
RimMudWeightWindowParameters::FractureGradientCalculationType fgCalculationType,
|
||||||
double shMultiplier,
|
double shMultiplier,
|
||||||
RimMudWeightWindowParameters::NonReservoirPorePressureType nonReservoirPorePressureType,
|
RimMudWeightWindowParameters::NonReservoirPorePressureType nonReservoirPorePressureType,
|
||||||
double hydrostaticMultiplierPPNonRes,
|
double hydrostaticMultiplierPPNonRes,
|
||||||
const QString& nonReservoirPorePressureAddress )
|
const QString& nonReservoirPorePressureAddress )
|
||||||
|
@@ -215,8 +215,8 @@ RivGeoMechPartMgr* RivGeoMechVizLogic::getUpdatedPartMgr( RivGeoMechPartMgrCache
|
|||||||
|
|
||||||
if ( m_geomechView->geoMechCase() )
|
if ( m_geomechView->geoMechCase() )
|
||||||
{
|
{
|
||||||
caseData = m_geomechView->geoMechCase()->geoMechData();
|
caseData = m_geomechView->geoMechCase()->geoMechData();
|
||||||
partCount = caseData->femParts()->partCount();
|
partCount = caseData->femParts()->partCount();
|
||||||
std::tie( timeStepIdx, frameIdx ) = caseData->femPartResults()->stepListIndexToTimeStepAndDataFrameIndex( pMgrKey.viewerStepIndex() );
|
std::tie( timeStepIdx, frameIdx ) = caseData->femPartResults()->stepListIndexToTimeStepAndDataFrameIndex( pMgrKey.viewerStepIndex() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -320,7 +320,7 @@ bool RifOdbReader::readFemParts( RigFemPartCollection* femParts )
|
|||||||
odb_InstanceRepository instanceRepository = m_odb->rootAssembly().instances();
|
odb_InstanceRepository instanceRepository = m_odb->rootAssembly().instances();
|
||||||
odb_InstanceRepositoryIT iter( instanceRepository );
|
odb_InstanceRepositoryIT iter( instanceRepository );
|
||||||
|
|
||||||
caf::ProgressInfo modelProgress( instanceRepository.size() * ( size_t )( 2 + 4 ), "Reading Odb Parts" );
|
caf::ProgressInfo modelProgress( instanceRepository.size() * (size_t)( 2 + 4 ), "Reading Odb Parts" );
|
||||||
|
|
||||||
int instanceCount = 0;
|
int instanceCount = 0;
|
||||||
for ( iter.first(); !iter.isDone(); iter.next(), instanceCount++ )
|
for ( iter.first(); !iter.isDone(); iter.next(), instanceCount++ )
|
||||||
|
@@ -67,7 +67,7 @@ RivExtrudedCurveIntersectionGeometryGenerator::RivExtrudedCurveIntersectionGeome
|
|||||||
std::vector<std::vector<cvf::Vec3d>>& polylines,
|
std::vector<std::vector<cvf::Vec3d>>& polylines,
|
||||||
const cvf::Vec3d& extrusionDirection,
|
const cvf::Vec3d& extrusionDirection,
|
||||||
const RivIntersectionHexGridInterface* grid,
|
const RivIntersectionHexGridInterface* grid,
|
||||||
bool isFlattened,
|
bool isFlattened,
|
||||||
const cvf::Vec3d& flattenedPolylineStartPoint )
|
const cvf::Vec3d& flattenedPolylineStartPoint )
|
||||||
: m_intersection( crossSection )
|
: m_intersection( crossSection )
|
||||||
, m_polylines( polylines )
|
, m_polylines( polylines )
|
||||||
|
@@ -419,7 +419,7 @@ void RivIntersectionResultsColoringTools::calculateElementBasedGeoMechTextureCoo
|
|||||||
void RivIntersectionResultsColoringTools::calculateGeoMechTensorXfTextureCoords( cvf::Vec2fArray* textureCoords,
|
void RivIntersectionResultsColoringTools::calculateGeoMechTensorXfTextureCoords( cvf::Vec2fArray* textureCoords,
|
||||||
const cvf::Vec3fArray* triangelVertices,
|
const cvf::Vec3fArray* triangelVertices,
|
||||||
const std::vector<RivIntersectionVertexWeights>& vertexWeights,
|
const std::vector<RivIntersectionVertexWeights>& vertexWeights,
|
||||||
RigGeoMechCaseData* caseData,
|
RigGeoMechCaseData* caseData,
|
||||||
const RigFemResultAddress& resVarAddress,
|
const RigFemResultAddress& resVarAddress,
|
||||||
int partIdx,
|
int partIdx,
|
||||||
int timeStepIdx,
|
int timeStepIdx,
|
||||||
@@ -486,9 +486,9 @@ void RivIntersectionResultsColoringTools::calculatePlaneAngleTextureCoords( cvf:
|
|||||||
// as plane
|
// as plane
|
||||||
// normal
|
// normal
|
||||||
|
|
||||||
float angle = cvf::Math::toDegrees( operation( sphCoord ) );
|
float angle = cvf::Math::toDegrees( operation( sphCoord ) );
|
||||||
cvf::Vec2f texCoord = ( angle != std::numeric_limits<float>::infinity() ) ? mapper->mapToTextureCoord( angle )
|
cvf::Vec2f texCoord = ( angle != std::numeric_limits<float>::infinity() ) ? mapper->mapToTextureCoord( angle )
|
||||||
: cvf::Vec2f( 0.0f, 1.0f );
|
: cvf::Vec2f( 0.0f, 1.0f );
|
||||||
rawPtr[triangleVxStartIdx + 0] = texCoord;
|
rawPtr[triangleVxStartIdx + 0] = texCoord;
|
||||||
rawPtr[triangleVxStartIdx + 1] = texCoord;
|
rawPtr[triangleVxStartIdx + 1] = texCoord;
|
||||||
rawPtr[triangleVxStartIdx + 2] = texCoord;
|
rawPtr[triangleVxStartIdx + 2] = texCoord;
|
||||||
|
@@ -266,8 +266,8 @@ bool Riv3dWellLogCurveGeometryGenerator::findClosestPointOnCurve( const cvf::Vec
|
|||||||
double distance = ( projectionOfGlobalIntersection - globalIntersection ).length();
|
double distance = ( projectionOfGlobalIntersection - globalIntersection ).length();
|
||||||
if ( distance < closestDistance )
|
if ( distance < closestDistance )
|
||||||
{
|
{
|
||||||
*closestPoint = cvf::Vec3d( projectionOfGlobalIntersection );
|
*closestPoint = cvf::Vec3d( projectionOfGlobalIntersection );
|
||||||
closestDistance = distance;
|
closestDistance = distance;
|
||||||
*measuredDepthAtPoint = m_curveMeasuredDepths[i - 1] * ( 1.0 - clampedDistance ) + m_curveMeasuredDepths[i] * clampedDistance;
|
*measuredDepthAtPoint = m_curveMeasuredDepths[i - 1] * ( 1.0 - clampedDistance ) + m_curveMeasuredDepths[i] * clampedDistance;
|
||||||
*valueAtClosestPoint = m_curveValues[i - 1] * ( 1.0 - clampedDistance ) + m_curveValues[i] * clampedDistance;
|
*valueAtClosestPoint = m_curveValues[i - 1] * ( 1.0 - clampedDistance ) + m_curveValues[i] * clampedDistance;
|
||||||
}
|
}
|
||||||
|
@@ -552,7 +552,7 @@ cvf::ref<cvf::DrawableGeo>
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RivContourMapProjectionPartMgr::lineOverlapsWithPreviousContourLevel( const cvf::Vec3d& lineCenter,
|
bool RivContourMapProjectionPartMgr::lineOverlapsWithPreviousContourLevel( const cvf::Vec3d& lineCenter,
|
||||||
const RimContourMapProjection::ContourPolygons* previousLevel ) const
|
const RimContourMapProjection::ContourPolygons* previousLevel ) const
|
||||||
{
|
{
|
||||||
const int64_t jump = 50;
|
const int64_t jump = 50;
|
||||||
|
@@ -155,7 +155,8 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
|
|||||||
auto getFaceCenterAndNormal = [activeCellInfo, cells, arrowScaling, displayCordXf]( size_t globalCellIdx,
|
auto getFaceCenterAndNormal = [activeCellInfo, cells, arrowScaling, displayCordXf]( size_t globalCellIdx,
|
||||||
cvf::StructGridInterface::FaceType faceType,
|
cvf::StructGridInterface::FaceType faceType,
|
||||||
cvf::Vec3d& faceCenter,
|
cvf::Vec3d& faceCenter,
|
||||||
cvf::Vec3d& faceNormal ) {
|
cvf::Vec3d& faceNormal )
|
||||||
|
{
|
||||||
faceCenter = displayCordXf->transformToDisplayCoord( cells[globalCellIdx].faceCenter( faceType ) );
|
faceCenter = displayCordXf->transformToDisplayCoord( cells[globalCellIdx].faceCenter( faceType ) );
|
||||||
cvf::Vec3d cellCenter = displayCordXf->transformToDisplayCoord( cells[globalCellIdx].center() );
|
cvf::Vec3d cellCenter = displayCordXf->transformToDisplayCoord( cells[globalCellIdx].center() );
|
||||||
faceNormal = ( faceCenter - cellCenter ).getNormalized() * arrowScaling;
|
faceNormal = ( faceCenter - cellCenter ).getNormalized() * arrowScaling;
|
||||||
@@ -320,7 +321,7 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::ref<cvf::Part> RivElementVectorResultPartMgr::createPart( const RimElementVectorResult& result,
|
cvf::ref<cvf::Part> RivElementVectorResultPartMgr::createPart( const RimElementVectorResult& result,
|
||||||
const std::vector<ElementVectorResultVisualization>& tensorVisualizations ) const
|
const std::vector<ElementVectorResultVisualization>& tensorVisualizations ) const
|
||||||
{
|
{
|
||||||
std::vector<uint> shaftIndices;
|
std::vector<uint> shaftIndices;
|
||||||
@@ -411,9 +412,9 @@ cvf::ref<cvf::Part> RivElementVectorResultPartMgr::createPart( const RimElementV
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RivElementVectorResultPartMgr::createResultColorTextureCoords( cvf::Vec2fArray* textureCoords,
|
void RivElementVectorResultPartMgr::createResultColorTextureCoords( cvf::Vec2fArray* textureCoords,
|
||||||
const std::vector<ElementVectorResultVisualization>& elementVectorResultVisualizations,
|
const std::vector<ElementVectorResultVisualization>& elementVectorResultVisualizations,
|
||||||
const cvf::ScalarMapper* mapper )
|
const cvf::ScalarMapper* mapper )
|
||||||
{
|
{
|
||||||
CVF_ASSERT( textureCoords );
|
CVF_ASSERT( textureCoords );
|
||||||
CVF_ASSERT( mapper );
|
CVF_ASSERT( mapper );
|
||||||
|
@@ -85,7 +85,7 @@ private:
|
|||||||
|
|
||||||
static cvf::ref<cvf::DrawableGeo> generateLine( const cvf::Vec3dArray* coords );
|
static cvf::ref<cvf::DrawableGeo> generateLine( const cvf::Vec3dArray* coords );
|
||||||
static cvf::ref<cvf::DrawableGeo>
|
static cvf::ref<cvf::DrawableGeo>
|
||||||
generateExtrudedCylinder( double radius, size_t crossSectionNodeCount, const cvf::Vec3dArray* cylinderCenterCoords );
|
generateExtrudedCylinder( double radius, size_t crossSectionNodeCount, const cvf::Vec3dArray* cylinderCenterCoords );
|
||||||
static cvf::ref<cvf::DrawableGeo> generateVariableRadiusTube( size_t crossSectionNodeCount,
|
static cvf::ref<cvf::DrawableGeo> generateVariableRadiusTube( size_t crossSectionNodeCount,
|
||||||
const cvf::Vec3dArray* cylinderCenterCoords,
|
const cvf::Vec3dArray* cylinderCenterCoords,
|
||||||
const std::vector<double>& radii );
|
const std::vector<double>& radii );
|
||||||
|
@@ -167,7 +167,8 @@ void RivSimWellPipesPartMgr::buildWellPipeParts( const caf::DisplayCoordTransfor
|
|||||||
m_wellBranches.clear();
|
m_wellBranches.clear();
|
||||||
m_flattenedBranchWellHeadOffsets.clear();
|
m_flattenedBranchWellHeadOffsets.clear();
|
||||||
|
|
||||||
auto createSimWells = []( RimSimWellInView* simWellInView ) -> std::vector<SimulationWellCellBranch> {
|
auto createSimWells = []( RimSimWellInView* simWellInView ) -> std::vector<SimulationWellCellBranch>
|
||||||
|
{
|
||||||
std::vector<SimulationWellCellBranch> simWellBranches;
|
std::vector<SimulationWellCellBranch> simWellBranches;
|
||||||
const RigSimWellData* simWellData = simWellInView->simWellData();
|
const RigSimWellData* simWellData = simWellInView->simWellData();
|
||||||
if ( simWellData && simWellData->isMultiSegmentWell() )
|
if ( simWellData && simWellData->isMultiSegmentWell() )
|
||||||
@@ -449,7 +450,8 @@ void RivSimWellPipesPartMgr::appendValvesGeo( const RimEclipseView*
|
|||||||
|
|
||||||
RivPipeGeometryGenerator::tubeWithCenterLinePartsAndVariableWidth( &pbd.m_valveParts, displayCoords, radii, valveColor );
|
RivPipeGeometryGenerator::tubeWithCenterLinePartsAndVariableWidth( &pbd.m_valveParts, displayCoords, radii, valveColor );
|
||||||
|
|
||||||
auto computeRotationAxisAndAngle = []( const cvf::Vec3f& direction ) {
|
auto computeRotationAxisAndAngle = []( const cvf::Vec3f& direction )
|
||||||
|
{
|
||||||
// Compute upwards normal based on direction
|
// Compute upwards normal based on direction
|
||||||
// Compute the rotation axis and angle between up vector and Z_AXIS
|
// Compute the rotation axis and angle between up vector and Z_AXIS
|
||||||
|
|
||||||
|
@@ -51,12 +51,12 @@ public:
|
|||||||
void appendDynamicGeometryPartsToModel( cvf::ModelBasicList* model, size_t frameIndex );
|
void appendDynamicGeometryPartsToModel( cvf::ModelBasicList* model, size_t frameIndex );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cvf::ref<cvf::Part> createArrowPart( const cvf::Vec3f& startPoint,
|
cvf::ref<cvf::Part> createArrowPart( const cvf::Vec3f& startPoint,
|
||||||
const cvf::Vec3f& endPoint,
|
const cvf::Vec3f& endPoint,
|
||||||
float width,
|
float width,
|
||||||
bool isProducer,
|
bool isProducer,
|
||||||
const cvf::Color4f& arrowColor,
|
const cvf::Color4f& arrowColor,
|
||||||
bool enableLighting );
|
bool enableLighting );
|
||||||
cvf::ref<cvf::DrawableGeo> createArrowGeometry( const cvf::Vec3f& startPoint, const cvf::Vec3f& endPoint, double width, bool useArrowEnd );
|
cvf::ref<cvf::DrawableGeo> createArrowGeometry( const cvf::Vec3f& startPoint, const cvf::Vec3f& endPoint, double width, bool useArrowEnd );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -597,7 +597,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanElementColorSurfacePar
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::Mat4d fractureXf = m_rimFracture->transformMatrix();
|
cvf::Mat4d fractureXf = m_rimFracture->transformMatrix();
|
||||||
std::vector<cvf::Vec3f> nodeDisplayCoords = transformToFractureDisplayCoords( stimPlanMeshVertices, fractureXf, *displayCoordTransform );
|
std::vector<cvf::Vec3f> nodeDisplayCoords = transformToFractureDisplayCoords( stimPlanMeshVertices, fractureXf, *displayCoordTransform );
|
||||||
|
|
||||||
std::vector<cvf::uint> triIndicesToInclude;
|
std::vector<cvf::uint> triIndicesToInclude;
|
||||||
|
@@ -78,7 +78,7 @@ private:
|
|||||||
|
|
||||||
void appendFracturePerforationLengthParts( const RimEclipseView& activeView, cvf::ModelBasicList* model );
|
void appendFracturePerforationLengthParts( const RimEclipseView& activeView, cvf::ModelBasicList* model );
|
||||||
|
|
||||||
cvf::ref<cvf::Part> createStimPlanMeshPart( const RimEclipseView& activeView );
|
cvf::ref<cvf::Part> createStimPlanMeshPart( const RimEclipseView& activeView );
|
||||||
cvf::ref<cvf::DrawableGeo> createStimPlanMeshDrawable( RimMeshFractureTemplate* stimPlanFracTemplate, const RimEclipseView& activeView );
|
cvf::ref<cvf::DrawableGeo> createStimPlanMeshDrawable( RimMeshFractureTemplate* stimPlanFracTemplate, const RimEclipseView& activeView );
|
||||||
|
|
||||||
void createVisibleFracturePolygons( RimMeshFractureTemplate* stimPlanFracTemplate, const RimEclipseView& activeView );
|
void createVisibleFracturePolygons( RimMeshFractureTemplate* stimPlanFracTemplate, const RimEclipseView& activeView );
|
||||||
|
@@ -479,13 +479,13 @@ void RivWellPathPartMgr::appendPerforationValvesToModel( cvf::ModelBasicList*
|
|||||||
{
|
{
|
||||||
measuredDepthsRelativeToStartMD = { 0.0, 1.0, 1.5, 4.0, 5.0, 5.5, 8.0, 9.0 };
|
measuredDepthsRelativeToStartMD = { 0.0, 1.0, 1.5, 4.0, 5.0, 5.5, 8.0, 9.0 };
|
||||||
radii = { wellPathRadius,
|
radii = { wellPathRadius,
|
||||||
wellPathRadius * 1.8,
|
wellPathRadius * 1.8,
|
||||||
wellPathRadius * 2.0,
|
wellPathRadius * 2.0,
|
||||||
wellPathRadius * 2.0,
|
wellPathRadius * 2.0,
|
||||||
wellPathRadius * 1.8,
|
wellPathRadius * 1.8,
|
||||||
wellPathRadius * 1.7,
|
wellPathRadius * 1.7,
|
||||||
wellPathRadius * 1.7,
|
wellPathRadius * 1.7,
|
||||||
wellPathRadius };
|
wellPathRadius };
|
||||||
|
|
||||||
double startMD = valve->startMD();
|
double startMD = valve->startMD();
|
||||||
std::vector<cvf::Vec3d> displayCoords;
|
std::vector<cvf::Vec3d> displayCoords;
|
||||||
|
@@ -242,7 +242,7 @@ QString RivSurfacePartMgr::resultInfoText( Rim3dView* view, uint hitPart, cvf::V
|
|||||||
const auto& ind = m_usedSurfaceData->triangleIndices();
|
const auto& ind = m_usedSurfaceData->triangleIndices();
|
||||||
const auto& vert = m_usedSurfaceData->vertices();
|
const auto& vert = m_usedSurfaceData->vertices();
|
||||||
|
|
||||||
size_t indIndex = ( size_t )( hitPart * 3 );
|
size_t indIndex = (size_t)( hitPart * 3 );
|
||||||
|
|
||||||
// find closest triangle corner point to hit point and show that value
|
// find closest triangle corner point to hit point and show that value
|
||||||
if ( ind.size() > ( indIndex + 2 ) )
|
if ( ind.size() > ( indIndex + 2 ) )
|
||||||
|
@@ -1,38 +1,38 @@
|
|||||||
//##################################################################################################
|
// ##################################################################################################
|
||||||
//
|
//
|
||||||
// Custom Visualization Core library
|
// Custom Visualization Core library
|
||||||
// Copyright (C) 2011-2013 Ceetron AS
|
// Copyright (C) 2011-2013 Ceetron AS
|
||||||
//
|
//
|
||||||
// This library may be used under the terms of either the GNU General Public License or
|
// This library may be used under the terms of either the GNU General Public License or
|
||||||
// the GNU Lesser General Public License as follows:
|
// the GNU Lesser General Public License as follows:
|
||||||
//
|
//
|
||||||
// GNU General Public License Usage
|
// GNU General Public License Usage
|
||||||
// This library is free software: you can redistribute it and/or modify
|
// This library is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
|
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
//
|
//
|
||||||
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
|
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
|
||||||
// for more details.
|
// for more details.
|
||||||
//
|
//
|
||||||
// GNU Lesser General Public License Usage
|
// GNU Lesser General Public License Usage
|
||||||
// This library is free software; you can redistribute it and/or modify
|
// This library is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Lesser General Public License as published by
|
// it under the terms of the GNU Lesser General Public License as published by
|
||||||
// the Free Software Foundation; either version 2.1 of the License, or
|
// the Free Software Foundation; either version 2.1 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
|
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
//
|
//
|
||||||
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
|
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
|
||||||
// for more details.
|
// for more details.
|
||||||
//
|
//
|
||||||
//##################################################################################################
|
// ##################################################################################################
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@@ -897,7 +897,8 @@ int RimPolygonFilter::findEclipseKLayer( const std::vector<cvf::Vec3d>& points,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto findKLayerBelowPoint = []( const cvf::Vec3d& point, RigMainGrid* mainGrid ) {
|
auto findKLayerBelowPoint = []( const cvf::Vec3d& point, RigMainGrid* mainGrid )
|
||||||
|
{
|
||||||
// Create a bounding box (ie a ray) from the point down to minimum of grid
|
// Create a bounding box (ie a ray) from the point down to minimum of grid
|
||||||
cvf::Vec3d lowestPoint( point.x(), point.y(), mainGrid->boundingBox().min().z() );
|
cvf::Vec3d lowestPoint( point.x(), point.y(), mainGrid->boundingBox().min().z() );
|
||||||
|
|
||||||
|
@@ -580,9 +580,9 @@ std::set<std::pair<QString, QString>>
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<cvf::cref<RigFractureGrid>>
|
std::vector<cvf::cref<RigFractureGrid>>
|
||||||
RimEnsembleFractureStatistics::createFractureGrids( const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
RimEnsembleFractureStatistics::createFractureGrids( const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
||||||
RiaDefines::EclipseUnitSystem unitSystem,
|
RiaDefines::EclipseUnitSystem unitSystem,
|
||||||
const QString& resultNameOnFile,
|
const QString& resultNameOnFile,
|
||||||
MeshAlignmentType meshAlignmentType )
|
MeshAlignmentType meshAlignmentType )
|
||||||
{
|
{
|
||||||
// Defaults to avoid scaling
|
// Defaults to avoid scaling
|
||||||
double halfLengthScaleFactor = 1.0;
|
double halfLengthScaleFactor = 1.0;
|
||||||
@@ -620,8 +620,8 @@ std::vector<cvf::cref<RigFractureGrid>>
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::tuple<double, double, double, double>
|
std::tuple<double, double, double, double>
|
||||||
RimEnsembleFractureStatistics::findSamplingIntervals( const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
RimEnsembleFractureStatistics::findSamplingIntervals( const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
||||||
std::vector<double>& gridXs,
|
std::vector<double>& gridXs,
|
||||||
std::vector<double>& gridYs ) const
|
std::vector<double>& gridYs ) const
|
||||||
{
|
{
|
||||||
// Find min and max extent of all the grids
|
// Find min and max extent of all the grids
|
||||||
auto [minX, maxX, minY, maxY] = findMaxGridExtents( stimPlanFractureDefinitions, m_meshAlignmentType() );
|
auto [minX, maxX, minY, maxY] = findMaxGridExtents( stimPlanFractureDefinitions, m_meshAlignmentType() );
|
||||||
@@ -647,7 +647,7 @@ std::tuple<double, double, double, double>
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::tuple<double, double, double, double>
|
std::tuple<double, double, double, double>
|
||||||
RimEnsembleFractureStatistics::findMaxGridExtents( const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
RimEnsembleFractureStatistics::findMaxGridExtents( const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
||||||
MeshAlignmentType meshAlignmentType )
|
MeshAlignmentType meshAlignmentType )
|
||||||
{
|
{
|
||||||
double minX = std::numeric_limits<double>::max();
|
double minX = std::numeric_limits<double>::max();
|
||||||
double maxX = -std::numeric_limits<double>::max();
|
double maxX = -std::numeric_limits<double>::max();
|
||||||
@@ -698,13 +698,13 @@ void RimEnsembleFractureStatistics::generateUniformMesh( double mi
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEnsembleFractureStatistics::generateNaiveMesh( double minX,
|
void RimEnsembleFractureStatistics::generateNaiveMesh( double minX,
|
||||||
double maxX,
|
double maxX,
|
||||||
double minY,
|
double minY,
|
||||||
double maxY,
|
double maxY,
|
||||||
const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
||||||
std::vector<double>& gridXs,
|
std::vector<double>& gridXs,
|
||||||
std::vector<double>& gridYs ) const
|
std::vector<double>& gridYs ) const
|
||||||
{
|
{
|
||||||
// Find max number of cells in x direction
|
// Find max number of cells in x direction
|
||||||
int maxNx = 0;
|
int maxNx = 0;
|
||||||
@@ -735,13 +735,13 @@ void RimEnsembleFractureStatistics::generateNaiveMesh( double
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEnsembleFractureStatistics::generateAdaptiveMesh( double minX,
|
void RimEnsembleFractureStatistics::generateAdaptiveMesh( double minX,
|
||||||
double maxX,
|
double maxX,
|
||||||
double minY,
|
double minY,
|
||||||
double maxY,
|
double maxY,
|
||||||
const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
||||||
std::vector<double>& gridXs,
|
std::vector<double>& gridXs,
|
||||||
std::vector<double>& gridYs ) const
|
std::vector<double>& gridYs ) const
|
||||||
{
|
{
|
||||||
// Find max number of cells in x direction
|
// Find max number of cells in x direction
|
||||||
int maxNx = 0;
|
int maxNx = 0;
|
||||||
@@ -792,7 +792,8 @@ void RimEnsembleFractureStatistics::generateAdaptiveMesh( double
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find the index of the last item where value is smaller
|
// Find the index of the last item where value is smaller
|
||||||
auto findSmallerIndex = []( double value, const std::vector<double>& vec ) {
|
auto findSmallerIndex = []( double value, const std::vector<double>& vec )
|
||||||
|
{
|
||||||
for ( size_t i = 0; i < vec.size(); i++ )
|
for ( size_t i = 0; i < vec.size(); i++ )
|
||||||
if ( vec[i] > value ) return i - 1;
|
if ( vec[i] > value ) return i - 1;
|
||||||
return vec.size();
|
return vec.size();
|
||||||
@@ -900,8 +901,8 @@ void RimEnsembleFractureStatistics::computeMeanThicknessPerLayer( const std::vec
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEnsembleFractureStatistics::generateAllLayers( const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
void RimEnsembleFractureStatistics::generateAllLayers( const std::vector<cvf::ref<RigStimPlanFractureDefinition>>& stimPlanFractureDefinitions,
|
||||||
std::vector<Layer>& layers,
|
std::vector<Layer>& layers,
|
||||||
MeshAlignmentType meshAlignmentType )
|
MeshAlignmentType meshAlignmentType )
|
||||||
{
|
{
|
||||||
for ( auto def : stimPlanFractureDefinitions )
|
for ( auto def : stimPlanFractureDefinitions )
|
||||||
{
|
{
|
||||||
@@ -1008,7 +1009,8 @@ void RimEnsembleFractureStatistics::sampleAllGrids( const std::vector<cvf::cref<
|
|||||||
std::shared_ptr<RigSlice2D> areaGrid,
|
std::shared_ptr<RigSlice2D> areaGrid,
|
||||||
std::shared_ptr<RigSlice2D> distanceGrid )
|
std::shared_ptr<RigSlice2D> distanceGrid )
|
||||||
{
|
{
|
||||||
auto computeCellSideLength = []( const std::vector<double>& values, size_t idx ) {
|
auto computeCellSideLength = []( const std::vector<double>& values, size_t idx )
|
||||||
|
{
|
||||||
if ( idx < values.size() - 1 )
|
if ( idx < values.size() - 1 )
|
||||||
return values[idx + 1] - values[idx];
|
return values[idx + 1] - values[idx];
|
||||||
else
|
else
|
||||||
@@ -1116,13 +1118,15 @@ void RimEnsembleFractureStatistics::generateStatisticsGrids(
|
|||||||
std::shared_ptr<RigSlice2D> areaGrid,
|
std::shared_ptr<RigSlice2D> areaGrid,
|
||||||
std::shared_ptr<RigSlice2D> distanceGrid )
|
std::shared_ptr<RigSlice2D> distanceGrid )
|
||||||
{
|
{
|
||||||
auto setValueNoInf = []( RigSlice2D& grid, size_t x, size_t y, double value ) {
|
auto setValueNoInf = []( RigSlice2D& grid, size_t x, size_t y, double value )
|
||||||
|
{
|
||||||
// Guard against inf (happens in the regions not covered by any mesh)
|
// Guard against inf (happens in the regions not covered by any mesh)
|
||||||
if ( std::isinf( value ) ) value = 0.0;
|
if ( std::isinf( value ) ) value = 0.0;
|
||||||
grid.setValue( x, y, value );
|
grid.setValue( x, y, value );
|
||||||
};
|
};
|
||||||
|
|
||||||
auto removeNonPositiveValues = []( const std::vector<double>& values ) {
|
auto removeNonPositiveValues = []( const std::vector<double>& values )
|
||||||
|
{
|
||||||
std::vector<double> nonZeroValues;
|
std::vector<double> nonZeroValues;
|
||||||
for ( double value : values )
|
for ( double value : values )
|
||||||
if ( value > 0.0 ) nonZeroValues.push_back( value );
|
if ( value > 0.0 ) nonZeroValues.push_back( value );
|
||||||
@@ -1288,7 +1292,8 @@ QString RimEnsembleFractureStatistics::generateStatisticsTable(
|
|||||||
text += "</thead>";
|
text += "</thead>";
|
||||||
text += "<tbody>";
|
text += "<tbody>";
|
||||||
|
|
||||||
auto emptyTextOnInf = []( double value, RiaNumberFormat::NumberFormatType numberFormat, int precision ) {
|
auto emptyTextOnInf = []( double value, RiaNumberFormat::NumberFormatType numberFormat, int precision )
|
||||||
|
{
|
||||||
if ( std::isinf( value ) )
|
if ( std::isinf( value ) )
|
||||||
return QString( "" );
|
return QString( "" );
|
||||||
else
|
else
|
||||||
|
@@ -179,10 +179,10 @@ protected:
|
|||||||
const RigSlice2D& distanceGrid,
|
const RigSlice2D& distanceGrid,
|
||||||
double targetArea );
|
double targetArea );
|
||||||
|
|
||||||
static void generateStatisticsGrids( const std::vector<std::vector<double>>& samples,
|
static void generateStatisticsGrids( const std::vector<std::vector<double>>& samples,
|
||||||
size_t numSamplesX,
|
size_t numSamplesX,
|
||||||
size_t numSamplesY,
|
size_t numSamplesY,
|
||||||
size_t numGrids,
|
size_t numGrids,
|
||||||
std::map<RimEnsembleFractureStatistics::StatisticsType, std::shared_ptr<RigSlice2D>>& statisticsGrids,
|
std::map<RimEnsembleFractureStatistics::StatisticsType, std::shared_ptr<RigSlice2D>>& statisticsGrids,
|
||||||
const std::vector<caf::AppEnum<RimEnsembleFractureStatistics::StatisticsType>>& statisticsTypes,
|
const std::vector<caf::AppEnum<RimEnsembleFractureStatistics::StatisticsType>>& statisticsTypes,
|
||||||
const RigHistogramData& areaHistogram,
|
const RigHistogramData& areaHistogram,
|
||||||
|
@@ -164,7 +164,8 @@ void RimThermalFractureTemplate::loadDataAndUpdate()
|
|||||||
m_fractureDefinitionData = fractureDefinitionData;
|
m_fractureDefinitionData = fractureDefinitionData;
|
||||||
if ( m_fractureDefinitionData )
|
if ( m_fractureDefinitionData )
|
||||||
{
|
{
|
||||||
auto addInjectivityFactor = []( std::shared_ptr<RigThermalFractureDefinition> def ) {
|
auto addInjectivityFactor = []( std::shared_ptr<RigThermalFractureDefinition> def )
|
||||||
|
{
|
||||||
int leakoffPressureDropIndex = def->getPropertyIndex( RiaDefines::leakoffPressureDropResultName() );
|
int leakoffPressureDropIndex = def->getPropertyIndex( RiaDefines::leakoffPressureDropResultName() );
|
||||||
int filtratePressureDropIndex = def->getPropertyIndex( RiaDefines::filtratePressureDropResultName() );
|
int filtratePressureDropIndex = def->getPropertyIndex( RiaDefines::filtratePressureDropResultName() );
|
||||||
QString injectivityValueTag = RiaDefines::injectivityFactorResultName();
|
QString injectivityValueTag = RiaDefines::injectivityFactorResultName();
|
||||||
@@ -185,7 +186,8 @@ void RimThermalFractureTemplate::loadDataAndUpdate()
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
auto addFilterCakeMobility = []( std::shared_ptr<RigThermalFractureDefinition> def ) {
|
auto addFilterCakeMobility = []( std::shared_ptr<RigThermalFractureDefinition> def )
|
||||||
|
{
|
||||||
int leakoffPressureDropIndex = def->getPropertyIndex( RiaDefines::leakoffPressureDropResultName() );
|
int leakoffPressureDropIndex = def->getPropertyIndex( RiaDefines::leakoffPressureDropResultName() );
|
||||||
int filtratePressureDropIndex = def->getPropertyIndex( RiaDefines::filtratePressureDropResultName() );
|
int filtratePressureDropIndex = def->getPropertyIndex( RiaDefines::filtratePressureDropResultName() );
|
||||||
int leakoffMobilityIndex = def->getPropertyIndex( RiaDefines::leakoffMobilityResultName() );
|
int leakoffMobilityIndex = def->getPropertyIndex( RiaDefines::leakoffMobilityResultName() );
|
||||||
|
@@ -441,7 +441,8 @@ void eraseInvalidEntries( std::vector<CorrelationMatrixRowOrColumn<KeyType, Valu
|
|||||||
{
|
{
|
||||||
matrix.erase( std::remove_if( matrix.begin(),
|
matrix.erase( std::remove_if( matrix.begin(),
|
||||||
matrix.end(),
|
matrix.end(),
|
||||||
[=]( const CorrelationMatrixRowOrColumn<KeyType, ValueType>& entry ) {
|
[=]( const CorrelationMatrixRowOrColumn<KeyType, ValueType>& entry )
|
||||||
|
{
|
||||||
bool isValid = RiaCurveDataTools::isValidValue( entry.m_correlationSum, false );
|
bool isValid = RiaCurveDataTools::isValidValue( entry.m_correlationSum, false );
|
||||||
return !isValid;
|
return !isValid;
|
||||||
} ),
|
} ),
|
||||||
@@ -454,7 +455,8 @@ void sortEntries( std::vector<CorrelationMatrixRowOrColumn<KeyType, ValueType>>&
|
|||||||
std::sort( matrix.begin(),
|
std::sort( matrix.begin(),
|
||||||
matrix.end(),
|
matrix.end(),
|
||||||
[&sortByAbsoluteValues]( const CorrelationMatrixRowOrColumn<KeyType, ValueType>& lhs,
|
[&sortByAbsoluteValues]( const CorrelationMatrixRowOrColumn<KeyType, ValueType>& lhs,
|
||||||
const CorrelationMatrixRowOrColumn<KeyType, ValueType>& rhs ) -> bool {
|
const CorrelationMatrixRowOrColumn<KeyType, ValueType>& rhs ) -> bool
|
||||||
|
{
|
||||||
if ( sortByAbsoluteValues )
|
if ( sortByAbsoluteValues )
|
||||||
return lhs.m_correlationAbsSum > rhs.m_correlationAbsSum;
|
return lhs.m_correlationAbsSum > rhs.m_correlationAbsSum;
|
||||||
else
|
else
|
||||||
|
@@ -369,8 +369,8 @@ void RimWellAllocationOverTimePlot::updateFromWell()
|
|||||||
const QBrush fillBrush( fillColor, Qt::BrushStyle::SolidPattern );
|
const QBrush fillBrush( fillColor, Qt::BrushStyle::SolidPattern );
|
||||||
auto interpolationType = m_flowValueType == FlowValueType::ACCUMULATED_FLOW_VOLUME ||
|
auto interpolationType = m_flowValueType == FlowValueType::ACCUMULATED_FLOW_VOLUME ||
|
||||||
m_flowValueType == FlowValueType::ACCUMULATED_FLOW_VOLUME_PERCENTAGE
|
m_flowValueType == FlowValueType::ACCUMULATED_FLOW_VOLUME_PERCENTAGE
|
||||||
? RiuQwtPlotCurveDefines::CurveInterpolationEnum::INTERPOLATION_POINT_TO_POINT
|
? RiuQwtPlotCurveDefines::CurveInterpolationEnum::INTERPOLATION_POINT_TO_POINT
|
||||||
: RiuQwtPlotCurveDefines::CurveInterpolationEnum::INTERPOLATION_STEP_LEFT;
|
: RiuQwtPlotCurveDefines::CurveInterpolationEnum::INTERPOLATION_STEP_LEFT;
|
||||||
|
|
||||||
RiuPlotCurve* curve = m_plotWidget->createPlotCurve( nullptr, wellName );
|
RiuPlotCurve* curve = m_plotWidget->createPlotCurve( nullptr, wellName );
|
||||||
curve->setAppearance( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_SOLID, interpolationType, 2, qColor, fillBrush );
|
curve->setAppearance( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_SOLID, interpolationType, 2, qColor, fillBrush );
|
||||||
@@ -792,9 +792,8 @@ void RimWellAllocationOverTimePlot::setValidTimeStepRangeForCase()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto isTimeStepInCase = [&]( const QDateTime timeStep ) -> bool {
|
auto isTimeStepInCase = [&]( const QDateTime timeStep ) -> bool
|
||||||
return std::find( m_case->timeStepDates().cbegin(), m_case->timeStepDates().cend(), timeStep ) != m_case->timeStepDates().cend();
|
{ return std::find( m_case->timeStepDates().cbegin(), m_case->timeStepDates().cend(), timeStep ) != m_case->timeStepDates().cend(); };
|
||||||
};
|
|
||||||
if ( m_selectedFromTimeStep().isValid() && isTimeStepInCase( m_selectedFromTimeStep() ) && m_selectedToTimeStep().isValid() &&
|
if ( m_selectedFromTimeStep().isValid() && isTimeStepInCase( m_selectedFromTimeStep() ) && m_selectedToTimeStep().isValid() &&
|
||||||
isTimeStepInCase( m_selectedToTimeStep() ) )
|
isTimeStepInCase( m_selectedToTimeStep() ) )
|
||||||
{
|
{
|
||||||
|
@@ -303,13 +303,11 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
|
|
||||||
accumulatedWellFlowPlot()->addPlot( plotTrack );
|
accumulatedWellFlowPlot()->addPlot( plotTrack );
|
||||||
|
|
||||||
const std::vector<double>& depthValues = depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER
|
const std::vector<double>& depthValues =
|
||||||
? wfCalculator->connectionNumbersFromTop( brIdx )
|
depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER ? wfCalculator->connectionNumbersFromTop( brIdx )
|
||||||
: depthType == RiaDefines::DepthTypeEnum::PSEUDO_LENGTH
|
: depthType == RiaDefines::DepthTypeEnum::PSEUDO_LENGTH ? wfCalculator->pseudoLengthFromTop( brIdx )
|
||||||
? wfCalculator->pseudoLengthFromTop( brIdx )
|
: depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ? wfCalculator->trueVerticalDepth( brIdx )
|
||||||
: depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH
|
: std::vector<double>();
|
||||||
? wfCalculator->trueVerticalDepth( brIdx )
|
|
||||||
: std::vector<double>();
|
|
||||||
|
|
||||||
if ( !depthValues.empty() )
|
if ( !depthValues.empty() )
|
||||||
{
|
{
|
||||||
|
@@ -65,7 +65,7 @@ std::map<QString, const std::vector<double>*>
|
|||||||
{
|
{
|
||||||
if ( flowDiagSolution->tracerStatusInTimeStep( tracerName, timeStepIndex ) == requestedTracerType )
|
if ( flowDiagSolution->tracerStatusInTimeStep( tracerName, timeStepIndex ) == requestedTracerType )
|
||||||
{
|
{
|
||||||
RigFlowDiagResultAddress resAddr( RIG_FLD_CELL_FRACTION_RESNAME, phaseSelection, tracerName.toStdString() );
|
RigFlowDiagResultAddress resAddr( RIG_FLD_CELL_FRACTION_RESNAME, phaseSelection, tracerName.toStdString() );
|
||||||
const std::vector<double>* tracerCellFractions = flowDiagSolution->flowDiagResults()->resultValues( resAddr, timeStepIndex );
|
const std::vector<double>* tracerCellFractions = flowDiagSolution->flowDiagResults()->resultValues( resAddr, timeStepIndex );
|
||||||
if ( tracerCellFractions )
|
if ( tracerCellFractions )
|
||||||
{
|
{
|
||||||
|
@@ -828,7 +828,8 @@ QString RimWellConnectivityTable::createTableTitle() const
|
|||||||
RiaDefines::EclipseUnitSystem unitSet = m_case->eclipseCaseData()->unitsType();
|
RiaDefines::EclipseUnitSystem unitSet = m_case->eclipseCaseData()->unitsType();
|
||||||
RimWellLogFile::WellFlowCondition condition = RimWellLogFile::WELL_FLOW_COND_RESERVOIR;
|
RimWellLogFile::WellFlowCondition condition = RimWellLogFile::WELL_FLOW_COND_RESERVOIR;
|
||||||
|
|
||||||
auto timeSampleValueTypeText = [&]() -> QString {
|
auto timeSampleValueTypeText = [&]() -> QString
|
||||||
|
{
|
||||||
if ( m_timeSampleValueType == TimeSampleValueType::FLOW_RATE_PERCENTAGE )
|
if ( m_timeSampleValueType == TimeSampleValueType::FLOW_RATE_PERCENTAGE )
|
||||||
{
|
{
|
||||||
return QString( "Percentage of Total Reservoir Flow Rate [%]" );
|
return QString( "Percentage of Total Reservoir Flow Rate [%]" );
|
||||||
@@ -844,7 +845,8 @@ QString RimWellConnectivityTable::createTableTitle() const
|
|||||||
return QString();
|
return QString();
|
||||||
};
|
};
|
||||||
|
|
||||||
auto timeRangeValueTypeText = [&]() -> QString {
|
auto timeRangeValueTypeText = [&]() -> QString
|
||||||
|
{
|
||||||
if ( m_timeRangeValueType() == TimeRangeValueType::ACCUMULATED_FLOW_VOLUME )
|
if ( m_timeRangeValueType() == TimeRangeValueType::ACCUMULATED_FLOW_VOLUME )
|
||||||
{
|
{
|
||||||
return "Accumulated Total " + RimWellPlotTools::flowVolumePlotAxisTitle( condition, unitSet );
|
return "Accumulated Total " + RimWellPlotTools::flowVolumePlotAxisTitle( condition, unitSet );
|
||||||
@@ -1150,7 +1152,8 @@ std::vector<QString> RimWellConnectivityTable::getViewFilteredWellNamesFromFilte
|
|||||||
{
|
{
|
||||||
if ( !m_cellFilterView || !m_case || !m_case->eclipseCaseData() ) return {};
|
if ( !m_cellFilterView || !m_case || !m_case->eclipseCaseData() ) return {};
|
||||||
|
|
||||||
auto isProductionTypeOfFilterType = [&]( RiaDefines::WellProductionType productionType ) -> bool {
|
auto isProductionTypeOfFilterType = [&]( RiaDefines::WellProductionType productionType ) -> bool
|
||||||
|
{
|
||||||
if ( filterType == ViewFilterType::FILTER_BY_VISIBLE_PRODUCERS )
|
if ( filterType == ViewFilterType::FILTER_BY_VISIBLE_PRODUCERS )
|
||||||
{
|
{
|
||||||
return productionType == RiaDefines::WellProductionType::PRODUCER ||
|
return productionType == RiaDefines::WellProductionType::PRODUCER ||
|
||||||
@@ -1338,8 +1341,8 @@ RigWellAllocationOverTime RimWellConnectivityTable::createWellAllocationOverTime
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellConnectivityTable::createAndEmplaceTimeStepAndCalculatorPairInMap( std::map<QDateTime, RigAccWellFlowCalculator>& rTimeStepAndCalculatorPairs,
|
void RimWellConnectivityTable::createAndEmplaceTimeStepAndCalculatorPairInMap( std::map<QDateTime, RigAccWellFlowCalculator>& rTimeStepAndCalculatorPairs,
|
||||||
const QDateTime timeStep,
|
const QDateTime timeStep,
|
||||||
int timeStepIndex,
|
int timeStepIndex,
|
||||||
const RigSimWellData* simWellData ) const
|
const RigSimWellData* simWellData ) const
|
||||||
{
|
{
|
||||||
if ( timeStepIndex < 0 ) return;
|
if ( timeStepIndex < 0 ) return;
|
||||||
@@ -1365,9 +1368,9 @@ void RimWellConnectivityTable::createAndEmplaceTimeStepAndCalculatorPairInMap( s
|
|||||||
simWellData->wellProductionType( timeStepIndex ) == RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE );
|
simWellData->wellProductionType( timeStepIndex ) == RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE );
|
||||||
|
|
||||||
// Retrieve cell visibilities for valid cell filter view
|
// Retrieve cell visibilities for valid cell filter view
|
||||||
const auto* cellVisibilities = m_cellFilterView && m_viewFilterType == ViewFilterType::CALCULATE_BY_VISIBLE_CELLS
|
const auto* cellVisibilities = m_cellFilterView && m_viewFilterType == ViewFilterType::CALCULATE_BY_VISIBLE_CELLS
|
||||||
? m_cellFilterView->currentTotalCellVisibility().p()
|
? m_cellFilterView->currentTotalCellVisibility().p()
|
||||||
: nullptr;
|
: nullptr;
|
||||||
RigEclCellIndexCalculator cellIdxCalc( m_case->eclipseCaseData()->mainGrid(),
|
RigEclCellIndexCalculator cellIdxCalc( m_case->eclipseCaseData()->mainGrid(),
|
||||||
m_case->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL ),
|
m_case->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL ),
|
||||||
cellVisibilities );
|
cellVisibilities );
|
||||||
|
@@ -703,17 +703,20 @@ QString RimWellPlotTools::simWellName( const QString& wellPathNameOrSimWellName
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimWellPlotTools::tryMatchChannelName( const std::set<QString>& channelNames, const QString& channelNameToMatch )
|
bool RimWellPlotTools::tryMatchChannelName( const std::set<QString>& channelNames, const QString& channelNameToMatch )
|
||||||
{
|
{
|
||||||
auto itr = std::find_if( channelNames.begin(), channelNames.end(), [&]( const QString& channelName ) {
|
auto itr = std::find_if( channelNames.begin(),
|
||||||
if ( channelName.startsWith( '^' ) )
|
channelNames.end(),
|
||||||
{
|
[&]( const QString& channelName )
|
||||||
std::regex pattern( channelName.toStdString() );
|
{
|
||||||
return std::regex_match( channelNameToMatch.toStdString(), pattern );
|
if ( channelName.startsWith( '^' ) )
|
||||||
}
|
{
|
||||||
else
|
std::regex pattern( channelName.toStdString() );
|
||||||
{
|
return std::regex_match( channelNameToMatch.toStdString(), pattern );
|
||||||
return (bool)channelName.contains( channelNameToMatch, Qt::CaseInsensitive );
|
}
|
||||||
}
|
else
|
||||||
} );
|
{
|
||||||
|
return (bool)channelName.contains( channelNameToMatch, Qt::CaseInsensitive );
|
||||||
|
}
|
||||||
|
} );
|
||||||
return itr != channelNames.end();
|
return itr != channelNames.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1323,7 +1326,7 @@ std::map<QDateTime, std::set<RifDataSourceForRftPlt>>
|
|||||||
void RimWellPlotTools::calculateValueOptionsForTimeSteps( const QString& wellPathNameOrSimWellName,
|
void RimWellPlotTools::calculateValueOptionsForTimeSteps( const QString& wellPathNameOrSimWellName,
|
||||||
const std::vector<RifDataSourceForRftPlt>& selSources,
|
const std::vector<RifDataSourceForRftPlt>& selSources,
|
||||||
const std::set<RifEclipseRftAddress::RftWellLogChannelType>& interestingRFTResults,
|
const std::set<RifEclipseRftAddress::RftWellLogChannelType>& interestingRFTResults,
|
||||||
QList<caf::PdmOptionItemInfo>& options )
|
QList<caf::PdmOptionItemInfo>& options )
|
||||||
{
|
{
|
||||||
auto timestepsToShowWithSources = calculateRelevantTimeStepsFromCases( wellPathNameOrSimWellName, selSources, interestingRFTResults );
|
auto timestepsToShowWithSources = calculateRelevantTimeStepsFromCases( wellPathNameOrSimWellName, selSources, interestingRFTResults );
|
||||||
|
|
||||||
|
@@ -562,11 +562,10 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
std::vector<QString> tracerNames = wfPhaseAccumulator.tracerNames();
|
std::vector<QString> tracerNames = wfPhaseAccumulator.tracerNames();
|
||||||
for ( const QString& tracerName : tracerNames )
|
for ( const QString& tracerName : tracerNames )
|
||||||
{
|
{
|
||||||
auto color = tracerName == RIG_FLOW_OIL_NAME
|
auto color = tracerName == RIG_FLOW_OIL_NAME ? cvf::Color3f::DARK_GREEN
|
||||||
? cvf::Color3f::DARK_GREEN
|
: tracerName == RIG_FLOW_GAS_NAME ? cvf::Color3f::DARK_RED
|
||||||
: tracerName == RIG_FLOW_GAS_NAME
|
: tracerName == RIG_FLOW_WATER_NAME ? cvf::Color3f::BLUE
|
||||||
? cvf::Color3f::DARK_RED
|
: cvf::Color3f::DARK_GRAY;
|
||||||
: tracerName == RIG_FLOW_WATER_NAME ? cvf::Color3f::BLUE : cvf::Color3f::DARK_GRAY;
|
|
||||||
|
|
||||||
if ( tracerName == RIG_FLOW_OIL_NAME && selectedPhases.count( FLOW_PHASE_OIL ) ||
|
if ( tracerName == RIG_FLOW_OIL_NAME && selectedPhases.count( FLOW_PHASE_OIL ) ||
|
||||||
tracerName == RIG_FLOW_GAS_NAME && selectedPhases.count( FLOW_PHASE_GAS ) ||
|
tracerName == RIG_FLOW_GAS_NAME && selectedPhases.count( FLOW_PHASE_GAS ) ||
|
||||||
@@ -633,12 +632,10 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
const auto& channelName = std::get<1>( channelInfo );
|
const auto& channelName = std::get<1>( channelInfo );
|
||||||
if ( selectedPhases.count( RimWellPlotTools::flowPhaseFromChannelName( channelName ) ) > 0 )
|
if ( selectedPhases.count( RimWellPlotTools::flowPhaseFromChannelName( channelName ) ) > 0 )
|
||||||
{
|
{
|
||||||
auto color = RimWellPlotTools::isOilFlowChannel( channelName )
|
auto color = RimWellPlotTools::isOilFlowChannel( channelName ) ? cvf::Color3f::DARK_GREEN
|
||||||
? cvf::Color3f::DARK_GREEN
|
: RimWellPlotTools::isGasFlowChannel( channelName ) ? cvf::Color3f::DARK_RED
|
||||||
: RimWellPlotTools::isGasFlowChannel( channelName )
|
: RimWellPlotTools::isWaterFlowChannel( channelName ) ? cvf::Color3f::BLUE
|
||||||
? cvf::Color3f::DARK_RED
|
: cvf::Color3f::DARK_GRAY;
|
||||||
: RimWellPlotTools::isWaterFlowChannel( channelName ) ? cvf::Color3f::BLUE
|
|
||||||
: cvf::Color3f::DARK_GRAY;
|
|
||||||
|
|
||||||
FlowPhase flowPhase = FLOW_PHASE_NONE;
|
FlowPhase flowPhase = FLOW_PHASE_NONE;
|
||||||
if ( RimWellPlotTools::isOilFlowChannel( channelName ) )
|
if ( RimWellPlotTools::isOilFlowChannel( channelName ) )
|
||||||
|
@@ -1346,9 +1346,9 @@ void RimWellRftPlot::defineCurveColorsAndSymbols( const std::set<RiaRftPltCurveD
|
|||||||
for ( RimWellRftEnsembleCurveSet* curveSet : m_ensembleCurveSets() )
|
for ( RimWellRftEnsembleCurveSet* curveSet : m_ensembleCurveSets() )
|
||||||
{
|
{
|
||||||
CAF_ASSERT( curveSet );
|
CAF_ASSERT( curveSet );
|
||||||
auto ensemble_it = std::find_if( ensembles.begin(), ensembles.end(), [&curveSet]( const RimSummaryCaseCollection* ensemble ) {
|
auto ensemble_it = std::find_if( ensembles.begin(),
|
||||||
return curveSet->ensemble() == ensemble;
|
ensembles.end(),
|
||||||
} );
|
[&curveSet]( const RimSummaryCaseCollection* ensemble ) { return curveSet->ensemble() == ensemble; } );
|
||||||
if ( ensemble_it != ensembles.end() )
|
if ( ensemble_it != ensembles.end() )
|
||||||
{
|
{
|
||||||
curveSet->initializeLegend();
|
curveSet->initializeLegend();
|
||||||
|
@@ -68,9 +68,9 @@ protected:
|
|||||||
std::vector<double> retrieveParameterWeights() override;
|
std::vector<double> retrieveParameterWeights() override;
|
||||||
std::vector<double> generateResults( int viewerStepIndex ) override;
|
std::vector<double> generateResults( int viewerStepIndex ) override;
|
||||||
std::vector<double>
|
std::vector<double>
|
||||||
generateResultsFromAddress( RigFemResultAddress resultAddress, const std::vector<bool>& mapCellVisibility, int viewerStepIndex );
|
generateResultsFromAddress( RigFemResultAddress resultAddress, const std::vector<bool>& mapCellVisibility, int viewerStepIndex );
|
||||||
bool resultVariableChanged() const override;
|
bool resultVariableChanged() const override;
|
||||||
void clearResultVariable() override;
|
void clearResultVariable() override;
|
||||||
RimGridView* baseView() const override;
|
RimGridView* baseView() const override;
|
||||||
std::vector<size_t> findIntersectingCells( const cvf::BoundingBox& bbox ) const override;
|
std::vector<size_t> findIntersectingCells( const cvf::BoundingBox& bbox ) const override;
|
||||||
size_t kLayer( size_t globalCellIdx ) const override;
|
size_t kLayer( size_t globalCellIdx ) const override;
|
||||||
|
@@ -1118,7 +1118,7 @@ void Rim3dView::addMeasurementToModel( cvf::ModelBasicList* measureModel )
|
|||||||
{
|
{
|
||||||
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
|
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
|
||||||
cvf::Camera* mainOrComparisonCamera = isUsingOverrideViewer() ? nativeOrOverrideViewer()->comparisonMainCamera()
|
cvf::Camera* mainOrComparisonCamera = isUsingOverrideViewer() ? nativeOrOverrideViewer()->comparisonMainCamera()
|
||||||
: nativeOrOverrideViewer()->mainCamera();
|
: nativeOrOverrideViewer()->mainCamera();
|
||||||
m_measurementPartManager->appendGeometryPartsToModel( mainOrComparisonCamera,
|
m_measurementPartManager->appendGeometryPartsToModel( mainOrComparisonCamera,
|
||||||
measureModel,
|
measureModel,
|
||||||
transForm.p(),
|
transForm.p(),
|
||||||
|
@@ -873,7 +873,7 @@ void RimContourMapProjection::generateTrianglesWithVertexValues()
|
|||||||
bool anyValidVertex = false;
|
bool anyValidVertex = false;
|
||||||
for ( size_t n = 0; n < 3; ++n )
|
for ( size_t n = 0; n < 3; ++n )
|
||||||
{
|
{
|
||||||
uint vn = ( *faceList )[i + n];
|
uint vn = ( *faceList )[i + n];
|
||||||
double value = vn < m_aggregatedVertexResults.size() ? m_aggregatedVertexResults[vn] : std::numeric_limits<double>::infinity();
|
double value = vn < m_aggregatedVertexResults.size() ? m_aggregatedVertexResults[vn] : std::numeric_limits<double>::infinity();
|
||||||
triangle[n] = vertices[vn];
|
triangle[n] = vertices[vn];
|
||||||
triangleWithValues[n] = cvf::Vec4d( vertices[vn], value );
|
triangleWithValues[n] = cvf::Vec4d( vertices[vn], value );
|
||||||
|
@@ -170,8 +170,8 @@ protected:
|
|||||||
std::vector<cvf::Vec3d> generateVertices() const;
|
std::vector<cvf::Vec3d> generateVertices() const;
|
||||||
void generateContourPolygons();
|
void generateContourPolygons();
|
||||||
ContourPolygons createContourPolygonsFromLineSegments( caf::ContourLines::ListOfLineSegments& unorderedLineSegments, double contourValue );
|
ContourPolygons createContourPolygonsFromLineSegments( caf::ContourLines::ListOfLineSegments& unorderedLineSegments, double contourValue );
|
||||||
void smoothContourPolygons( ContourPolygons* contourPolygons, bool favourExpansion );
|
void smoothContourPolygons( ContourPolygons* contourPolygons, bool favourExpansion );
|
||||||
void clipContourPolygons( ContourPolygons* contourPolygons, const ContourPolygons* clipBy );
|
void clipContourPolygons( ContourPolygons* contourPolygons, const ContourPolygons* clipBy );
|
||||||
static double sumPolygonArea( const ContourPolygons& contourPolygons );
|
static double sumPolygonArea( const ContourPolygons& contourPolygons );
|
||||||
static double sumTriangleAreas( const std::vector<cvf::Vec4d>& triangles );
|
static double sumTriangleAreas( const std::vector<cvf::Vec4d>& triangles );
|
||||||
|
|
||||||
|
@@ -55,7 +55,8 @@ std::vector<RimGridCalculation*> RimGridCalculationCollection::sortedGridCalcula
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if source calculation is depending on other. Will check one level dependency.
|
// Check if source calculation is depending on other. Will check one level dependency.
|
||||||
auto isSourceDependingOnOther = []( const RimGridCalculation* source, const RimGridCalculation* other ) -> bool {
|
auto isSourceDependingOnOther = []( const RimGridCalculation* source, const RimGridCalculation* other ) -> bool
|
||||||
|
{
|
||||||
auto outputCase = source->outputEclipseCase();
|
auto outputCase = source->outputEclipseCase();
|
||||||
auto outputAdr = source->outputAddress();
|
auto outputAdr = source->outputAddress();
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user