diff --git a/benchmarks/upscale_relperm_benchmark.cpp b/benchmarks/upscale_relperm_benchmark.cpp index 47948e6..1f36f76 100644 --- a/benchmarks/upscale_relperm_benchmark.cpp +++ b/benchmarks/upscale_relperm_benchmark.cpp @@ -264,8 +264,7 @@ try Opm::Parser parser; stringstream gridstringstream(stringstream::in | stringstream::out); inflate (eclipseInput, sizeof (eclipseInput) / sizeof (eclipseInput[0]), gridstringstream); - Opm::ParseContext mode; - auto deck = parser.parseString(gridstringstream.str(), mode); + auto deck = parser.parseString(gridstringstream.str()); finish = clock(); timeused = (double(finish)-double(start))/CLOCKS_PER_SEC; if (helper.isMaster) cout << " (" << timeused <<" secs)" << endl; diff --git a/examples/cpregularize.cpp b/examples/cpregularize.cpp index 320f242..f2f7fe8 100644 --- a/examples/cpregularize.cpp +++ b/examples/cpregularize.cpp @@ -35,7 +35,6 @@ #include -#include #include #include @@ -132,10 +131,9 @@ try std::vector permz; - Opm::ParseContext parseMode; // Original x/y resolution in terms of coordinate values (not indices) Opm::Parser parser; - auto deck = parser.parseFile(gridfilename , parseMode); // TODO: REFACTOR!!!! it is stupid to parse this again + auto deck = parser.parseFile(gridfilename); // TODO: REFACTOR!!!! it is stupid to parse this again Opm::EclipseGridInspector gridinspector(deck); std::array gridlimits=gridinspector.getGridLimits(); double finegridxresolution = (gridlimits[1]-gridlimits[0])/dims[0]; diff --git a/examples/mimetic_aniso_solver_test.cpp b/examples/mimetic_aniso_solver_test.cpp index 484ac16..392fc4d 100644 --- a/examples/mimetic_aniso_solver_test.cpp +++ b/examples/mimetic_aniso_solver_test.cpp @@ -36,7 +36,6 @@ #include "config.h" #include -#include #include #include @@ -210,9 +209,7 @@ try auto parser = std::make_shared(); - const Opm::Deck& - deck(parser->parseFile(param.get("filename"), - Opm::ParseContext())); + const Opm::Deck& deck(parser->parseFile(param.get("filename"))); // Make a grid Dune::CpGrid grid; diff --git a/examples/upscale_elasticity.cpp b/examples/upscale_elasticity.cpp index 5681201..6313a2f 100644 --- a/examples/upscale_elasticity.cpp +++ b/examples/upscale_elasticity.cpp @@ -33,7 +33,6 @@ #endif #include -#include #include #include @@ -299,9 +298,8 @@ int run(Params& p) cellsize[2] = p.max[2] > -1?p.max[2]/cells[2]:1.0; grid.createCartesian(cells,cellsize); } else { - Opm::ParseContext parseContext; Opm::Parser parser; - auto deck = parser.parseFile(p.file , parseContext); + auto deck = parser.parseFile(p.file); Opm::EclipseGrid inputGrid(deck); grid.processEclipseFormat(inputGrid, false); } diff --git a/opm/elasticity/elasticity_upscale_impl.hpp b/opm/elasticity/elasticity_upscale_impl.hpp index 091493b..37dd736 100644 --- a/opm/elasticity/elasticity_upscale_impl.hpp +++ b/opm/elasticity/elasticity_upscale_impl.hpp @@ -19,7 +19,6 @@ #endif #include -#include namespace Opm { namespace Elasticity { @@ -605,8 +604,7 @@ IMPL_FUNC(void, loadMaterialsFromGrid(const std::string& file)) Poiss.insert(Poiss.begin(),cells,0.38f); } else { Opm::Parser parser; - Opm::ParseContext parseContext; - auto deck = parser.parseFile(file , parseContext); + auto deck = parser.parseFile(file); if (deck.hasKeyword("YOUNGMOD") && deck.hasKeyword("POISSONMOD")) { Emod = deck.getKeyword("YOUNGMOD").getRawDoubleData(); Poiss = deck.getKeyword("POISSONMOD").getRawDoubleData(); @@ -766,8 +764,7 @@ IMPL_FUNC(void, loadMaterialsFromRocklist(const std::string& file, } } else { Opm::Parser parser; - Opm::ParseContext parseContext; - auto deck = parser.parseFile(file , parseContext); + auto deck = parser.parseFile(file); std::vector satnum = deck.getKeyword("SATNUM").getIntData(); std::vector cells = gv.globalCell(); for (size_t i=0;i #include #include -#include #include #include @@ -82,9 +81,8 @@ namespace Opm } else if (fileformat == "eclipse") { std::string ecl_file = param.get("filename"); - Opm::ParseContext parseContext; Opm::Parser parser; - auto deck = parser.parseFile(ecl_file , parseContext); + auto deck = parser.parseFile(ecl_file); if (param.has("z_tolerance")) { std::cerr << "****** Warning: z_tolerance parameter is obsolete, use PINCH in deck input instead\n"; } diff --git a/opm/upscaling/CornerpointChopper.hpp b/opm/upscaling/CornerpointChopper.hpp index b6a1d6a..a032d97 100644 --- a/opm/upscaling/CornerpointChopper.hpp +++ b/opm/upscaling/CornerpointChopper.hpp @@ -21,7 +21,6 @@ #define OPM_CORNERPOINTCHOPPER_HEADER_INCLUDED #include -#include #include #include #include @@ -41,7 +40,7 @@ namespace Opm { public: CornerPointChopper(const std::string& file) : - deck_(Parser{}.parseFile(file, ParseContext{})), + deck_(Parser{}.parseFile(file)), metricUnits_(Opm::UnitSystem::newMETRIC()) { const auto& specgridRecord = deck_.getKeyword("SPECGRID").getRecord(0); diff --git a/opm/upscaling/RelPermUtils.hpp b/opm/upscaling/RelPermUtils.hpp index 8a5e187..4acdc33 100644 --- a/opm/upscaling/RelPermUtils.hpp +++ b/opm/upscaling/RelPermUtils.hpp @@ -24,7 +24,6 @@ #ifndef OPM_UPSCALING_RELPERM_UTILS_HPP #define OPM_UPSCALING_RELPERM_UTILS_HPP -#include #include #include @@ -194,7 +193,7 @@ namespace Opm { auto parser = Parser{}; addNonStandardUpscalingKeywords(parser); - return parser.parseFile(eclipseFileName, ParseContext{}); + return parser.parseFile(eclipseFileName); } } diff --git a/opm/upscaling/initCPGrid.cpp b/opm/upscaling/initCPGrid.cpp index 42c797d..03639e4 100644 --- a/opm/upscaling/initCPGrid.cpp +++ b/opm/upscaling/initCPGrid.cpp @@ -37,7 +37,6 @@ #include #include -#include #include #include @@ -60,8 +59,7 @@ void Opm::initCPGrid(Dune::CpGrid& grid, const Opm::ParameterGroup& param) { bool periodic_extension = param.getDefault("periodic_extension", false); bool turn_normals = param.getDefault("turn_normals", false); Opm::Parser parser; - Opm::ParseContext parseContext; - auto deck = parser.parseFile(filename, parseContext); + auto deck = parser.parseFile(filename); Opm::EclipseGrid inputGrid(deck); grid.processEclipseFormat(inputGrid, periodic_extension , turn_normals ); } else if (fileformat == "cartesian") { diff --git a/tests/common/test_gravitypressure.cpp b/tests/common/test_gravitypressure.cpp index 6aa7dcd..fdf0c7b 100644 --- a/tests/common/test_gravitypressure.cpp +++ b/tests/common/test_gravitypressure.cpp @@ -38,7 +38,6 @@ #include #undef UNITTEST_TRESPASS_PRIVATE_PROPERTY_DP -#include #include #include @@ -412,7 +411,7 @@ PORO Opm::RelPermUpscaleHelper helper{mpi_rank, options}; { auto parse = Opm::Parser{}; - auto deck = parse.parseString(input, Opm::ParseContext{}); + auto deck = parse.parseString(input); const auto minPerm = 0; // mD const auto maxPerm = 10.0e3; // mD