How to get the type of the ElementContext?
blattms opened this issue · comments
I am going nuts!
I am adapting opm-simulators/opm/autodiff/StandardWellsDens*.hpp to get rid off the usage of cachedIntensiveQuantities
which supposedly should not be used, see #163 . No I need to get the type of the ElementContext
and I have no clue how to do this.
I tried to use code (which I do not like) like in BlackoilModelEbos:
// --------- Ebos property system stuff -------
typedef typename TTAG(EclFlowProblem) TypeTag;
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
which yields the compile error:
/home/mblatt/src/dune/opm/opm-simulator/opm/autodiff/StandardWellsDense.hpp:78:35: error: ‘EclFlowProblem’ in namespace ‘Ewoms::Properties::TTag’ does not name a type
typedef typename TTAG(EclFlowProblem) TypeTag;
^
Seems like this is defined in BlackoilModelEbos.hpp but including this header gives
/home/mblatt/src/dune/opm/opm-simulator/opm/autodiff/StandardWellsDense.hpp:78:35: error: ‘EclFlowProblem’ in namespace ‘Ewoms::Properties::TTag’ does not name a type
typedef typename TTAG(EclFlowProblem) TypeTag;
^
You might have to also copy the top lines from BlackoilModelEbos, where EclFlowProblem is set.
Btw, I guess a look in the Dumux docu explains this.
Well that is what I tried.
The problem is that the header gets included multiple times. I might have figured it out now and will move the property definitions of BlackoilModelEbos to a separate header.
Thanks anyway.
I guess this can be closed.
I have the similar problem now.
In small test file, I included the header files
35 #include <ebos/eclproblem.hh>
36 #include <ewoms/common/start.hh>
But when I tried
using TypeTag = typename TTAG(EclFlowProblem);
I got the error
error: ‘EclFlowProblem’ in namespace ‘Ewoms::Properties::TTag’ does not name a type
I found it. It is introduced in BlackoilModelEbos.hpp
.