do explicit put properties into the the Ewoms::Properties namespace anymore

instead, do it implicitly by using the BEGIN_PROPERTIES and
END_PROPERTIES macros.
This commit is contained in:
Andreas Lauser 2018-06-14 16:06:05 +02:00
parent 739a0ef0d0
commit 26e6d56930
16 changed files with 96 additions and 43 deletions

View File

@ -32,10 +32,11 @@
#include "eclproblem.hh" #include "eclproblem.hh"
namespace Ewoms { BEGIN_PROPERTIES
namespace Properties {
NEW_TYPE_TAG(EclProblem, INHERITS_FROM(BlackOilModel, EclBaseProblem)); NEW_TYPE_TAG(EclProblem, INHERITS_FROM(BlackOilModel, EclBaseProblem));
}}
END_PROPERTIES
int main(int argc, char **argv) int main(int argc, char **argv)
{ {

View File

@ -38,14 +38,20 @@ namespace Ewoms {
template <class TypeTag> template <class TypeTag>
class EclAluGridVanguard; class EclAluGridVanguard;
namespace Properties { } // namespace Ewoms
BEGIN_PROPERTIES
NEW_TYPE_TAG(EclAluGridVanguard, INHERITS_FROM(EclBaseVanguard)); NEW_TYPE_TAG(EclAluGridVanguard, INHERITS_FROM(EclBaseVanguard));
// declare the properties // declare the properties
SET_TYPE_PROP(EclAluGridVanguard, Vanguard, Ewoms::EclAluGridVanguard<TypeTag>); SET_TYPE_PROP(EclAluGridVanguard, Vanguard, Ewoms::EclAluGridVanguard<TypeTag>);
SET_TYPE_PROP(EclAluGridVanguard, Grid, Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming>); SET_TYPE_PROP(EclAluGridVanguard, Grid, Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming>);
SET_TYPE_PROP(EclAluGridVanguard, EquilGrid, Dune::CpGrid); SET_TYPE_PROP(EclAluGridVanguard, EquilGrid, Dune::CpGrid);
} // namespace Properties
END_PROPERTIES
namespace Ewoms {
/*! /*!
* \ingroup EclBlackOilSimulator * \ingroup EclBlackOilSimulator

View File

@ -51,8 +51,10 @@
namespace Ewoms { namespace Ewoms {
template <class TypeTag> template <class TypeTag>
class EclBaseVanguard; class EclBaseVanguard;
}
BEGIN_PROPERTIES
namespace Properties {
NEW_TYPE_TAG(EclBaseVanguard); NEW_TYPE_TAG(EclBaseVanguard);
// declare the properties required by the for the ecl simulator vanguard // declare the properties required by the for the ecl simulator vanguard
@ -64,7 +66,10 @@ NEW_PROP_TAG(EclOutputDir);
SET_STRING_PROP(EclBaseVanguard, EclDeckFileName, "ECLDECK.DATA"); SET_STRING_PROP(EclBaseVanguard, EclDeckFileName, "ECLDECK.DATA");
SET_STRING_PROP(EclBaseVanguard, EclOutputDir, "."); SET_STRING_PROP(EclBaseVanguard, EclOutputDir, ".");
} // namespace Properties
END_PROPERTIES
namespace Ewoms {
/*! /*!
* \ingroup EclBlackOilSimulator * \ingroup EclBlackOilSimulator

View File

@ -41,8 +41,10 @@
namespace Ewoms { namespace Ewoms {
template <class TypeTag> template <class TypeTag>
class EclCpGridVanguard; class EclCpGridVanguard;
}
BEGIN_PROPERTIES
namespace Properties {
NEW_TYPE_TAG(EclCpGridVanguard, INHERITS_FROM(EclBaseVanguard)); NEW_TYPE_TAG(EclCpGridVanguard, INHERITS_FROM(EclBaseVanguard));
NEW_PROP_TAG(ExportGlobalTransmissibility); NEW_PROP_TAG(ExportGlobalTransmissibility);
@ -52,7 +54,10 @@ SET_TYPE_PROP(EclCpGridVanguard, Vanguard, Ewoms::EclCpGridVanguard<TypeTag>);
SET_TYPE_PROP(EclCpGridVanguard, Grid, Dune::CpGrid); SET_TYPE_PROP(EclCpGridVanguard, Grid, Dune::CpGrid);
SET_TYPE_PROP(EclCpGridVanguard, EquilGrid, typename GET_PROP_TYPE(TypeTag, Grid)); SET_TYPE_PROP(EclCpGridVanguard, EquilGrid, typename GET_PROP_TYPE(TypeTag, Grid));
SET_BOOL_PROP(EclCpGridVanguard, ExportGlobalTransmissibility, false); SET_BOOL_PROP(EclCpGridVanguard, ExportGlobalTransmissibility, false);
} // namespace Properties
END_PROPERTIES
namespace Ewoms {
/*! /*!
* \ingroup EclBlackOilSimulator * \ingroup EclBlackOilSimulator

View File

@ -37,8 +37,8 @@
#include <vector> #include <vector>
namespace Ewoms { BEGIN_PROPERTIES
namespace Properties {
NEW_PROP_TAG(Simulator); NEW_PROP_TAG(Simulator);
NEW_PROP_TAG(FluidSystem); NEW_PROP_TAG(FluidSystem);
NEW_PROP_TAG(GridView); NEW_PROP_TAG(GridView);
@ -46,7 +46,10 @@ NEW_PROP_TAG(Scalar);
NEW_PROP_TAG(MaterialLaw); NEW_PROP_TAG(MaterialLaw);
NEW_PROP_TAG(EnableTemperature); NEW_PROP_TAG(EnableTemperature);
NEW_PROP_TAG(EnableEnergy); NEW_PROP_TAG(EnableEnergy);
}
END_PROPERTIES
namespace Ewoms {
/*! /*!
* \ingroup EclBlackOilSimulator * \ingroup EclBlackOilSimulator

View File

@ -41,10 +41,13 @@
#include <dune/common/fvector.hh> #include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh> #include <dune/common/fmatrix.hh>
namespace Ewoms { BEGIN_PROPERTIES
namespace Properties {
NEW_PROP_TAG(MaterialLaw); NEW_PROP_TAG(MaterialLaw);
}
END_PROPERTIES
namespace Ewoms {
template <class TypeTag> template <class TypeTag>
class EclTransIntensiveQuantities; class EclTransIntensiveQuantities;

View File

@ -52,12 +52,15 @@
#include <type_traits> #include <type_traits>
namespace Ewoms { BEGIN_PROPERTIES
namespace Properties {
// create new type tag for the Ecl-output // create new type tag for the Ecl-output
NEW_TYPE_TAG(EclOutputBlackOil); NEW_TYPE_TAG(EclOutputBlackOil);
} // namespace Properties
END_PROPERTIES
namespace Ewoms {
// forward declaration // forward declaration
template <class TypeTag> template <class TypeTag>

View File

@ -34,15 +34,20 @@
namespace Ewoms { namespace Ewoms {
template <class TypeTag> template <class TypeTag>
class EclPolyhedralGridVanguard; class EclPolyhedralGridVanguard;
}
BEGIN_PROPERTIES
namespace Properties {
NEW_TYPE_TAG(EclPolyhedralGridVanguard, INHERITS_FROM(EclBaseVanguard)); NEW_TYPE_TAG(EclPolyhedralGridVanguard, INHERITS_FROM(EclBaseVanguard));
// declare the properties // declare the properties
SET_TYPE_PROP(EclPolyhedralGridVanguard, Vanguard, Ewoms::EclPolyhedralGridVanguard<TypeTag>); SET_TYPE_PROP(EclPolyhedralGridVanguard, Vanguard, Ewoms::EclPolyhedralGridVanguard<TypeTag>);
SET_TYPE_PROP(EclPolyhedralGridVanguard, Grid, Dune::PolyhedralGrid<3, 3>); SET_TYPE_PROP(EclPolyhedralGridVanguard, Grid, Dune::PolyhedralGrid<3, 3>);
SET_TYPE_PROP(EclPolyhedralGridVanguard, EquilGrid, typename GET_PROP_TYPE(TypeTag, Grid)); SET_TYPE_PROP(EclPolyhedralGridVanguard, EquilGrid, typename GET_PROP_TYPE(TypeTag, Grid));
} // namespace Properties
END_PROPERTIES
namespace Ewoms {
/*! /*!
* \ingroup EclBlackOilSimulator * \ingroup EclBlackOilSimulator

View File

@ -99,8 +99,10 @@
namespace Ewoms { namespace Ewoms {
template <class TypeTag> template <class TypeTag>
class EclProblem; class EclProblem;
}
BEGIN_PROPERTIES
namespace Properties {
#if EBOS_USE_ALUGRID #if EBOS_USE_ALUGRID
NEW_TYPE_TAG(EclBaseProblem, INHERITS_FROM(EclAluGridVanguard, EclOutputBlackOil)); NEW_TYPE_TAG(EclBaseProblem, INHERITS_FROM(EclAluGridVanguard, EclOutputBlackOil));
#else #else
@ -283,7 +285,10 @@ SET_BOOL_PROP(EclBaseProblem, EnableEnergy, false);
// disable thermal flux boundaries by default // disable thermal flux boundaries by default
SET_BOOL_PROP(EclBaseProblem, EnableThermalFluxBoundaries, false); SET_BOOL_PROP(EclBaseProblem, EnableThermalFluxBoundaries, false);
} // namespace Properties
END_PROPERTIES
namespace Ewoms {
/*! /*!
* \ingroup EclBlackOilSimulator * \ingroup EclBlackOilSimulator

View File

@ -49,14 +49,17 @@
#include <vector> #include <vector>
#include <unordered_map> #include <unordered_map>
namespace Ewoms { BEGIN_PROPERTIES
namespace Properties {
NEW_PROP_TAG(Simulator); NEW_PROP_TAG(Simulator);
NEW_PROP_TAG(Scalar); NEW_PROP_TAG(Scalar);
NEW_PROP_TAG(Evaluation); NEW_PROP_TAG(Evaluation);
NEW_PROP_TAG(ElementContext); NEW_PROP_TAG(ElementContext);
NEW_PROP_TAG(FluidSystem); NEW_PROP_TAG(FluidSystem);
}
END_PROPERTIES
namespace Ewoms {
/*! /*!
* \ingroup EclBlackOilSimulator * \ingroup EclBlackOilSimulator

View File

@ -50,15 +50,18 @@
#include <vector> #include <vector>
#include <unordered_map> #include <unordered_map>
namespace Ewoms { BEGIN_PROPERTIES
namespace Properties {
NEW_PROP_TAG(Scalar); NEW_PROP_TAG(Scalar);
NEW_PROP_TAG(Vanguard); NEW_PROP_TAG(Vanguard);
NEW_PROP_TAG(Grid); NEW_PROP_TAG(Grid);
NEW_PROP_TAG(GridView); NEW_PROP_TAG(GridView);
NEW_PROP_TAG(ElementMapper); NEW_PROP_TAG(ElementMapper);
NEW_PROP_TAG(EnableEnergy); NEW_PROP_TAG(EnableEnergy);
}
END_PROPERTIES
namespace Ewoms {
/*! /*!
* \ingroup EclBlackOilSimulator * \ingroup EclBlackOilSimulator

View File

@ -50,10 +50,13 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace Ewoms { BEGIN_PROPERTIES
namespace Properties {
NEW_PROP_TAG(Grid); NEW_PROP_TAG(Grid);
}
END_PROPERTIES
namespace Ewoms {
/*! /*!
* \ingroup EclBlackOilSimulator * \ingroup EclBlackOilSimulator

View File

@ -51,12 +51,15 @@
#include <utility> #include <utility>
#include <string> #include <string>
namespace Ewoms { BEGIN_PROPERTIES
namespace Properties {
NEW_PROP_TAG(EnableEclOutput); NEW_PROP_TAG(EnableEclOutput);
NEW_PROP_TAG(EnableAsyncEclOutput); NEW_PROP_TAG(EnableAsyncEclOutput);
NEW_PROP_TAG(EclOutputDoublePrecision); NEW_PROP_TAG(EclOutputDoublePrecision);
}
END_PROPERTIES
namespace Ewoms {
template <class TypeTag> template <class TypeTag>
class EclWriter; class EclWriter;

View File

@ -59,12 +59,15 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
namespace Ewoms { BEGIN_PROPERTIES
namespace Properties {
NEW_PROP_TAG(Simulator); NEW_PROP_TAG(Simulator);
NEW_PROP_TAG(Grid); NEW_PROP_TAG(Grid);
NEW_PROP_TAG(FluidSystem); NEW_PROP_TAG(FluidSystem);
} // namespace Properties
END_PROPERTIES
namespace Ewoms {
/** /**
* Types and routines that collectively implement a basic * Types and routines that collectively implement a basic

View File

@ -75,12 +75,13 @@
std::abort(); \ std::abort(); \
} }
namespace Ewoms { BEGIN_PROPERTIES
namespace Properties {
NEW_TYPE_TAG(TestEclOutputTypeTag, INHERITS_FROM(BlackOilModel, EclBaseProblem)); NEW_TYPE_TAG(TestEclOutputTypeTag, INHERITS_FROM(BlackOilModel, EclBaseProblem));
SET_BOOL_PROP(TestEclOutputTypeTag, EnableGravity, false); SET_BOOL_PROP(TestEclOutputTypeTag, EnableGravity, false);
SET_BOOL_PROP(TestEclOutputTypeTag, EnableAsyncEclOutput, false); SET_BOOL_PROP(TestEclOutputTypeTag, EnableAsyncEclOutput, false);
}}
END_PROPERTIES
static const int day = 24 * 60 * 60; static const int day = 24 * 60 * 60;

View File

@ -66,10 +66,11 @@
std::abort(); \ std::abort(); \
} }
namespace Ewoms { BEGIN_PROPERTIES
namespace Properties {
NEW_TYPE_TAG(TestEquilTypeTag, INHERITS_FROM(BlackOilModel, EclBaseProblem)); NEW_TYPE_TAG(TestEquilTypeTag, INHERITS_FROM(BlackOilModel, EclBaseProblem));
}}
END_PROPERTIES
template <class TypeTag> template <class TypeTag>
std::unique_ptr<typename GET_PROP_TYPE(TypeTag, Simulator)> std::unique_ptr<typename GET_PROP_TYPE(TypeTag, Simulator)>