diff --git a/opm/autodiff/BlackoilModelEbos.hpp b/opm/autodiff/BlackoilModelEbos.hpp index f6811621c..fc3730334 100644 --- a/opm/autodiff/BlackoilModelEbos.hpp +++ b/opm/autodiff/BlackoilModelEbos.hpp @@ -76,6 +76,12 @@ SET_BOOL_PROP(EclFlowProblem, ExportGlobalTransmissibility, true); // default in flow is to formulate the equations in surface volumes SET_BOOL_PROP(EclFlowProblem, BlackoilConserveSurfaceVolume, true); SET_BOOL_PROP(EclFlowProblem, UseVolumetricResidual, false); + +// disable all extensions supported by black oil model. this should not really be +// necessary but it makes things a bit more explicit +SET_BOOL_PROP(EclFlowProblem, EnablePolymer, false); +SET_BOOL_PROP(EclFlowProblem, EnableSolvent, false); +SET_BOOL_PROP(EclFlowProblem, EnableEnergy, false); }} namespace Opm { diff --git a/opm/simulators/flow_ebos_gasoil.cpp b/opm/simulators/flow_ebos_gasoil.cpp index cf80c599d..3b0defb32 100644 --- a/opm/simulators/flow_ebos_gasoil.cpp +++ b/opm/simulators/flow_ebos_gasoil.cpp @@ -37,11 +37,24 @@ namespace Ewoms { namespace Properties { NEW_TYPE_TAG(EclFlowGasOilProblem, INHERITS_FROM(EclFlowProblem)); + //! The indices required by the model -SET_TYPE_PROP(EclFlowGasOilProblem, Indices, - Ewoms::BlackOilTwoPhaseIndices); +SET_PROP(EclFlowGasOilProblem, Indices) +{ +private: + // it is unfortunately not possible to simply use 'TypeTag' here because this leads + // to cyclic definitions of some properties. if this happens the compiler error + // messages unfortunately are *really* confusing and not really helpful. + typedef TTAG(EclFlowProblem) BaseTypeTag; + typedef typename GET_PROP_TYPE(BaseTypeTag, FluidSystem) FluidSystem; + +public: + typedef Ewoms::BlackOilTwoPhaseIndices type; +}; }} namespace Opm { diff --git a/opm/simulators/flow_ebos_oilwater.cpp b/opm/simulators/flow_ebos_oilwater.cpp index 3fcbbc078..e12d3ebfe 100644 --- a/opm/simulators/flow_ebos_oilwater.cpp +++ b/opm/simulators/flow_ebos_oilwater.cpp @@ -37,11 +37,24 @@ namespace Ewoms { namespace Properties { NEW_TYPE_TAG(EclFlowOilWaterProblem, INHERITS_FROM(EclFlowProblem)); + //! The indices required by the model -SET_TYPE_PROP(EclFlowOilWaterProblem, Indices, - Ewoms::BlackOilTwoPhaseIndices); +SET_PROP(EclFlowOilWaterProblem, Indices) +{ +private: + // it is unfortunately not possible to simply use 'TypeTag' here because this leads + // to cyclic definitions of some properties. if this happens the compiler error + // messages unfortunately are *really* confusing and not really helpful. + typedef TTAG(EclFlowProblem) BaseTypeTag; + typedef typename GET_PROP_TYPE(BaseTypeTag, FluidSystem) FluidSystem; + +public: + typedef Ewoms::BlackOilTwoPhaseIndices type; +}; }} namespace Opm { diff --git a/opm/simulators/flow_ebos_oilwater_polymer.cpp b/opm/simulators/flow_ebos_oilwater_polymer.cpp index 0c8fc1669..71f0d77f7 100644 --- a/opm/simulators/flow_ebos_oilwater_polymer.cpp +++ b/opm/simulators/flow_ebos_oilwater_polymer.cpp @@ -39,10 +39,23 @@ namespace Properties { NEW_TYPE_TAG(EclFlowOilWaterPolymerProblem, INHERITS_FROM(EclFlowProblem)); SET_BOOL_PROP(EclFlowOilWaterPolymerProblem, EnablePolymer, true); //! The indices required by the model -SET_TYPE_PROP(EclFlowOilWaterPolymerProblem, Indices, - Ewoms::BlackOilTwoPhaseIndices); +//! The indices required by the model +SET_PROP(EclFlowOilWaterPolymerProblem, Indices) +{ +private: + // it is unfortunately not possible to simply use 'TypeTag' here because this leads + // to cyclic definitions of some properties. if this happens the compiler error + // messages unfortunately are *really* confusing and not really helpful. + typedef TTAG(EclFlowProblem) BaseTypeTag; + typedef typename GET_PROP_TYPE(BaseTypeTag, FluidSystem) FluidSystem; + +public: + typedef Ewoms::BlackOilTwoPhaseIndices type; +}; }} namespace Opm {