Skip to content

Commit

Permalink
Merge pull request #389 from OPM/dev
Browse files Browse the repository at this point in the history
Copy up dev to master for release 1.4.0
  • Loading branch information
JacobStoren committed Aug 21, 2015
2 parents a32e623 + ac37cd8 commit 989add1
Show file tree
Hide file tree
Showing 2,239 changed files with 63,483 additions and 22,773 deletions.
189 changes: 127 additions & 62 deletions ApplicationCode/Application/RiaApplication.cpp

Large diffs are not rendered by default.

32 changes: 20 additions & 12 deletions ApplicationCode/Application/RiaApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@

class RIProcess;
class RigCaseData;
class RimCase;
class RimEclipseCase;
class Drawable;
class RiaSocketServer;
class RiaPreferences;
class RimReservoirView;
class RimEclipseView;
class RimView;
class RimProject;
class RimCommandObject;
class RiaProjectModifier;
Expand All @@ -60,7 +61,9 @@ class RiaApplication : public QApplication
enum RINavigationPolicy
{
NAVIGATION_POLICY_CEETRON,
NAVIGATION_POLICY_CAD
NAVIGATION_POLICY_CAD,
NAVIGATION_POLICY_GEOQUEST,
NAVIGATION_POLICY_RMS
};

public:
Expand All @@ -72,11 +75,11 @@ class RiaApplication : public QApplication

void executeRegressionTests(const QString& regressionTestPath);

void setActiveReservoirView(RimReservoirView*);
RimReservoirView* activeReservoirView();
const RimReservoirView* activeReservoirView() const;
void setActiveReservoirView(RimView*);
RimView* activeReservoirView();
const RimView* activeReservoirView() const;

void scheduleDisplayModelUpdateAndRedraw(RimReservoirView* resViewToUpdate);
void scheduleDisplayModelUpdateAndRedraw(RimView* resViewToUpdate);

RimProject* project();

Expand All @@ -94,6 +97,8 @@ class RiaApplication : public QApplication
bool addEclipseCases(const QStringList& fileNames);
bool openInputEclipseCaseFromFileNames(const QStringList& fileNames);

bool openOdbCaseFromFile(const QString& fileName);

QString currentProjectFileName() const;
QString createAbsolutePathFromProjectRelativePath(QString projectRelativePath);
bool loadProject(const QString& projectFileName);
Expand Down Expand Up @@ -149,6 +154,8 @@ class RiaApplication : public QApplication
void addCommandObject(RimCommandObject* commandObject);
void executeCommandObjects();

bool isRunningRegressionTests() const;

