eclbasevanguard: pass parameters to updateOutputDir

to avoid typetag dependence in the code
This commit is contained in:
Arne Morten Kvarving
2021-05-04 09:23:43 +02:00
parent 6e3cce1fc4
commit 5aa1b43e41

View File

@@ -784,7 +784,9 @@ protected:
{ {
asImp_().createGrids_(); asImp_().createGrids_();
asImp_().filterConnections_(); asImp_().filterConnections_();
asImp_().updateOutputDir_(); std::string outputDir = EWOMS_GET_PARAM(TypeTag, std::string, OutputDir);
bool enableEclCompatFile = !EWOMS_GET_PARAM(TypeTag, bool, EnableOpmRstFile);
asImp_().updateOutputDir_(outputDir, enableEclCompatFile);
asImp_().finalizeInit_(); asImp_().finalizeInit_();
} }
void updateCartesianToCompressedMapping_() void updateCartesianToCompressedMapping_()
@@ -857,10 +859,10 @@ protected:
private: private:
void updateOutputDir_() void updateOutputDir_(std::string outputDir,
bool enableEclCompatFile)
{ {
// update the location for output // update the location for output
std::string outputDir = EWOMS_GET_PARAM(TypeTag, std::string, OutputDir);
auto& ioConfig = eclState_->getIOConfig(); auto& ioConfig = eclState_->getIOConfig();
if (outputDir == "") if (outputDir == "")
// If no output directory parameter is specified, use the output directory // If no output directory parameter is specified, use the output directory
@@ -882,7 +884,7 @@ private:
// the eclState is supposed to be immutable here, IMO. // the eclState is supposed to be immutable here, IMO.
ioConfig.setOutputDir(outputDir); ioConfig.setOutputDir(outputDir);
ioConfig.setEclCompatibleRST(!EWOMS_GET_PARAM(TypeTag, bool, EnableOpmRstFile)); ioConfig.setEclCompatibleRST(enableEclCompatFile);
} }