From f6153f8133fa5335ec30cb23a13ba783e1a8d5ab Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Fri, 24 Mar 2017 11:40:37 +0100 Subject: [PATCH] Factor out ewoms typetag system to separate header. We will need the typetag information also for the wells. If it is not in a separate header we get problems with recursive inclusion of the headers (BlackoilEbos.hpp includes the header that also needs the typetag information). --- CMakeLists_files.cmake | 1 + opm/autodiff/BlackoilModelEbos.hpp | 11 +------ opm/autodiff/BlackoilModelEbosTypeTags.hpp | 38 ++++++++++++++++++++++ 3 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 opm/autodiff/BlackoilModelEbosTypeTags.hpp diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index 45b8d3414..38fd28871 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -157,6 +157,7 @@ list (APPEND PUBLIC_HEADER_FILES opm/autodiff/BlackoilModelBase.hpp opm/autodiff/BlackoilModelBase_impl.hpp opm/autodiff/BlackoilModelEnums.hpp + opm/autodiff/BlackoilModelEbosTypeTags.hpp opm/autodiff/BlackoilModelParameters.hpp opm/autodiff/BlackoilPressureModel.hpp opm/autodiff/BlackoilPropsAdFromDeck.hpp diff --git a/opm/autodiff/BlackoilModelEbos.hpp b/opm/autodiff/BlackoilModelEbos.hpp index b56cd2e25..0da1a38e5 100644 --- a/opm/autodiff/BlackoilModelEbos.hpp +++ b/opm/autodiff/BlackoilModelEbos.hpp @@ -24,6 +24,7 @@ #ifndef OPM_BLACKOILMODELEBOS_HEADER_INCLUDED #define OPM_BLACKOILMODELEBOS_HEADER_INCLUDED +#include #include #include @@ -79,16 +80,6 @@ -namespace Ewoms { -namespace Properties { -NEW_TYPE_TAG(EclFlowProblem, INHERITS_FROM(BlackOilModel, EclBaseProblem)); -SET_BOOL_PROP(EclFlowProblem, DisableWells, true); -SET_BOOL_PROP(EclFlowProblem, EnableDebuggingChecks, false); - -// SWATINIT is done by the flow part of flow_ebos. this can be removed once the legacy -// code for fluid and satfunc handling gets fully retired. -SET_BOOL_PROP(EclFlowProblem, EnableSwatinit, false); -}} namespace Opm { diff --git a/opm/autodiff/BlackoilModelEbosTypeTags.hpp b/opm/autodiff/BlackoilModelEbosTypeTags.hpp new file mode 100644 index 000000000..7d33294ed --- /dev/null +++ b/opm/autodiff/BlackoilModelEbosTypeTags.hpp @@ -0,0 +1,38 @@ +#ifndef OPM_BLACKOILMODELEBOSTYPETAGS_HEADER_INCLUDED +#define OPM_BLACKOILMODELEBOSTYPETAGS_HEADER_INCLUDED +/* + Copyright 2013, 2015 SINTEF ICT, Applied Mathematics. + Copyright 2014, 2015 Statoil ASA. + Copyright 2015 NTNU + Copyright 2015 IRIS AS + + 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 + +namespace Ewoms { +namespace Properties { +NEW_TYPE_TAG(EclFlowProblem, INHERITS_FROM(BlackOilModel, EclBaseProblem)); +SET_BOOL_PROP(EclFlowProblem, DisableWells, true); +SET_BOOL_PROP(EclFlowProblem, EnableDebuggingChecks, false); + +// SWATINIT is done by the flow part of flow_ebos. this can be removed once the legacy +// code for fluid and satfunc handling gets fully retired. +SET_BOOL_PROP(EclFlowProblem, EnableSwatinit, false); +}} + +#endif