mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Option: Read fault data
This commit is contained in:
parent
de7dddc25e
commit
183203344b
@ -59,7 +59,7 @@ RiaPreferences::RiaPreferences(void)
|
||||
CAF_PDM_InitField(&autocomputeSOIL, "autocomputeSOIL", true, "SOIL", "", "SOIL = 1.0 - SGAS - SWAT", "");
|
||||
CAF_PDM_InitField(&autocomputeDepthRelatedProperties,"autocomputeDepth", true, "DEPTH related properties", "", "DEPTH, DX, DY, DZ, TOP, BOTTOM", "");
|
||||
|
||||
CAF_PDM_InitField(&enableFaultsImport, "enableFaultsImport", true, "Read faults in case import", "", "", "");
|
||||
CAF_PDM_InitField(&readFaultData, "readFaultData", true, "Read fault data", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -111,7 +111,7 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
autoComputeGroup->add(&autocomputeDepthRelatedProperties);
|
||||
|
||||
caf::PdmUiGroup* faultsGroup = uiOrdering.addNewGroup("Faults");
|
||||
faultsGroup->add(&enableFaultsImport);
|
||||
faultsGroup->add(&readFaultData);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -126,6 +126,6 @@ void RiaPreferences::resetToDefaults()
|
||||
autocomputeSOIL = true;
|
||||
autocomputeDepthRelatedProperties = true;
|
||||
|
||||
enableFaultsImport = true;
|
||||
readFaultData = true;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public: // Pdm Fields
|
||||
caf::PdmField<bool> autocomputeSOIL;
|
||||
caf::PdmField<bool> autocomputeDepthRelatedProperties;
|
||||
|
||||
caf::PdmField<bool> enableFaultsImport;
|
||||
caf::PdmField<bool> readFaultData;
|
||||
|
||||
protected:
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute);
|
||||
|
@ -67,7 +67,7 @@ RifEclipseInputFileTools::~RifEclipseInputFileTools()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigCaseData* eclipseCase, bool importFaults)
|
||||
bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigCaseData* eclipseCase, bool readFaultData)
|
||||
{
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
@ -168,7 +168,7 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigCaseData
|
||||
progress.setProgress(7);
|
||||
progress.setProgressDescription("Read faults ...");
|
||||
|
||||
if (importFaults)
|
||||
if (readFaultData)
|
||||
{
|
||||
cvf::Collection<RigFault> faults;
|
||||
RifEclipseInputFileTools::readFaults(fileName, faults, keywordsAndFilePos);
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
RifEclipseInputFileTools();
|
||||
virtual ~RifEclipseInputFileTools();
|
||||
|
||||
static bool openGridFile(const QString& fileName, RigCaseData* eclipseCase, bool importFaults);
|
||||
static bool openGridFile(const QString& fileName, RigCaseData* eclipseCase, bool readFaultData);
|
||||
|
||||
// Returns map of assigned resultName and Eclipse Keyword.
|
||||
static std::map<QString, QString> readProperties(const QString& fileName, RigCaseData* eclipseCase);
|
||||
|
@ -44,11 +44,11 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
RifReaderInterface() { m_enableFaultsImport = false; }
|
||||
RifReaderInterface() { m_readFaultData = false; }
|
||||
virtual ~RifReaderInterface() {}
|
||||
|
||||
void enableFaultsImport(bool enableFaultsImport) { m_enableFaultsImport = enableFaultsImport; }
|
||||
bool isFaultImportEnabled() { return m_enableFaultsImport; }
|
||||
void readFaultData(bool readFaultData) { m_readFaultData = readFaultData; }
|
||||
bool isFaultImportEnabled() { return m_readFaultData; }
|
||||
|
||||
virtual bool open(const QString& fileName, RigCaseData* eclipseCase) = 0;
|
||||
virtual void close() = 0;
|
||||
@ -64,5 +64,5 @@ public:
|
||||
|
||||
private:
|
||||
std::vector<QString> m_filenamesWithFaults;
|
||||
bool m_enableFaultsImport;
|
||||
bool m_readFaultData;
|
||||
};
|
||||
|
@ -107,7 +107,7 @@ void RimInputCase::openDataFileSet(const QStringList& fileNames)
|
||||
|
||||
for (int i = 0; i < fileNames.size(); i++)
|
||||
{
|
||||
if (RifEclipseInputFileTools::openGridFile(fileNames[i], this->reservoirData(), prefs->enableFaultsImport()))
|
||||
if (RifEclipseInputFileTools::openGridFile(fileNames[i], this->reservoirData(), prefs->readFaultData()))
|
||||
{
|
||||
m_gridFileName = fileNames[i];
|
||||
|
||||
@ -192,7 +192,7 @@ bool RimInputCase::openEclipseGridFile()
|
||||
{
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
readerInterface = new RifReaderEclipseInput;
|
||||
readerInterface->enableFaultsImport(prefs->enableFaultsImport());
|
||||
readerInterface->readFaultData(prefs->readFaultData());
|
||||
|
||||
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
|
||||
if (!readerInterface->open(m_gridFileName, eclipseCase.p()))
|
||||
|
@ -100,7 +100,7 @@ bool RimResultCase::openEclipseGridFile()
|
||||
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
readerInterface = new RifReaderEclipseOutput;
|
||||
readerInterface->enableFaultsImport(prefs->enableFaultsImport());
|
||||
readerInterface->readFaultData(prefs->readFaultData());
|
||||
readerInterface->setFilenamesWithFaults(this->filesContainingFaults());
|
||||
|
||||
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
|
||||
|
Loading…
Reference in New Issue
Block a user