#4365 Regression Test : Export of FLUXNUM/MULTNUM from command file does not work

Export of FLUXNUM/MULTNUM was using the same code as export sector model, but these two concepts are different. Restore original behavior.
This commit is contained in:
Magne Sjaastad 2019-04-25 15:29:46 +02:00
parent 6c8aa6beea
commit bb58bba5b9
2 changed files with 10 additions and 17 deletions

View File

@ -21,8 +21,8 @@
#include "RiaFilePathTools.h"
#include "RiaViewRedrawScheduler.h"
#include "ExportCommands/RicExportEclipseSectorModelFeature.h"
#include "ExportCommands/RicExportEclipseSectorModelUi.h"
#include "ExportCommands/RicSaveEclipseInputVisibleCellsFeature.h"
#include "ExportCommands/RicSaveEclipseInputVisibleCellsUi.h"
#include "RicfApplicationTools.h"
#include "RicfCommandFileExecutor.h"
@ -98,32 +98,25 @@ void RicfExportVisibleCells::execute()
RiaViewRedrawScheduler::instance()->clearViewsScheduledForUpdate();
cvf::UByteArray cellVisibility;
eclipseView->calculateCurrentTotalCellVisibility(&cellVisibility, eclipseView->currentTimeStep());
cvf::Vec3i min, max;
std::tie(min, max) = RicExportEclipseSectorModelFeature::getVisibleCellRange(eclipseView, cellVisibility);
RicExportEclipseSectorModelUi exportSettings(eclipseView->eclipseCase()->eclipseCaseData(), min, max);
RicSaveEclipseInputVisibleCellsUi exportSettings;
buildExportSettings(exportFolder, &exportSettings);
RicExportEclipseSectorModelFeature::executeCommand(eclipseView, exportSettings, "exportVisibleCells");
RicSaveEclipseInputVisibleCellsFeature::executeCommand(eclipseView, exportSettings, "exportVisibleCells");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicfExportVisibleCells::buildExportSettings(const QString& exportFolder, RicExportEclipseSectorModelUi* exportSettings)
void RicfExportVisibleCells::buildExportSettings(const QString& exportFolder, RicSaveEclipseInputVisibleCellsUi* exportSettings)
{
QDir baseDir(exportFolder);
exportSettings->exportParametersFilename = baseDir.absoluteFilePath(QString("%1.grdecl").arg(m_exportKeyword().text()));
exportSettings->exportFilename = baseDir.absoluteFilePath(QString("%1.grdecl").arg(m_exportKeyword().text()));
/*
if (m_exportKeyword == ExportKeyword::FLUXNUM)
if (m_exportKeyword == ExportKeyword::FLUXNUM)
exportSettings->exportKeyword = RicSaveEclipseInputVisibleCellsUi::FLUXNUM;
else if (m_exportKeyword == ExportKeyword::MULTNUM)
exportSettings->exportKeyword = RicSaveEclipseInputVisibleCellsUi::MULTNUM;
exportSettings->visibleActiveCellsValue = m_visibleActiveCellsValue;
exportSettings->hiddenActiveCellsValue = m_hiddenActiveCellsValue;
exportSettings->inactiveCellsValue = m_inactiveCellsValue; */
exportSettings->inactiveCellsValue = m_inactiveCellsValue;
}

View File

@ -25,7 +25,7 @@
#include "cafPdmField.h"
class RimEclipseView;
class RicExportEclipseSectorModelUi;
class RicSaveEclipseInputVisibleCellsUi;
//==================================================================================================
//
@ -48,7 +48,7 @@ public:
void execute() override;
private:
void buildExportSettings(const QString& exportFolder, RicExportEclipseSectorModelUi* exportSettings);
void buildExportSettings(const QString& exportFolder, RicSaveEclipseInputVisibleCellsUi* exportSettings);
caf::PdmField<int> m_caseId;
caf::PdmField<QString> m_viewName;