mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
eclbasevanguard: pass parameters to updateOutputDir
to avoid typetag dependence in the code
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user