From a0f907b59b40a38ecabc40b40119c4640d58b23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Thu, 30 Jan 2025 11:05:48 +0100 Subject: [PATCH] Install Type Tag for TPFA Flow Problems Makes this accessible for out-of-tree uses. --- CMakeLists_files.cmake | 1 + flow/flow_blackoil.hpp | 10 ++---- opm/simulators/flow/TTagFlowProblemTPFA.hpp | 40 +++++++++++++++++++++ 3 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 opm/simulators/flow/TTagFlowProblemTPFA.hpp diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index c404ccc13..ece3ceaae 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -855,6 +855,7 @@ list (APPEND PUBLIC_HEADER_FILES opm/simulators/flow/SimulatorSerializer.hpp opm/simulators/flow/SolutionContainers.hpp opm/simulators/flow/SubDomain.hpp + opm/simulators/flow/TTagFlowProblemTPFA.hpp opm/simulators/flow/TracerModel.hpp opm/simulators/flow/Transmissibility.hpp opm/simulators/flow/Transmissibility_impl.hpp diff --git a/flow/flow_blackoil.hpp b/flow/flow_blackoil.hpp index 350bb35df..d15790685 100644 --- a/flow/flow_blackoil.hpp +++ b/flow/flow_blackoil.hpp @@ -17,15 +17,9 @@ #ifndef FLOW_BLACKOIL_TPFA_HPP #define FLOW_BLACKOIL_TPFA_HPP -#include -#include +#include -namespace Opm::Properties::TTag { - struct FlowProblem; - struct FlowProblemTPFA { - using InheritsFrom = std::tuple; - }; -} +#include namespace Opm { diff --git a/opm/simulators/flow/TTagFlowProblemTPFA.hpp b/opm/simulators/flow/TTagFlowProblemTPFA.hpp new file mode 100644 index 000000000..e5baf52d3 --- /dev/null +++ b/opm/simulators/flow/TTagFlowProblemTPFA.hpp @@ -0,0 +1,40 @@ +/* + Copyright 2025 Equinor ASA. + + 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 . +*/ + +#ifndef TTAG_FLOW_PROBLEM_TPFA_HPP +#define TTAG_FLOW_PROBLEM_TPFA_HPP + +#include + +namespace Opm::Properties::TTag { + + struct FlowProblem; + + /// Specialised type tag for simulations that can use the customised + /// assembly process for TPFA discretisation schemes. + /// + /// All properties are otherwise the same as for the regular + /// FlowProblem. + struct FlowProblemTPFA { + using InheritsFrom = std::tuple; + }; + +} // namespace Opm::Properties::TTag + +#endif // TTAG_FLOW_PROBLEM_TPFA_HPP