From 9395c74b3ec5424aeacfcdc8a7bed4ead53ff9af Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 1 Nov 2021 08:33:17 +0100 Subject: [PATCH] changed: build separate simulator binaries for flow this is very convenient during development. we can then remove the FLOW_BLACKOIL_ONLY option, as it is no longer needed - use the flow_blackoil binary instead. however we need to keep this support in Main.hpp due to the python bindings relying on it. --- CMakeLists.txt | 72 ++++--------------- flow/flow_blackoil.cpp | 24 +++++++ flow/flow_brine.cpp | 24 +++++++ flow/flow_ebos_blackoil.cpp | 9 ++- flow/flow_ebos_blackoil.hpp | 6 ++ flow/flow_ebos_brine.cpp | 9 ++- flow/flow_ebos_brine.hpp | 6 ++ flow/flow_ebos_energy.cpp | 9 ++- flow/flow_ebos_energy.hpp | 5 ++ flow/flow_ebos_extbo.cpp | 9 ++- flow/flow_ebos_extbo.hpp | 5 ++ flow/flow_ebos_foam.cpp | 9 ++- flow/flow_ebos_foam.hpp | 5 ++ flow/flow_ebos_gasoil.cpp | 9 ++- flow/flow_ebos_gasoil.hpp | 5 ++ flow/flow_ebos_gaswater.cpp | 9 ++- flow/flow_ebos_gaswater.hpp | 5 ++ flow/flow_ebos_micp.cpp | 9 ++- flow/flow_ebos_micp.hpp | 5 ++ flow/flow_ebos_oilwater.cpp | 9 ++- flow/flow_ebos_oilwater.hpp | 5 ++ flow/flow_ebos_oilwater_brine.cpp | 9 ++- flow/flow_ebos_oilwater_brine.hpp | 5 ++ flow/flow_ebos_oilwater_polymer.cpp | 9 ++- flow/flow_ebos_oilwater_polymer.hpp | 5 ++ ...flow_ebos_oilwater_polymer_injectivity.cpp | 9 ++- ...flow_ebos_oilwater_polymer_injectivity.hpp | 5 +- flow/flow_ebos_polymer.cpp | 9 ++- flow/flow_ebos_polymer.hpp | 5 ++ flow/flow_ebos_solvent.cpp | 9 ++- flow/flow_ebos_solvent.hpp | 5 ++ flow/flow_energy.cpp | 24 +++++++ flow/flow_extbo.cpp | 24 +++++++ flow/flow_foam.cpp | 24 +++++++ flow/flow_gasoil.cpp | 24 +++++++ flow/flow_gaswater.cpp | 24 +++++++ flow/flow_micp.cpp | 24 +++++++ flow/flow_oilwater.cpp | 24 +++++++ flow/flow_oilwater_brine.cpp | 24 +++++++ flow/flow_oilwater_polymer.cpp | 24 +++++++ flow/flow_oilwater_polymer_injectivity.cpp | 24 +++++++ flow/flow_polymer.cpp | 24 +++++++ flow/flow_solvent.cpp | 24 +++++++ 43 files changed, 531 insertions(+), 75 deletions(-) create mode 100644 flow/flow_blackoil.cpp create mode 100644 flow/flow_brine.cpp create mode 100644 flow/flow_energy.cpp create mode 100644 flow/flow_extbo.cpp create mode 100644 flow/flow_foam.cpp create mode 100644 flow/flow_gasoil.cpp create mode 100644 flow/flow_gaswater.cpp create mode 100644 flow/flow_micp.cpp create mode 100644 flow/flow_oilwater.cpp create mode 100644 flow/flow_oilwater_brine.cpp create mode 100644 flow/flow_oilwater_polymer.cpp create mode 100644 flow/flow_oilwater_polymer_injectivity.cpp create mode 100644 flow/flow_polymer.cpp create mode 100644 flow/flow_solvent.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d720179e..9e8568bb5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,6 @@ cmake_minimum_required (VERSION 3.10) option(SIBLING_SEARCH "Search for other modules in sibling directories?" ON) set( USE_OPENMP_DEFAULT OFF ) # Use of OpenMP is considered experimental option(BUILD_FLOW "Build the production oriented flow simulator?" ON) -option(BUILD_FLOW_BLACKOIL_ONLY "Build the production oriented flow simulator only supporting the blackoil model?" OFF) option(BUILD_FLOW_VARIANTS "Build the variants for flow by default?" OFF) option(BUILD_EBOS "Build the research oriented ebos simulator?" ON) option(BUILD_EBOS_EXTENSIONS "Build the variants for various extensions of ebos by default?" OFF) @@ -349,22 +348,28 @@ add_dependencies(moduleVersion opmsimulators) set(COMMON_MODELS brine energy extbo foam gasoil gaswater oilwater oilwater_polymer polymer solvent) set(FLOW_MODELS blackoil oilwater_brine oilwater_polymer_injectivity micp) +set(FLOW_VARIANT_MODELS brine_energy onephase onephase_energy) set(FLOW_TGTS) -foreach(OBJ ${COMMON_MODELS} ${FLOW_MODELS}) +foreach(OBJ ${COMMON_MODELS} ${FLOW_MODELS} ${FLOW_VARIANT_MODELS}) add_library(flow_lib${OBJ} OBJECT flow/flow_ebos_${OBJ}.cpp) list(APPEND FLOW_TGTS $) if(TARGET fmt::fmt) target_link_libraries(flow_lib${OBJ} fmt::fmt) endif() + opm_add_test(flow_${OBJ} + ONLY_COMPILE + SOURCES + flow/flow_${OBJ}.cpp + $ + $ + EXE_NAME flow_${OBJ} + DEPENDS opmsimulators + LIBRARIES opmsimulators) endforeach() set_property(TARGET flow_libblackoil PROPERTY POSITION_INDEPENDENT_CODE ON) -foreach(OBJ brine_energy onephase onephase_energy) - add_library(flow_lib${OBJ} OBJECT flow/flow_ebos_${OBJ}.cpp) - if(TARGET fmt::fmt) - target_link_libraries(flow_lib${OBJ} fmt::fmt) - endif() +foreach(OBJ ${FLOW_VARIANT_MODELS}) set_property(TARGET flow_lib${OBJ} PROPERTY EXCLUDE_FROM_ALL ${FLOW_VARIANTS_DEFAULT_ENABLE_IF}) endforeach() @@ -387,26 +392,6 @@ opm_add_test(flow $ ) - -if (NOT BUILD_FLOW_BLACKOIL_ONLY) - set(FLOW_BLACKOIL_ONLY_DEFAULT_ENABLE_IF "FALSE") -else() - set(FLOW_BLACKOIL_ONLY_DEFAULT_ENABLE_IF "TRUE") -endif() - -# the production oriented general-purpose ECL simulator -opm_add_test(flow_blackoil - ONLY_COMPILE - ALWAYS_ENABLE - DEFAULT_ENABLE_IF ${FLOW_BLACKOIL_ONLY_DEFAULT_ENABLE_IF} - DEPENDS opmsimulators - LIBRARIES opmsimulators - SOURCES - flow/flow.cpp - $ - $) -target_compile_definitions(flow_blackoil PRIVATE "FLOW_BLACKOIL_ONLY") - # the production oriented general-purpose ECL simulator opm_add_test(flow_poly ONLY_COMPILE @@ -444,39 +429,6 @@ opm_add_test(flow_blackoil_dunecpr DEPENDS opmsimulators LIBRARIES opmsimulators) -opm_add_test(flow_brine_energy - ONLY_COMPILE - DEFAULT_ENABLE_IF ${FLOW_VARIANTS_DEFAULT_ENABLE_IF} - SOURCES - flow/flow_brine_energy.cpp - $ - $ - EXE_NAME flow_brine_energy - DEPENDS opmsimulators - LIBRARIES opmsimulators) - -opm_add_test(flow_onephase - ONLY_COMPILE - DEFAULT_ENABLE_IF ${FLOW_VARIANTS_DEFAULT_ENABLE_IF} - SOURCES - flow/flow_onephase.cpp - $ - $ - EXE_NAME flow_onephase - DEPENDS opmsimulators - LIBRARIES opmsimulators) - -opm_add_test(flow_onephase_energy - ONLY_COMPILE - DEFAULT_ENABLE_IF ${FLOW_VARIANTS_DEFAULT_ENABLE_IF} - SOURCES - flow/flow_onephase_energy.cpp - $ - $ - EXE_NAME flow_onephase_energy - DEPENDS opmsimulators flow_libonephase_energy - LIBRARIES opmsimulators) - if (BUILD_FLOW) install(TARGETS flow DESTINATION bin) opm_add_bash_completion(flow) diff --git a/flow/flow_blackoil.cpp b/flow/flow_blackoil.cpp new file mode 100644 index 000000000..4f7be6574 --- /dev/null +++ b/flow/flow_blackoil.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosBlackoilMainStandalone(argc, argv); +} diff --git a/flow/flow_brine.cpp b/flow/flow_brine.cpp new file mode 100644 index 000000000..c938d26f8 --- /dev/null +++ b/flow/flow_brine.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosBrineMainStandalone(argc, argv); +} diff --git a/flow/flow_ebos_blackoil.cpp b/flow/flow_ebos_blackoil.cpp index 1a0cc6431..bc12a1ee4 100644 --- a/flow/flow_ebos_blackoil.cpp +++ b/flow/flow_ebos_blackoil.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -75,4 +75,11 @@ int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFile return mainfunc->execute(); } +int flowEbosBlackoilMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_blackoil.hpp b/flow/flow_ebos_blackoil.hpp index 1b173ed65..b60c64354 100644 --- a/flow/flow_ebos_blackoil.hpp +++ b/flow/flow_ebos_blackoil.hpp @@ -41,10 +41,16 @@ void flowEbosBlackoilSetDeck(double setupTime, std::shared_ptr deck, std::unique_ptr wtestState, std::shared_ptr summaryConfig); +//! \brief Main function used in flow binary. int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Initialization function used in flow binary and python simulator. std::unique_ptr> flowEbosBlackoilMainInit(int argc, char** argv, bool outputCout, bool outputFiles); + +//! \brief Main function used in flow_blackoil binary. +int flowEbosBlackoilMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_BLACKOIL_HPP diff --git a/flow/flow_ebos_brine.cpp b/flow/flow_ebos_brine.cpp index fe7452450..68e624eac 100644 --- a/flow/flow_ebos_brine.cpp +++ b/flow/flow_ebos_brine.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -78,4 +78,11 @@ int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles) return mainfunc.execute(); } +int flowEbosBrineMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowBrineProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_brine.hpp b/flow/flow_ebos_brine.hpp index a2f64b3cd..12acd5198 100644 --- a/flow/flow_ebos_brine.hpp +++ b/flow/flow_ebos_brine.hpp @@ -30,7 +30,13 @@ void flowEbosBrineSetDeck(double setupTime, std::shared_ptr deck, std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main function used in flow binary. int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles); + +//! \brief Main function used in flow_brine binary. +int flowEbosBrineMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_BRINE_HPP diff --git a/flow/flow_ebos_energy.cpp b/flow/flow_ebos_energy.cpp index 4fb904190..20c47d7af 100644 --- a/flow/flow_ebos_energy.cpp +++ b/flow/flow_ebos_energy.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -77,4 +77,11 @@ int flowEbosEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles) return mainfunc.execute(); } +int flowEbosEnergyMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowEnergyProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_energy.hpp b/flow/flow_ebos_energy.hpp index 960ec6882..777401730 100644 --- a/flow/flow_ebos_energy.hpp +++ b/flow/flow_ebos_energy.hpp @@ -30,8 +30,13 @@ void flowEbosEnergySetDeck(double setupTime, std::shared_ptr deck, std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main function used in flow binary. int flowEbosEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Main function used in flow_energy binary. +int flowEbosEnergyMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_ENERGY_HPP diff --git a/flow/flow_ebos_extbo.cpp b/flow/flow_ebos_extbo.cpp index 2c90b6b1b..8f5d2535d 100644 --- a/flow/flow_ebos_extbo.cpp +++ b/flow/flow_ebos_extbo.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -77,4 +77,11 @@ int flowEbosExtboMain(int argc, char** argv, bool outputCout, bool outputFiles) return mainfunc.execute(); } +int flowEbosExtboMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowExtboProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_extbo.hpp b/flow/flow_ebos_extbo.hpp index 6a9f27a52..6d002d745 100644 --- a/flow/flow_ebos_extbo.hpp +++ b/flow/flow_ebos_extbo.hpp @@ -30,8 +30,13 @@ void flowEbosExtboSetDeck(double setupTime, std::shared_ptr deck, std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main function used in flow binary. int flowEbosExtboMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Main function used in flow_extbo binary. +int flowEbosExtboMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_EXTBO_HPP diff --git a/flow/flow_ebos_foam.cpp b/flow/flow_ebos_foam.cpp index 7ca99fb53..c978f908b 100644 --- a/flow/flow_ebos_foam.cpp +++ b/flow/flow_ebos_foam.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -78,4 +78,11 @@ int flowEbosFoamMain(int argc, char** argv, bool outputCout, bool outputFiles) return mainfunc.execute(); } +int flowEbosFoamMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowFoamProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_foam.hpp b/flow/flow_ebos_foam.hpp index f6ede93d3..58029b32f 100644 --- a/flow/flow_ebos_foam.hpp +++ b/flow/flow_ebos_foam.hpp @@ -30,8 +30,13 @@ void flowEbosFoamSetDeck(double setupTime, std::shared_ptr deck, std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main function used in flow binary. int flowEbosFoamMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Main function used in flow_foam binary. +int flowEbosFoamMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_FOAM_HPP diff --git a/flow/flow_ebos_gasoil.cpp b/flow/flow_ebos_gasoil.cpp index c9a5b4364..41b3038f4 100644 --- a/flow/flow_ebos_gasoil.cpp +++ b/flow/flow_ebos_gasoil.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -98,4 +98,11 @@ int flowEbosGasOilMain(int argc, char** argv, bool outputCout, bool outputFiles) return mainfunc.execute(); } +int flowEbosGasOilMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowGasOilProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_gasoil.hpp b/flow/flow_ebos_gasoil.hpp index ccb9a8306..2f9d01a9d 100644 --- a/flow/flow_ebos_gasoil.hpp +++ b/flow/flow_ebos_gasoil.hpp @@ -30,8 +30,13 @@ void flowEbosGasOilSetDeck(double setupTime, std::shared_ptr deck, std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main function used in flow binary. int flowEbosGasOilMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Main function used in flow_gasoil binary. +int flowEbosGasOilMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_GASOIL_HPP diff --git a/flow/flow_ebos_gaswater.cpp b/flow/flow_ebos_gaswater.cpp index d7c314e62..39b6772ad 100644 --- a/flow/flow_ebos_gaswater.cpp +++ b/flow/flow_ebos_gaswater.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -101,4 +101,11 @@ int flowEbosGasWaterMain(int argc, char** argv, bool outputCout, bool outputFile return mainfunc.execute(); } +int flowEbosGasWaterMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowGasWaterProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_gaswater.hpp b/flow/flow_ebos_gaswater.hpp index 7ad48a5ee..bcff482b5 100644 --- a/flow/flow_ebos_gaswater.hpp +++ b/flow/flow_ebos_gaswater.hpp @@ -30,8 +30,13 @@ void flowEbosGasWaterSetDeck(double setupTime, std::shared_ptr deck, std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main function used in flow binary. int flowEbosGasWaterMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Main function used in flow_gaswater binary. +int flowEbosGasWaterMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_GASWATER_HPP diff --git a/flow/flow_ebos_micp.cpp b/flow/flow_ebos_micp.cpp index 797f90bd3..0081e30fe 100644 --- a/flow/flow_ebos_micp.cpp +++ b/flow/flow_ebos_micp.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -100,4 +100,11 @@ int flowEbosMICPMain(int argc, char** argv, bool outputCout, bool outputFiles) return mainfunc.execute(); } +int flowEbosMICPMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowMICPProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_micp.hpp b/flow/flow_ebos_micp.hpp index 2921b7c19..77c608987 100644 --- a/flow/flow_ebos_micp.hpp +++ b/flow/flow_ebos_micp.hpp @@ -30,8 +30,13 @@ void flowEbosMICPSetDeck(double setupTime, std::shared_ptr deck, std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main function used in flow binary. int flowEbosMICPMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Main function used in flow_micp binary. +int flowEbosMICPMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_MICP_HPP diff --git a/flow/flow_ebos_oilwater.cpp b/flow/flow_ebos_oilwater.cpp index 1fe28d262..36f4784b3 100644 --- a/flow/flow_ebos_oilwater.cpp +++ b/flow/flow_ebos_oilwater.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -97,4 +97,11 @@ int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFile return mainfunc.execute(); } +int flowEbosOilWaterMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowOilWaterProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_oilwater.hpp b/flow/flow_ebos_oilwater.hpp index 147022dc6..e8efeffdc 100644 --- a/flow/flow_ebos_oilwater.hpp +++ b/flow/flow_ebos_oilwater.hpp @@ -30,8 +30,13 @@ void flowEbosOilWaterSetDeck(double setupTime, std::shared_ptr deck, std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main functon used in main flow binary. int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Main function used in flow_oilwater binary. +int flowEbosOilWaterMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_OILWATER_HPP diff --git a/flow/flow_ebos_oilwater_brine.cpp b/flow/flow_ebos_oilwater_brine.cpp index 91da841bb..5c2fdf693 100644 --- a/flow/flow_ebos_oilwater_brine.cpp +++ b/flow/flow_ebos_oilwater_brine.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -100,4 +100,11 @@ int flowEbosOilWaterBrineMain(int argc, char** argv, bool outputCout, bool outpu return mainfunc.execute(); } +int flowEbosOilWaterBrineMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowOilWaterBrineProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_oilwater_brine.hpp b/flow/flow_ebos_oilwater_brine.hpp index fa0e9ca6d..0f6ebb361 100644 --- a/flow/flow_ebos_oilwater_brine.hpp +++ b/flow/flow_ebos_oilwater_brine.hpp @@ -30,8 +30,13 @@ void flowEbosOilWaterBrineSetDeck(double setupTime, std::shared_ptr deck, std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main function used in flow binary. int flowEbosOilWaterBrineMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Main function used in flow_oilwater_brine binary. +int flowEbosOilWaterBrineMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_OILWATER_BRINE_HPP diff --git a/flow/flow_ebos_oilwater_polymer.cpp b/flow/flow_ebos_oilwater_polymer.cpp index 586a680fd..aaaa7616d 100644 --- a/flow/flow_ebos_oilwater_polymer.cpp +++ b/flow/flow_ebos_oilwater_polymer.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -100,4 +100,11 @@ int flowEbosOilWaterPolymerMain(int argc, char** argv, bool outputCout, bool out return mainfunc.execute(); } +int flowEbosOilWaterPolymerMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowOilWaterPolymerProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_oilwater_polymer.hpp b/flow/flow_ebos_oilwater_polymer.hpp index 28bf68ec1..1c48a7bea 100644 --- a/flow/flow_ebos_oilwater_polymer.hpp +++ b/flow/flow_ebos_oilwater_polymer.hpp @@ -30,8 +30,13 @@ void flowEbosOilWaterPolymerSetDeck(double setupTime, std::shared_ptr deck std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main functon used in main flow binary. int flowEbosOilWaterPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Main function used in flow_oilwater_polymer binary. +int flowEbosOilWaterPolymerMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_OILWATER_POLYMER_HPP diff --git a/flow/flow_ebos_oilwater_polymer_injectivity.cpp b/flow/flow_ebos_oilwater_polymer_injectivity.cpp index 7484ea6ad..355956b75 100644 --- a/flow/flow_ebos_oilwater_polymer_injectivity.cpp +++ b/flow/flow_ebos_oilwater_polymer_injectivity.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -99,4 +99,11 @@ int flowEbosOilWaterPolymerInjectivityMain(int argc, char** argv, bool outputCou return mainfunc.execute(); } +int flowEbosOilWaterPolymerInjectivityMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowOilWaterPolymerInjectivityProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_oilwater_polymer_injectivity.hpp b/flow/flow_ebos_oilwater_polymer_injectivity.hpp index dbf590979..fd6e467e3 100644 --- a/flow/flow_ebos_oilwater_polymer_injectivity.hpp +++ b/flow/flow_ebos_oilwater_polymer_injectivity.hpp @@ -19,9 +19,12 @@ namespace Opm { - // void flowEbosOilWaterPolymerInjectivitySetDeck(Deck& deck, EclipseState& eclState); +//! \brief Main function used in flow binary. int flowEbosOilWaterPolymerInjectivityMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Main function used in flow_oilwater_polymer_injectivity binary. +int flowEbosOilWaterPolymerInjectivityMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_OILWATER_POLYMER_INJECTIVITY_HPP diff --git a/flow/flow_ebos_polymer.cpp b/flow/flow_ebos_polymer.cpp index 00e2357c0..82f72b356 100644 --- a/flow/flow_ebos_polymer.cpp +++ b/flow/flow_ebos_polymer.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -77,4 +77,11 @@ int flowEbosPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles return mainfunc.execute(); } +int flowEbosPolymerMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowPolymerProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_polymer.hpp b/flow/flow_ebos_polymer.hpp index 7e8d736b5..b5a976a74 100644 --- a/flow/flow_ebos_polymer.hpp +++ b/flow/flow_ebos_polymer.hpp @@ -30,8 +30,13 @@ void flowEbosPolymerSetDeck(double setupTime, std::shared_ptr deck, std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main function used in flow binary. int flowEbosPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles); +//! \brief Main function used in flow_polymer binary. +int flowEbosPolymerMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_POLYMER_HPP diff --git a/flow/flow_ebos_solvent.cpp b/flow/flow_ebos_solvent.cpp index 6e92e0c2f..0312c1841 100644 --- a/flow/flow_ebos_solvent.cpp +++ b/flow/flow_ebos_solvent.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #if HAVE_DUNE_FEM #include @@ -78,4 +78,11 @@ int flowEbosSolventMain(int argc, char** argv, bool outputCout, bool outputFiles return mainfunc.execute(); } +int flowEbosSolventMainStandalone(int argc, char** argv) +{ + using TypeTag = Properties::TTag::EclFlowSolventProblem; + auto mainObject = Opm::Main(argc, argv); + return mainObject.runStatic(); +} + } diff --git a/flow/flow_ebos_solvent.hpp b/flow/flow_ebos_solvent.hpp index db3717198..ed2614a19 100644 --- a/flow/flow_ebos_solvent.hpp +++ b/flow/flow_ebos_solvent.hpp @@ -30,8 +30,13 @@ void flowEbosSolventSetDeck(double setupTime, std::shared_ptr deck, std::shared_ptr eclState, std::shared_ptr schedule, std::shared_ptr summaryConfig); + +//! \brief Main function used in flow binary. int flowEbosSolventMain(int argc, char** argv, bool outoutCout, bool outputFiles); +//! \brief Main function used in flow_solvent binary. +int flowEbosSolventMainStandalone(int argc, char** argv); + } #endif // FLOW_EBOS_SOLVENT_HPP diff --git a/flow/flow_energy.cpp b/flow/flow_energy.cpp new file mode 100644 index 000000000..fb94f313a --- /dev/null +++ b/flow/flow_energy.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosEnergyMainStandalone(argc, argv); +} diff --git a/flow/flow_extbo.cpp b/flow/flow_extbo.cpp new file mode 100644 index 000000000..283950645 --- /dev/null +++ b/flow/flow_extbo.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosExtboMainStandalone(argc, argv); +} diff --git a/flow/flow_foam.cpp b/flow/flow_foam.cpp new file mode 100644 index 000000000..57fc375d5 --- /dev/null +++ b/flow/flow_foam.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosFoamMainStandalone(argc, argv); +} diff --git a/flow/flow_gasoil.cpp b/flow/flow_gasoil.cpp new file mode 100644 index 000000000..3cfd3d74a --- /dev/null +++ b/flow/flow_gasoil.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosGasOilMainStandalone(argc, argv); +} diff --git a/flow/flow_gaswater.cpp b/flow/flow_gaswater.cpp new file mode 100644 index 000000000..30a4c821d --- /dev/null +++ b/flow/flow_gaswater.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosGasWaterMainStandalone(argc, argv); +} diff --git a/flow/flow_micp.cpp b/flow/flow_micp.cpp new file mode 100644 index 000000000..e77c2e9e2 --- /dev/null +++ b/flow/flow_micp.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosMICPMainStandalone(argc, argv); +} diff --git a/flow/flow_oilwater.cpp b/flow/flow_oilwater.cpp new file mode 100644 index 000000000..40e13d435 --- /dev/null +++ b/flow/flow_oilwater.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosOilWaterMainStandalone(argc, argv); +} diff --git a/flow/flow_oilwater_brine.cpp b/flow/flow_oilwater_brine.cpp new file mode 100644 index 000000000..2f6a03103 --- /dev/null +++ b/flow/flow_oilwater_brine.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosOilWaterBrineMainStandalone(argc, argv); +} diff --git a/flow/flow_oilwater_polymer.cpp b/flow/flow_oilwater_polymer.cpp new file mode 100644 index 000000000..1e377bb19 --- /dev/null +++ b/flow/flow_oilwater_polymer.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosOilWaterPolymerMainStandalone(argc, argv); +} diff --git a/flow/flow_oilwater_polymer_injectivity.cpp b/flow/flow_oilwater_polymer_injectivity.cpp new file mode 100644 index 000000000..db989e13e --- /dev/null +++ b/flow/flow_oilwater_polymer_injectivity.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosOilWaterPolymerInjectivityMainStandalone(argc, argv); +} diff --git a/flow/flow_polymer.cpp b/flow/flow_polymer.cpp new file mode 100644 index 000000000..127972785 --- /dev/null +++ b/flow/flow_polymer.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosPolymerMainStandalone(argc, argv); +} diff --git a/flow/flow_solvent.cpp b/flow/flow_solvent.cpp new file mode 100644 index 000000000..0c48f6874 --- /dev/null +++ b/flow/flow_solvent.cpp @@ -0,0 +1,24 @@ +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ +#include "config.h" +#include + + +int main(int argc, char** argv) +{ + return Opm::flowEbosSolventMainStandalone(argc, argv); +}