private:
enum ProjectLoadAction
{
Expand All @@ -169,10 +176,10 @@ private slots:
void slotUpdateScheduledDisplayModels();

private:
caf::PdmPointer<RimReservoirView> m_activeReservoirView;
caf::PdmPointer<RimView> m_activeReservoirView;
caf::PdmPointer<RimProject> m_project;

std::vector<caf::PdmPointer<RimReservoirView> > m_resViewsToUpdate;
std::vector<caf::PdmPointer<RimView> > m_resViewsToUpdate;
QTimer* m_resViewUpdateTimer;

RiaSocketServer* m_socketServer;
Expand All @@ -193,8 +200,9 @@ private slots:

QMap<QString, QVariant> m_sessionCache; // Session cache used to store username/passwords per session

std::list<RimCommandObject*> m_commandQueue;
QMutex m_commandQueueLock;
std::list<RimCommandObject*> m_commandQueue;
QMutex m_commandQueueLock;

QString m_helpText;
QString m_helpText;
bool m_runningRegressionTests;
};
4 changes: 2 additions & 2 deletions ApplicationCode/Application/RiaImageFileCompare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ bool RiaImageFileCompare::runComparison(QString imgFileName, QString refFileName
// The ImageMagick compare tool on RedHat 5 does not support the lowlight-color options
// Use GCC version as a crude mechanism for disabling use of this option on RedHat5
#if (__GNUC__ == 4 && __GNUC_MINOR__ <= 1)
QString args = QString("-metric ae \"%1\" \"%2\" \"%3\"").arg(imgFileName).arg(refFileName).arg((diffFileName));
QString args = QString("-fuzz 0.4% -metric ae \"%1\" \"%2\" \"%3\"").arg(imgFileName).arg(refFileName).arg((diffFileName));
#else
QString args = QString("-lowlight-color white -metric ae \"%1\" \"%2\" \"%3\"").arg(imgFileName).arg(refFileName).arg((diffFileName));
QString args = QString("-fuzz 0.4% -lowlight-color white -metric ae \"%1\" \"%2\" \"%3\"").arg(imgFileName).arg(refFileName).arg((diffFileName));
#endif
QString completeCommand = QString("\"%1\" %2").arg(m_compareExecutable).arg(args);

Expand Down
52 changes: 23 additions & 29 deletions ApplicationCode/Application/RiaProjectModifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
#include "RiaProjectModifier.h"

#include "RimProject.h"
#include "RimAnalysisModels.h"
#include "RimEclipseCaseCollection.h"
#include "RimOilField.h"
#include "RimIdenticalGridCaseGroup.h"
#include "RimCaseCollection.h"
#include "RimResultCase.h"
#include "RimEclipseResultCase.h"

#include "RimReservoirView.h"
#include "RimEclipseView.h"
#include "RimWellPathCollection.h"
#include "RimScriptCollection.h"
#include "RimCellPropertyFilterCollection.h"
#include "RimCellPropertyFilter.h"
#include "RimEclipsePropertyFilterCollection.h"
#include "RimEclipsePropertyFilter.h"
#include "RimReservoirCellResultsStorage.h"
#include "RimResultSlot.h"
#include "RimCellEdgeResultSlot.h"
#include "RimEclipseCellColors.h"
#include "RimCellEdgeColors.h"
#include "RimCellRangeFilterCollection.h"
#include "RimWellCollection.h"
#include "RimEclipseWellCollection.h"
#include "Rim3dOverlayInfoConfig.h"


Expand Down Expand Up @@ -145,7 +145,7 @@ bool RiaProjectModifier::replaceSourceCases(RimProject* project)
for (size_t oilFieldIdx = 0; oilFieldIdx < project->oilFields().size(); oilFieldIdx++)
{
RimOilField* oilField = project->oilFields[oilFieldIdx];
RimAnalysisModels* analysisModels = oilField ? oilField->analysisModels() : NULL;
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : NULL;
if (analysisModels)
{
const size_t numCaseGroups = analysisModels->caseGroups.size();
Expand All @@ -164,7 +164,7 @@ bool RiaProjectModifier::replaceSourceCases(RimProject* project)
QString caseName = caseNameFromGridFileName(fileName);

// Use this slightly hackish method in order to get a new unique ID
RimResultCase* resCase = new RimResultCase;
RimEclipseResultCase* resCase = new RimEclipseResultCase;
resCase->setCaseInfo(caseName, fileName);

caseCollection->reservoirs.push_back(resCase);
Expand All @@ -191,30 +191,24 @@ bool RiaProjectModifier::replaceSourceCases(RimProject* project)
bool RiaProjectModifier::replaceCase(RimProject* project)
{
bool didReplacement = false;
std::vector<RimCase*> allCases;
project->allCases(allCases);

for (size_t oilFieldIdx = 0; oilFieldIdx < project->oilFields().size(); oilFieldIdx++)
for (size_t caseIdx = 0; caseIdx < allCases.size(); ++caseIdx)
{
RimOilField* oilField = project->oilFields[oilFieldIdx];
RimAnalysisModels* analysisModels = oilField ? oilField->analysisModels() : NULL;
if (analysisModels)
RimEclipseResultCase* resultCase = dynamic_cast<RimEclipseResultCase*>(allCases[caseIdx]);
if (resultCase)
{
for (size_t caseIdx = 0; caseIdx < analysisModels->cases.size(); ++caseIdx)
if (m_replaceCase_caseId == FIRST_OCCURENCE ||
m_replaceCase_caseId == resultCase->caseId())
{
RimResultCase* resultCase = dynamic_cast<RimResultCase*>(analysisModels->cases[caseIdx]);
if (resultCase)
resultCase->setGridFileName(m_replaceCase_gridFileName);
resultCase->caseUserDescription = caseNameFromGridFileName(m_replaceCase_gridFileName);
didReplacement = true;

if (m_replaceCase_caseId == FIRST_OCCURENCE)
{
if (m_replaceCase_caseId == FIRST_OCCURENCE ||
m_replaceCase_caseId == resultCase->caseId())
{
resultCase->setGridFileName(m_replaceCase_gridFileName);
resultCase->caseUserDescription = caseNameFromGridFileName(m_replaceCase_gridFileName);
didReplacement = true;

if (m_replaceCase_caseId == FIRST_OCCURENCE)
{
return true;
}
}
return true;
}
}
}
Expand Down
Loading

0 comments on commit 989add1

Please sign in to comment.