From 497cd36d4bebf5d689caa7027d2b189698d50e1e Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Mon, 29 Jun 2026 13:22:18 +0200 Subject: [PATCH] Split flow_comp into per-component translation units for parallel builds and bounded per-process memory --- CMakeLists.txt | 13 +++++++ flowexperimental/comp/flow_comp.hpp | 19 +++------- .../comp/flow_comp_dispatch10.cpp | 38 +++++++++++++++++++ .../comp/flow_comp_dispatch10_2p.cpp | 38 +++++++++++++++++++ flowexperimental/comp/flow_comp_dispatch2.cpp | 38 +++++++++++++++++++ .../comp/flow_comp_dispatch2_2p.cpp | 38 +++++++++++++++++++ flowexperimental/comp/flow_comp_dispatch3.cpp | 38 +++++++++++++++++++ .../comp/flow_comp_dispatch3_2p.cpp | 38 +++++++++++++++++++ flowexperimental/comp/flow_comp_dispatch4.cpp | 38 +++++++++++++++++++ .../comp/flow_comp_dispatch4_2p.cpp | 38 +++++++++++++++++++ flowexperimental/comp/flow_comp_dispatch5.cpp | 38 +++++++++++++++++++ .../comp/flow_comp_dispatch5_2p.cpp | 38 +++++++++++++++++++ flowexperimental/comp/flow_comp_dispatch6.cpp | 38 +++++++++++++++++++ .../comp/flow_comp_dispatch6_2p.cpp | 38 +++++++++++++++++++ flowexperimental/comp/flow_comp_dispatch7.cpp | 38 +++++++++++++++++++ .../comp/flow_comp_dispatch7_2p.cpp | 38 +++++++++++++++++++ flowexperimental/comp/flow_comp_dispatch8.cpp | 38 +++++++++++++++++++ .../comp/flow_comp_dispatch8_2p.cpp | 38 +++++++++++++++++++ flowexperimental/comp/flow_comp_dispatch9.cpp | 38 +++++++++++++++++++ .../comp/flow_comp_dispatch9_2p.cpp | 38 +++++++++++++++++++ 20 files changed, 703 insertions(+), 13 deletions(-) create mode 100644 flowexperimental/comp/flow_comp_dispatch10.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch10_2p.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch2.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch2_2p.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch3.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch3_2p.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch4.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch4_2p.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch5.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch5_2p.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch6.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch6_2p.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch7.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch7_2p.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch8.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch8_2p.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch9.cpp create mode 100644 flowexperimental/comp/flow_comp_dispatch9_2p.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 913a3a03f7..376337301b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -893,6 +893,16 @@ macro(opm-simulators_targets_hook) opmsimulators ) + # One translation unit per (component, water) combination, each defining a + # single explicit specialization of dispatchFlowComp<>. Instantiating one + # configuration per file keeps per-process compile memory bounded and lets + # make -j compile the configurations in parallel. + set(FLOW_COMP_DISPATCH_SOURCES) + foreach(component IN LISTS OPM_COMPILE_COMPONENTS) + list(APPEND FLOW_COMP_DISPATCH_SOURCES flowexperimental/comp/flow_comp_dispatch${component}.cpp) + list(APPEND FLOW_COMP_DISPATCH_SOURCES flowexperimental/comp/flow_comp_dispatch${component}_2p.cpp) + endforeach() + opm_add_executable( TARGET flow_comp @@ -904,6 +914,7 @@ macro(opm-simulators_targets_hook) opmsimulators SOURCES flowexperimental/comp/flow_comp.cpp + ${FLOW_COMP_DISPATCH_SOURCES} $ ) target_compile_definitions(flow_comp @@ -916,6 +927,7 @@ macro(opm-simulators_targets_hook) flow_comp2_2p SOURCES flowexperimental/comp/flow_comp2_2p.cpp + flowexperimental/comp/flow_comp_dispatch2_2p.cpp $ LIBRARIES opmsimulators @@ -926,6 +938,7 @@ macro(opm-simulators_targets_hook) flow_comp3_2p SOURCES flowexperimental/comp/flow_comp3_2p.cpp + flowexperimental/comp/flow_comp_dispatch3_2p.cpp $ LIBRARIES opmsimulators diff --git a/flowexperimental/comp/flow_comp.hpp b/flowexperimental/comp/flow_comp.hpp index 6661fc3c5e..f495771ba1 100644 --- a/flowexperimental/comp/flow_comp.hpp +++ b/flowexperimental/comp/flow_comp.hpp @@ -284,18 +284,11 @@ struct EnableThermalFluxBoundaries { } // namespace Opm::Properties -namespace Opm { - -template -int dispatchFlowComp(int argc, char** argv) -{ - using TypeTag = Properties::TTag::FlowCompProblem; - auto mainObject = std::make_unique(argc, argv); - const auto ret = mainObject->runStatic(); - mainObject.reset(); - return ret; -} - -} // namespace Opm +// dispatchFlowComp() is only declared here; each (numComp, EnableWater) +// combination is defined as an explicit specialization in its own translation +// unit (flow_comp_dispatch.cpp / flow_comp_dispatch_2p.cpp). Keeping the +// definition out of this header limits each translation unit to a single +// instantiation of the simulator stack, so per-process compile memory stays +// bounded and the configurations compile in parallel. #endif diff --git a/flowexperimental/comp/flow_comp_dispatch10.cpp b/flowexperimental/comp/flow_comp_dispatch10.cpp new file mode 100644 index 0000000000..5ed32dc46b --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch10.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<10, true>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<10, true>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch10_2p.cpp b/flowexperimental/comp/flow_comp_dispatch10_2p.cpp new file mode 100644 index 0000000000..7372bf2258 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch10_2p.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<10, false>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<10, false>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch2.cpp b/flowexperimental/comp/flow_comp_dispatch2.cpp new file mode 100644 index 0000000000..96f39db272 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch2.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<2, true>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<2, true>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch2_2p.cpp b/flowexperimental/comp/flow_comp_dispatch2_2p.cpp new file mode 100644 index 0000000000..95050916c4 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch2_2p.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<2, false>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<2, false>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch3.cpp b/flowexperimental/comp/flow_comp_dispatch3.cpp new file mode 100644 index 0000000000..ebcc3ca091 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch3.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<3, true>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<3, true>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch3_2p.cpp b/flowexperimental/comp/flow_comp_dispatch3_2p.cpp new file mode 100644 index 0000000000..3774734760 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch3_2p.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<3, false>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<3, false>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch4.cpp b/flowexperimental/comp/flow_comp_dispatch4.cpp new file mode 100644 index 0000000000..8251a98407 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch4.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<4, true>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<4, true>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch4_2p.cpp b/flowexperimental/comp/flow_comp_dispatch4_2p.cpp new file mode 100644 index 0000000000..1e10288046 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch4_2p.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<4, false>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<4, false>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch5.cpp b/flowexperimental/comp/flow_comp_dispatch5.cpp new file mode 100644 index 0000000000..fb4f816f05 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch5.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<5, true>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<5, true>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch5_2p.cpp b/flowexperimental/comp/flow_comp_dispatch5_2p.cpp new file mode 100644 index 0000000000..980b8df903 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch5_2p.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<5, false>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<5, false>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch6.cpp b/flowexperimental/comp/flow_comp_dispatch6.cpp new file mode 100644 index 0000000000..b438a9ba44 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch6.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<6, true>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<6, true>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch6_2p.cpp b/flowexperimental/comp/flow_comp_dispatch6_2p.cpp new file mode 100644 index 0000000000..5b111432cf --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch6_2p.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<6, false>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<6, false>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch7.cpp b/flowexperimental/comp/flow_comp_dispatch7.cpp new file mode 100644 index 0000000000..28ccb66afa --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch7.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<7, true>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<7, true>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch7_2p.cpp b/flowexperimental/comp/flow_comp_dispatch7_2p.cpp new file mode 100644 index 0000000000..3e968a7922 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch7_2p.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<7, false>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<7, false>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch8.cpp b/flowexperimental/comp/flow_comp_dispatch8.cpp new file mode 100644 index 0000000000..a56f108dc7 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch8.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<8, true>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<8, true>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch8_2p.cpp b/flowexperimental/comp/flow_comp_dispatch8_2p.cpp new file mode 100644 index 0000000000..af0760e6a0 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch8_2p.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<8, false>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<8, false>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch9.cpp b/flowexperimental/comp/flow_comp_dispatch9.cpp new file mode 100644 index 0000000000..f60238ac6a --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch9.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<9, true>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<9, true>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm diff --git a/flowexperimental/comp/flow_comp_dispatch9_2p.cpp b/flowexperimental/comp/flow_comp_dispatch9_2p.cpp new file mode 100644 index 0000000000..80a68096a3 --- /dev/null +++ b/flowexperimental/comp/flow_comp_dispatch9_2p.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2026, SINTEF Digital + + 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 + +#include "flow_comp.hpp" + +namespace Opm { + +template<> +int dispatchFlowComp<9, false>(int argc, char** argv) +{ + using TypeTag = Properties::TTag::FlowCompProblem<9, false>; + auto mainObject = std::make_unique(argc, argv); + const auto ret = mainObject->runStatic(); + mainObject.reset(); + return ret; +} + +} // namespace Opm