mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
[properties] replace remaining macro calls
This commit is contained in:
parent
b809e9a4f7
commit
bdb7bac3e8
@ -52,10 +52,10 @@ template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::Co2InjectionFlashEcfvProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
// use the flash solver adapted to the CO2 injection problem
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashEcfvProblem, FlashSolver,
|
||||
Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>);
|
||||
template<class TypeTag>
|
||||
struct FlashSolver<TypeTag, TTag::Co2InjectionFlashEcfvProblem>
|
||||
{ using type = Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>; };
|
||||
|
||||
// the flash model has serious problems with the numerical
|
||||
// precision. if quadruple precision math is available, we use it,
|
||||
|
@ -52,10 +52,10 @@ template<class TypeTag>
|
||||
struct LocalLinearizerSplice<TypeTag, TTag::Co2InjectionFlashNiEcfvProblem> { using type = TTag::AutoDiffLocalLinearizer; };
|
||||
|
||||
// use the CO2 injection problem adapted flash solver
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashNiEcfvProblem, FlashSolver,
|
||||
Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>);
|
||||
template<class TypeTag>
|
||||
struct FlashSolver<TypeTag, TTag::Co2InjectionFlashNiEcfvProblem>
|
||||
{ using type = Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>; };
|
||||
|
||||
// the flash model has serious problems with the numerical
|
||||
// precision. if quadruple precision math is available, we use it,
|
||||
|
@ -48,10 +48,10 @@ template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::Co2InjectionFlashNiVcfvProblem> { static constexpr bool value = true; };
|
||||
|
||||
// use the CO2 injection problem adapted flash solver
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashNiVcfvProblem, FlashSolver,
|
||||
Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>);
|
||||
template<class TypeTag>
|
||||
struct FlashSolver<TypeTag, TTag::Co2InjectionFlashNiVcfvProblem>
|
||||
{ using type = Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>; };
|
||||
|
||||
// the flash model has serious problems with the numerical
|
||||
// precision. if quadruple precision math is available, we use it,
|
||||
|
@ -48,10 +48,10 @@ template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionFlashVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
// use the flash solver adapted to the CO2 injection problem
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashVcfvProblem, FlashSolver,
|
||||
Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>);
|
||||
template<class TypeTag>
|
||||
struct FlashSolver<TypeTag, TTag::Co2InjectionFlashVcfvProblem>
|
||||
{ using type = Opm::Co2InjectionFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>; };
|
||||
|
||||
// the flash model has serious problems with the numerical
|
||||
// precision. if quadruple precision math is available, we use it,
|
||||
|
@ -36,11 +36,16 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionImmiscibleEcfvProblem,
|
||||
INHERITS_FROM(ImmiscibleModel,
|
||||
Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionImmiscibleEcfvProblem, SpatialDiscretizationSplice,
|
||||
EcfvDiscretization);
|
||||
namespace TTag {
|
||||
|
||||
struct Co2InjectionImmiscibleEcfvProblem
|
||||
{ using InheritsFrom = std::tuple<Co2InjectionBaseProblem, ImmiscibleModel>; };
|
||||
|
||||
} // end namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionImmiscibleEcfvProblem>
|
||||
{ using type = TTag::EcfvDiscretization; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -35,10 +35,14 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionImmiscibleNiEcfvProblem, INHERITS_FROM(ImmiscibleModel,
|
||||
Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionImmiscibleNiEcfvProblem, SpatialDiscretizationSplice,
|
||||
EcfvDiscretization);
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
struct Co2InjectionImmiscibleNiEcfvProblem { using InheritsFrom = std::tuple<Co2InjectionBaseProblem, ImmiscibleModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionImmiscibleNiEcfvProblem>
|
||||
{ using type = TTag::EcfvDiscretization; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::Co2InjectionImmiscibleNiEcfvProblem> { static constexpr bool value = true; };
|
||||
|
@ -35,8 +35,13 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionImmiscibleNiVcfvProblem, INHERITS_FROM(ImmiscibleModel,
|
||||
Co2InjectionBaseProblem));
|
||||
namespace TTag {
|
||||
|
||||
struct Co2InjectionImmiscibleNiVcfvProblem
|
||||
{ using InheritsFrom = std::tuple<Co2InjectionBaseProblem, ImmiscibleModel>; };
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionImmiscibleNiVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
|
@ -36,8 +36,13 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionImmiscibleVcfvProblem, INHERITS_FROM(ImmiscibleModel,
|
||||
Co2InjectionBaseProblem));
|
||||
namespace TTag {
|
||||
|
||||
struct Co2InjectionImmiscibleVcfvProblem
|
||||
{ using InheritsFrom = std::tuple<Co2InjectionBaseProblem, ImmiscibleModel>; };
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Co2InjectionImmiscibleVcfvProblem> { using type = TTag::VcfvDiscretization; };
|
||||
|
||||
|
@ -33,9 +33,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(PowerInjectionDarcyAdProblem,
|
||||
INHERITS_FROM(ImmiscibleTwoPhaseModel,
|
||||
PowerInjectionBaseProblem));
|
||||
namespace TTag {
|
||||
|
||||
struct PowerInjectionDarcyAdProblem
|
||||
{ using InheritsFrom = std::tuple<PowerInjectionBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::PowerInjectionDarcyAdProblem> { using type = Opm::DarcyFluxModule<TypeTag>; };
|
||||
|
@ -33,9 +33,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(PowerInjectionDarcyFdProblem,
|
||||
INHERITS_FROM(ImmiscibleTwoPhaseModel,
|
||||
PowerInjectionBaseProblem));
|
||||
namespace TTag {
|
||||
|
||||
struct PowerInjectionDarcyFdProblem
|
||||
{ using InheritsFrom = std::tuple<PowerInjectionBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::PowerInjectionDarcyFdProblem> { using type = Opm::DarcyFluxModule<TypeTag>; };
|
||||
|
@ -33,9 +33,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(PowerInjectionForchheimerAdProblem,
|
||||
INHERITS_FROM(ImmiscibleTwoPhaseModel,
|
||||
PowerInjectionBaseProblem));
|
||||
namespace TTag {
|
||||
|
||||
struct PowerInjectionForchheimerAdProblem
|
||||
{ using InheritsFrom = std::tuple<PowerInjectionBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::PowerInjectionForchheimerAdProblem> { using type = Opm::ForchheimerFluxModule<TypeTag>; };
|
||||
|
@ -33,9 +33,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(PowerInjectionForchheimerFdProblem,
|
||||
INHERITS_FROM(ImmiscibleTwoPhaseModel,
|
||||
PowerInjectionBaseProblem));
|
||||
namespace TTag {
|
||||
|
||||
struct PowerInjectionForchheimerFdProblem
|
||||
{ using InheritsFrom = std::tuple<PowerInjectionBaseProblem, ImmiscibleTwoPhaseModel>; };
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::PowerInjectionForchheimerFdProblem> { using type = Opm::ForchheimerFluxModule<TypeTag>; };
|
||||
|
@ -70,7 +70,9 @@ namespace Co2Injection {
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionBaseProblem);
|
||||
namespace TTag {
|
||||
struct Co2InjectionBaseProblem {};
|
||||
}
|
||||
|
||||
// declare the CO2 injection problem specific property tags
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
@ -98,8 +100,9 @@ template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::Co2InjectionBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(Co2InjectionBaseProblem, Problem,
|
||||
Opm::Co2InjectionProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{ using type = Opm::Co2InjectionProblem<TypeTag>; };
|
||||
|
||||
// Set fluid configuration
|
||||
template<class TypeTag>
|
||||
@ -151,8 +154,9 @@ public:
|
||||
};
|
||||
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(Co2InjectionBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Use the algebraic multi-grid linear solver for this problem
|
||||
template<class TypeTag>
|
||||
|
@ -60,7 +60,9 @@ namespace Opm::Properties {
|
||||
|
||||
|
||||
// create a new type tag for the cuvette steam injection problem
|
||||
NEW_TYPE_TAG(CuvetteBaseProblem);
|
||||
namespace TTag {
|
||||
struct CuvetteBaseProblem {};
|
||||
}
|
||||
|
||||
// Set the grid type
|
||||
template<class TypeTag>
|
||||
@ -71,9 +73,9 @@ template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::CuvetteBaseProblem> { using type = Opm::CuvetteProblem<TypeTag>; };
|
||||
|
||||
// Set the fluid system
|
||||
SET_TYPE_PROP(
|
||||
CuvetteBaseProblem, FluidSystem,
|
||||
Opm::H2OAirMesityleneFluidSystem<GetPropType<TypeTag, Properties::Scalar>>);
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::CuvetteBaseProblem>
|
||||
{ using type = Opm::H2OAirMesityleneFluidSystem<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Enable gravity
|
||||
template<class TypeTag>
|
||||
@ -106,8 +108,9 @@ public:
|
||||
};
|
||||
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(CuvetteBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::CuvetteBaseProblem>
|
||||
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Set the thermal conduction law
|
||||
template<class TypeTag>
|
||||
|
@ -54,7 +54,11 @@ class DiffusionProblem;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(DiffusionBaseProblem);
|
||||
namespace TTag {
|
||||
|
||||
struct DiffusionBaseProblem {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// Set the grid implementation to be used
|
||||
template<class TypeTag>
|
||||
|
@ -71,12 +71,12 @@ struct FingerBaseProblem { using InheritsFrom = std::tuple<StructuredGridVanguar
|
||||
|
||||
#if HAVE_DUNE_ALUGRID
|
||||
// use dune-alugrid if available
|
||||
SET_TYPE_PROP(FingerBaseProblem,
|
||||
Grid,
|
||||
Dune::ALUGrid</*dim=*/2,
|
||||
/*dimWorld=*/2,
|
||||
Dune::cube,
|
||||
Dune::nonconforming>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::FingerBaseProblem>
|
||||
{ using type = Dune::ALUGrid</*dim=*/2,
|
||||
/*dimWorld=*/2,
|
||||
Dune::cube,
|
||||
Dune::nonconforming>; };
|
||||
#endif
|
||||
|
||||
// declare the properties used by the finger problem
|
||||
@ -249,7 +249,7 @@ class FingerProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
typedef GetPropType<TypeTag, Properties::RateVector> RateVector;
|
||||
typedef GetPropType<TypeTag, Properties::BoundaryRateVector> BoundaryRateVector;
|
||||
|
||||
typedef typename GET_PROP(TypeTag, MaterialLaw)::ParkerLenhard ParkerLenhard;
|
||||
typedef typename GetProp<TypeTag, Properties::MaterialLaw>::ParkerLenhard ParkerLenhard;
|
||||
typedef GetPropType<TypeTag, Properties::MaterialLaw> MaterialLaw;
|
||||
typedef GetPropType<TypeTag, Properties::MaterialLawParams> MaterialLawParams;
|
||||
|
||||
|
@ -74,9 +74,9 @@ struct FractureProblem { using InheritsFrom = std::tuple<DiscreteFractureModel>;
|
||||
} // end namespace TTag
|
||||
|
||||
// Set the grid type
|
||||
SET_TYPE_PROP(
|
||||
FractureProblem, Grid,
|
||||
Dune::ALUGrid</*dim=*/2, /*dimWorld=*/2, Dune::simplex, Dune::nonconforming>);
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::FractureProblem>
|
||||
{ using type = Dune::ALUGrid</*dim=*/2, /*dimWorld=*/2, Dune::simplex, Dune::nonconforming>; };
|
||||
|
||||
// Set the Vanguard property
|
||||
template<class TypeTag>
|
||||
@ -150,8 +150,9 @@ public:
|
||||
};
|
||||
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(FractureProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::FractureProblem>
|
||||
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Disable gravity
|
||||
template<class TypeTag>
|
||||
|
@ -89,8 +89,9 @@ template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::GroundWaterBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
// struct Grid<TypeTag, TTag::GroundWaterBaseProblem> { using type = Dune::SGrid<2, 2>; };
|
||||
|
||||
SET_TYPE_PROP(GroundWaterBaseProblem, Problem,
|
||||
Opm::GroundWaterProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{ using type = Opm::GroundWaterProblem<TypeTag>; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct LensLowerLeftX<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
@ -169,8 +170,10 @@ struct GridFile<TypeTag, TTag::GroundWaterBaseProblem> { static constexpr auto v
|
||||
// ILU-0) from dune-istl
|
||||
template<class TypeTag>
|
||||
struct LinearSolverSplice<TypeTag, TTag::GroundWaterBaseProblem> { using type = TTag::ParallelIstlLinearSolver; };
|
||||
SET_TYPE_PROP(GroundWaterBaseProblem, LinearSolverWrapper,
|
||||
Opm::Linear::SolverWrapperConjugatedGradients<TypeTag>);
|
||||
|
||||
template<class TypeTag>
|
||||
struct LinearSolverWrapper<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
{ using type = Opm::Linear::SolverWrapperConjugatedGradients<TypeTag>; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -54,20 +54,22 @@ class InfiltrationProblem;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(InfiltrationBaseProblem);
|
||||
namespace TTag {
|
||||
struct InfiltrationBaseProblem {};
|
||||
}
|
||||
|
||||
// Set the grid type
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::InfiltrationBaseProblem> { using type = Dune::YaspGrid<2>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(InfiltrationBaseProblem, Problem,
|
||||
Opm::InfiltrationProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::InfiltrationBaseProblem> { using type = Opm::InfiltrationProblem<TypeTag>; };
|
||||
|
||||
// Set the fluid system
|
||||
SET_TYPE_PROP(
|
||||
InfiltrationBaseProblem, FluidSystem,
|
||||
Opm::H2OAirMesityleneFluidSystem<GetPropType<TypeTag, Properties::Scalar>>);
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::InfiltrationBaseProblem>
|
||||
{ using type = Opm::H2OAirMesityleneFluidSystem<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Enable gravity?
|
||||
template<class TypeTag>
|
||||
@ -116,8 +118,9 @@ struct InitialTimeStepSize<TypeTag, TTag::InfiltrationBaseProblem>
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(InfiltrationBaseProblem, GridFile,
|
||||
"./data/infiltration_50x3.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::InfiltrationBaseProblem>
|
||||
{ static constexpr auto value = "./data/infiltration_50x3.dgf"; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -59,7 +59,9 @@ class ObstacleProblem;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(ObstacleBaseProblem);
|
||||
namespace TTag {
|
||||
struct ObstacleBaseProblem {};
|
||||
}
|
||||
|
||||
// Set the grid type
|
||||
template<class TypeTag>
|
||||
@ -70,8 +72,9 @@ template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::ObstacleBaseProblem> { using type = Opm::ObstacleProblem<TypeTag>; };
|
||||
|
||||
// Set fluid configuration
|
||||
SET_TYPE_PROP(ObstacleBaseProblem, FluidSystem,
|
||||
Opm::H2ON2FluidSystem<GetPropType<TypeTag, Properties::Scalar>>);
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::ObstacleBaseProblem>
|
||||
{ using type = Opm::H2ON2FluidSystem<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Set the material Law
|
||||
template<class TypeTag>
|
||||
@ -106,8 +109,9 @@ public:
|
||||
};
|
||||
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(ObstacleBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::ObstacleBaseProblem>
|
||||
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Enable gravity
|
||||
template<class TypeTag>
|
||||
|
@ -47,7 +47,11 @@ class OutflowProblem;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(OutflowBaseProblem);
|
||||
namespace TTag {
|
||||
|
||||
struct OutflowBaseProblem {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// Set the grid type
|
||||
template<class TypeTag>
|
||||
|
@ -59,19 +59,21 @@ class PowerInjectionProblem;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(PowerInjectionBaseProblem);
|
||||
namespace TTag {
|
||||
struct PowerInjectionBaseProblem {};
|
||||
}
|
||||
|
||||
// Set the grid implementation to be used
|
||||
template<class TypeTag>
|
||||
struct Grid<TypeTag, TTag::PowerInjectionBaseProblem> { using type = Dune::YaspGrid</*dim=*/1>; };
|
||||
|
||||
// set the Vanguard property
|
||||
SET_TYPE_PROP(PowerInjectionBaseProblem, Vanguard,
|
||||
Opm::CubeGridVanguard<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Vanguard<TypeTag, TTag::PowerInjectionBaseProblem> { using type = Opm::CubeGridVanguard<TypeTag>; };
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(PowerInjectionBaseProblem, Problem,
|
||||
Opm::PowerInjectionProblem<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::PowerInjectionBaseProblem> { using type = Opm::PowerInjectionProblem<TypeTag>; };
|
||||
|
||||
// Set the wetting phase
|
||||
template<class TypeTag>
|
||||
|
@ -59,7 +59,11 @@ class ReservoirProblem;
|
||||
namespace Opm::Properties {
|
||||
|
||||
|
||||
NEW_TYPE_TAG(ReservoirBaseProblem);
|
||||
namespace TTag {
|
||||
|
||||
struct ReservoirBaseProblem {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// Maximum depth of the reservoir
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -60,7 +60,9 @@ class WaterAirProblem;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(WaterAirBaseProblem);
|
||||
namespace TTag {
|
||||
struct WaterAirBaseProblem {};
|
||||
}
|
||||
|
||||
// Set the grid type
|
||||
template<class TypeTag>
|
||||
@ -105,13 +107,15 @@ public:
|
||||
};
|
||||
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Set the fluid system. in this case, we use the one which describes
|
||||
// air and water
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, FluidSystem,
|
||||
Opm::H2OAirFluidSystem<GetPropType<TypeTag, Properties::Scalar>>);
|
||||
template<class TypeTag>
|
||||
struct FluidSystem<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = Opm::H2OAirFluidSystem<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
// Enable gravity
|
||||
template<class TypeTag>
|
||||
@ -147,15 +151,21 @@ struct GridFile<TypeTag, TTag::WaterAirBaseProblem> { static constexpr auto valu
|
||||
|
||||
// Use the restarted GMRES linear solver with the ILU-2 preconditioner from dune-istl
|
||||
template<class TypeTag>
|
||||
struct LinearSolverSplice<TypeTag, TTag::WaterAirBaseProblem> { using type = TTag::ParallelIstlLinearSolver; };
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, LinearSolverWrapper,
|
||||
Opm::Linear::SolverWrapperRestartedGMRes<TypeTag>);
|
||||
struct LinearSolverSplice<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = TTag::ParallelIstlLinearSolver; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct LinearSolverWrapper<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = Opm::Linear::SolverWrapperRestartedGMRes<TypeTag>; };
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,7)
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, PreconditionerWrapper,
|
||||
Opm::Linear::PreconditionerWrapperILU<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct PreconditionerWrapper<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = Opm::Linear::PreconditionerWrapperILU<TypeTag>; };
|
||||
#else
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, PreconditionerWrapper,
|
||||
Opm::Linear::PreconditionerWrapperILUn<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct PreconditionerWrapper<TypeTag, TTag::WaterAirBaseProblem>
|
||||
{ using type = Opm::Linear::PreconditionerWrapperILUn<TypeTag>; };
|
||||
#endif
|
||||
template<class TypeTag>
|
||||
struct PreconditionerOrder<TypeTag, TTag::WaterAirBaseProblem> { static constexpr int value = 2; };
|
||||
|
@ -66,12 +66,14 @@ struct Tutorial1Problem { using InheritsFrom = std::tuple<ImmiscibleTwoPhaseMode
|
||||
} // end namespace TTag
|
||||
|
||||
// Select the vertex centered finite volume method as spatial discretization
|
||||
SET_TAG_PROP(Tutorial1Problem, SpatialDiscretizationSplice,
|
||||
VcfvDiscretization); /*@\label{tutorial1:set-spatial-discretization}@*/
|
||||
template<class TypeTag>
|
||||
struct SpatialDiscretizationSplice<TypeTag, TTag::Tutorial1Problem>
|
||||
{ using type = TTag::VcfvDiscretization; }; /*@\label{tutorial1:set-spatial-discretization}@*/
|
||||
|
||||
// Set the "Problem" property
|
||||
SET_TYPE_PROP(Tutorial1Problem, Problem,
|
||||
Opm::Tutorial1Problem<TypeTag>); /*@\label{tutorial1:set-problem}@*/
|
||||
template<class TypeTag>
|
||||
struct Problem<TypeTag, TTag::Tutorial1Problem>
|
||||
{ using type = Opm::Tutorial1Problem<TypeTag>; }; /*@\label{tutorial1:set-problem}@*/
|
||||
|
||||
// Set grid and the grid manager to be used
|
||||
template<class TypeTag>
|
||||
@ -80,16 +82,20 @@ template<class TypeTag>
|
||||
struct Vanguard<TypeTag, TTag::Tutorial1Problem> { using type = Opm::CubeGridVanguard<TypeTag>; }; /*@\label{tutorial1:set-grid-manager}@*/
|
||||
|
||||
// Set the wetting phase /*@\label{tutorial1:2p-system-start}@*/
|
||||
SET_TYPE_PROP(Tutorial1Problem,
|
||||
WettingPhase, /*@\label{tutorial1:wettingPhase}@*/
|
||||
Opm::LiquidPhase<GetPropType<TypeTag, Properties::Scalar>,
|
||||
Opm::SimpleH2O<GetPropType<TypeTag, Properties::Scalar>> >);
|
||||
template<class TypeTag>
|
||||
struct WettingPhase<TypeTag, TTag::Tutorial1Problem> /*@\label{tutorial1:wettingPhase}@*/
|
||||
{
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> >;
|
||||
};
|
||||
|
||||
// Set the non-wetting phase
|
||||
SET_TYPE_PROP(Tutorial1Problem,
|
||||
NonwettingPhase, /*@\label{tutorial1:nonwettingPhase}@*/
|
||||
Opm::LiquidPhase<GetPropType<TypeTag, Properties::Scalar>,
|
||||
Opm::LNAPL<GetPropType<TypeTag, Properties::Scalar>> >); /*@\label{tutorial1:2p-system-end}@*/
|
||||
template<class TypeTag>
|
||||
struct NonwettingPhase<TypeTag, TTag::Tutorial1Problem> /*@\label{tutorial1:nonwettingPhase}@*/
|
||||
{
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using type = Opm::LiquidPhase<Scalar, Opm::LNAPL<Scalar> >;
|
||||
}; /*@\label{tutorial1:2p-system-end}@*/
|
||||
|
||||
// Set the material law
|
||||
template<class TypeTag>
|
||||
|
@ -68,17 +68,19 @@ class EclVanguard;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
//! The type tag for the black-oil problems
|
||||
NEW_TYPE_TAG(BlackOilModel, INHERITS_FROM(MultiPhaseBaseModel,
|
||||
VtkBlackOil,
|
||||
VtkBlackOilSolvent,
|
||||
VtkBlackOilPolymer,
|
||||
VtkBlackOilEnergy,
|
||||
VtkComposition));
|
||||
struct BlackOilModel { using InheritsFrom = std::tuple<VtkComposition,
|
||||
VtkBlackOilEnergy,
|
||||
VtkBlackOilPolymer,
|
||||
VtkBlackOilSolvent,
|
||||
VtkBlackOil,
|
||||
MultiPhaseBaseModel>; };
|
||||
} // namespace TTag
|
||||
|
||||
//! Set the local residual function
|
||||
SET_TYPE_PROP(BlackOilModel, LocalResidual,
|
||||
Opm::BlackOilLocalResidual<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilLocalResidual<TypeTag>; };
|
||||
|
||||
//! Use the black-oil specific newton method
|
||||
template<class TypeTag>
|
||||
@ -118,13 +120,14 @@ template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilDarcyFluxModule<TypeTag>; };
|
||||
|
||||
//! The indices required by the model
|
||||
SET_TYPE_PROP(BlackOilModel, Indices,
|
||||
Opm::BlackOilIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
|
||||
getPropValue<TypeTag, Properties::EnablePolymer>(),
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0>);
|
||||
template<class TypeTag>
|
||||
struct Indices<TypeTag, TTag::BlackOilModel>
|
||||
{ using type = Opm::BlackOilIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
|
||||
getPropValue<TypeTag, Properties::EnablePolymer>(),
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0>; };
|
||||
|
||||
//! Set the fluid system to the black-oil fluid system by default
|
||||
template<class TypeTag>
|
||||
|
@ -59,7 +59,11 @@ struct MultiPhaseBaseModel { using InheritsFrom = std::tuple<VtkTemperature, Vtk
|
||||
} // end namespace TTag
|
||||
|
||||
//! Specify the splices of the MultiPhaseBaseModel type tag
|
||||
SET_SPLICES(MultiPhaseBaseModel, SpatialDiscretizationSplice);
|
||||
template<class TypeTag>
|
||||
struct Splices<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{
|
||||
using type = std::tuple<GetSplicePropType<TypeTag, TTag::MultiPhaseBaseModel, Properties::SpatialDiscretizationSplice>>;
|
||||
};
|
||||
|
||||
//! Set the default spatial discretization
|
||||
//!
|
||||
@ -104,32 +108,32 @@ public:
|
||||
* \brief Set the property for the material parameters by extracting
|
||||
* it from the material law.
|
||||
*/
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel,
|
||||
MaterialLawParams,
|
||||
typename GetPropType<TypeTag, Properties::MaterialLaw>::Params);
|
||||
template<class TypeTag>
|
||||
struct MaterialLawParams<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{ using type = typename GetPropType<TypeTag, Properties::MaterialLaw>::Params; };
|
||||
|
||||
//! set the energy storage law for the solid to the one which assumes zero heat capacity
|
||||
//! by default
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel,
|
||||
SolidEnergyLaw,
|
||||
Opm::NullSolidEnergyLaw<GetPropType<TypeTag, Properties::Scalar>>);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLaw<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{ using type = Opm::NullSolidEnergyLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
//! extract the type of the parameter objects for the solid energy storage law from the
|
||||
//! law itself
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel,
|
||||
SolidEnergyLawParams,
|
||||
typename GetPropType<TypeTag, Properties::SolidEnergyLaw>::Params);
|
||||
template<class TypeTag>
|
||||
struct SolidEnergyLawParams<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{ using type = typename GetPropType<TypeTag, Properties::SolidEnergyLaw>::Params; };
|
||||
|
||||
//! set the thermal conduction law to a dummy one by default
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel,
|
||||
ThermalConductionLaw,
|
||||
Opm::NullThermalConductionLaw<GetPropType<TypeTag, Properties::Scalar>>);
|
||||
template<class TypeTag>
|
||||
struct ThermalConductionLaw<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{ using type = Opm::NullThermalConductionLaw<GetPropType<TypeTag, Properties::Scalar>>; };
|
||||
|
||||
//! extract the type of the parameter objects for the thermal conduction law from the law
|
||||
//! itself
|
||||
SET_TYPE_PROP(MultiPhaseBaseModel,
|
||||
ThermalConductionLawParams,
|
||||
typename GetPropType<TypeTag, Properties::ThermalConductionLaw>::Params);
|
||||
template<class TypeTag>
|
||||
struct ThermalConductionLawParams<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{ using type = typename GetPropType<TypeTag, Properties::ThermalConductionLaw>::Params; };
|
||||
|
||||
//! disable gravity by default
|
||||
template<class TypeTag>
|
||||
|
@ -51,9 +51,9 @@ class DiscreteFractureModel;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
//! The generic type tag for problems using the immiscible multi-phase model
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
//! The generic type tag for problems using the immiscible multi-phase model
|
||||
struct DiscreteFractureModel { using InheritsFrom = std::tuple<VtkDiscreteFracture, ImmiscibleTwoPhaseModel>; };
|
||||
} // end namespace TTag
|
||||
|
||||
@ -71,19 +71,23 @@ struct LocalResidual<TypeTag, TTag::DiscreteFractureModel> { using type = Opm::D
|
||||
|
||||
// The type of the base base class for actual problems.
|
||||
// TODO!?
|
||||
//SET_TYPE_PROP(DiscreteFractureModel BaseProblem, DiscreteFractureBaseProblem<TypeTag>);
|
||||
// template<class TypeTag>
|
||||
// struct BaseProblem<TypeTag, TTag::DiscreteFractureModel> { using type = DiscreteFractureBaseProblem<TypeTag>; };
|
||||
|
||||
//! the PrimaryVariables property
|
||||
SET_TYPE_PROP(DiscreteFractureModel, PrimaryVariables,
|
||||
Opm::DiscreteFracturePrimaryVariables<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct PrimaryVariables<TypeTag, TTag::DiscreteFractureModel>
|
||||
{ using type = Opm::DiscreteFracturePrimaryVariables<TypeTag>; };
|
||||
|
||||
//! the IntensiveQuantities property
|
||||
SET_TYPE_PROP(DiscreteFractureModel, IntensiveQuantities,
|
||||
Opm::DiscreteFractureIntensiveQuantities<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct IntensiveQuantities<TypeTag, TTag::DiscreteFractureModel>
|
||||
{ using type = Opm::DiscreteFractureIntensiveQuantities<TypeTag>; };
|
||||
|
||||
//! the ExtensiveQuantities property
|
||||
SET_TYPE_PROP(DiscreteFractureModel, ExtensiveQuantities,
|
||||
Opm::DiscreteFractureExtensiveQuantities<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct ExtensiveQuantities<TypeTag, TTag::DiscreteFractureModel>
|
||||
{ using type = Opm::DiscreteFractureExtensiveQuantities<TypeTag>; };
|
||||
|
||||
//! For the discrete fracture model, we need to use two-point flux approximation or it
|
||||
//! will converge very poorly
|
||||
|
@ -34,11 +34,11 @@
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm::Properties {
|
||||
namespace Opm::Properties::Tag {
|
||||
|
||||
NEW_TYPE_TAG(AuxModule);
|
||||
struct AuxModule {};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
} // namespace Opm::Properties::TTag
|
||||
|
||||
namespace Opm {
|
||||
|
||||
|
@ -49,12 +49,15 @@ class FvBaseAdLocalLinearizer;
|
||||
namespace Opm::Properties {
|
||||
|
||||
// declare the property tags required for the finite differences local linearizer
|
||||
NEW_TYPE_TAG(AutoDiffLocalLinearizer);
|
||||
|
||||
namespace TTag {
|
||||
struct AutoDiffLocalLinearizer {};
|
||||
} // namespace TTag
|
||||
|
||||
// set the properties to be spliced in
|
||||
SET_TYPE_PROP(AutoDiffLocalLinearizer, LocalLinearizer,
|
||||
Opm::FvBaseAdLocalLinearizer<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizer<TypeTag, TTag::AutoDiffLocalLinearizer>
|
||||
{ using type = Opm::FvBaseAdLocalLinearizer<TypeTag>; };
|
||||
|
||||
//! Set the function evaluation w.r.t. the primary variables
|
||||
template<class TypeTag>
|
||||
|
@ -93,12 +93,14 @@ template<class TypeTag>
|
||||
struct Simulator<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::Simulator<TypeTag>; };
|
||||
|
||||
//! Mapper for the grid view's vertices.
|
||||
SET_TYPE_PROP(FvBaseDiscretization, VertexMapper,
|
||||
Dune::MultipleCodimMultipleGeomTypeMapper<GetPropType<TypeTag, Properties::GridView>>);
|
||||
template<class TypeTag>
|
||||
struct VertexMapper<TypeTag, TTag::FvBaseDiscretization>
|
||||
{ using type = Dune::MultipleCodimMultipleGeomTypeMapper<GetPropType<TypeTag, Properties::GridView>>; };
|
||||
|
||||
//! Mapper for the grid view's elements.
|
||||
SET_TYPE_PROP(FvBaseDiscretization, ElementMapper,
|
||||
Dune::MultipleCodimMultipleGeomTypeMapper<GetPropType<TypeTag, Properties::GridView>>);
|
||||
template<class TypeTag>
|
||||
struct ElementMapper<TypeTag, TTag::FvBaseDiscretization>
|
||||
{ using type = Dune::MultipleCodimMultipleGeomTypeMapper<GetPropType<TypeTag, Properties::GridView>>; };
|
||||
|
||||
//! marks the border indices (required for the algebraic overlap stuff)
|
||||
template<class TypeTag>
|
||||
@ -137,23 +139,26 @@ struct ContinueOnConvergenceError<TypeTag, TTag::FvBaseDiscretization> { static
|
||||
/*!
|
||||
* \brief A vector of quanties, each for one equation.
|
||||
*/
|
||||
SET_TYPE_PROP(FvBaseDiscretization, EqVector,
|
||||
Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
|
||||
getPropValue<TypeTag, Properties::NumEq>()>);
|
||||
template<class TypeTag>
|
||||
struct EqVector<TypeTag, TTag::FvBaseDiscretization>
|
||||
{ using type = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
|
||||
getPropValue<TypeTag, Properties::NumEq>()>; };
|
||||
|
||||
/*!
|
||||
* \brief A vector for mass/energy rates.
|
||||
*
|
||||
* E.g. Neumann fluxes or source terms
|
||||
*/
|
||||
SET_TYPE_PROP(FvBaseDiscretization, RateVector,
|
||||
GetPropType<TypeTag, Properties::EqVector>);
|
||||
template<class TypeTag>
|
||||
struct RateVector<TypeTag, TTag::FvBaseDiscretization>
|
||||
{ using type = GetPropType<TypeTag, Properties::EqVector>; };
|
||||
|
||||
/*!
|
||||
* \brief Type of object for specifying boundary conditions.
|
||||
*/
|
||||
SET_TYPE_PROP(FvBaseDiscretization, BoundaryRateVector,
|
||||
GetPropType<TypeTag, Properties::RateVector>);
|
||||
template<class TypeTag>
|
||||
struct BoundaryRateVector<TypeTag, TTag::FvBaseDiscretization>
|
||||
{ using type = GetPropType<TypeTag, Properties::RateVector>; };
|
||||
|
||||
/*!
|
||||
* \brief The class which represents constraints.
|
||||
@ -164,14 +169,16 @@ struct Constraints<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBa
|
||||
/*!
|
||||
* \brief The type for storing a residual for an element.
|
||||
*/
|
||||
SET_TYPE_PROP(FvBaseDiscretization, ElementEqVector,
|
||||
Dune::BlockVector<GetPropType<TypeTag, Properties::EqVector>>);
|
||||
template<class TypeTag>
|
||||
struct ElementEqVector<TypeTag, TTag::FvBaseDiscretization>
|
||||
{ using type = Dune::BlockVector<GetPropType<TypeTag, Properties::EqVector>>; };
|
||||
|
||||
/*!
|
||||
* \brief The type for storing a residual for the whole grid.
|
||||
*/
|
||||
SET_TYPE_PROP(FvBaseDiscretization, GlobalEqVector,
|
||||
Dune::BlockVector<GetPropType<TypeTag, Properties::EqVector>>);
|
||||
template<class TypeTag>
|
||||
struct GlobalEqVector<TypeTag, TTag::FvBaseDiscretization>
|
||||
{ using type = Dune::BlockVector<GetPropType<TypeTag, Properties::EqVector>>; };
|
||||
|
||||
/*!
|
||||
* \brief An object representing a local set of primary variables.
|
||||
@ -182,8 +189,9 @@ struct PrimaryVariables<TypeTag, TTag::FvBaseDiscretization> { using type = Opm:
|
||||
/*!
|
||||
* \brief The type of a solution for the whole grid at a fixed time.
|
||||
*/
|
||||
SET_TYPE_PROP(FvBaseDiscretization, SolutionVector,
|
||||
Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>);
|
||||
template<class TypeTag>
|
||||
struct SolutionVector<TypeTag, TTag::FvBaseDiscretization>
|
||||
{ using type = Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; };
|
||||
|
||||
/*!
|
||||
* \brief The class representing intensive quantities.
|
||||
|
@ -53,7 +53,10 @@ class FvBaseFdLocalLinearizer;
|
||||
namespace Opm::Properties {
|
||||
|
||||
// declare the property tags required for the finite differences local linearizer
|
||||
NEW_TYPE_TAG(FiniteDifferenceLocalLinearizer);
|
||||
|
||||
namespace TTag {
|
||||
struct FiniteDifferenceLocalLinearizer {};
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NumericDifferenceMethod { using type = UndefinedProperty; };
|
||||
@ -61,11 +64,13 @@ template<class TypeTag, class MyTypeTag>
|
||||
struct BaseEpsilon { using type = UndefinedProperty; };
|
||||
|
||||
// set the properties to be spliced in
|
||||
SET_TYPE_PROP(FiniteDifferenceLocalLinearizer, LocalLinearizer,
|
||||
Opm::FvBaseFdLocalLinearizer<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LocalLinearizer<TypeTag, TTag::FiniteDifferenceLocalLinearizer>
|
||||
{ using type = Opm::FvBaseFdLocalLinearizer<TypeTag>; };
|
||||
|
||||
SET_TYPE_PROP(FiniteDifferenceLocalLinearizer, Evaluation,
|
||||
GetPropType<TypeTag, Properties::Scalar>);
|
||||
template<class TypeTag>
|
||||
struct Evaluation<TypeTag, TTag::FiniteDifferenceLocalLinearizer>
|
||||
{ using type = GetPropType<TypeTag, Properties::Scalar>; };
|
||||
|
||||
/*!
|
||||
* \brief Specify which kind of method should be used to numerically
|
||||
@ -78,9 +83,12 @@ template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::FiniteDifferenceLocalLinearizer> { static constexpr int value = +1; };
|
||||
|
||||
//! The base epsilon value for finite difference calculations
|
||||
SET_SCALAR_PROP(FiniteDifferenceLocalLinearizer,
|
||||
BaseEpsilon,
|
||||
std::max<Scalar>(0.9123e-10, std::numeric_limits<Scalar>::epsilon()*1.23e3));
|
||||
template<class TypeTag>
|
||||
struct BaseEpsilon<TypeTag, TTag::FiniteDifferenceLocalLinearizer>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = std::max<type>(0.9123e-10, std::numeric_limits<type>::epsilon()*1.23e3);
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -55,12 +55,17 @@ template<class TypeTag, class MyTypeTag>
|
||||
struct DiscNewtonMethod { using type = UndefinedProperty; };
|
||||
|
||||
// set default values
|
||||
SET_TYPE_PROP(FvBaseNewtonMethod, DiscNewtonMethod,
|
||||
Opm::FvBaseNewtonMethod<TypeTag>);
|
||||
SET_TYPE_PROP(FvBaseNewtonMethod, NewtonMethod,
|
||||
GetPropType<TypeTag, Properties::DiscNewtonMethod>);
|
||||
SET_TYPE_PROP(FvBaseNewtonMethod, NewtonConvergenceWriter,
|
||||
Opm::FvBaseNewtonConvergenceWriter<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct DiscNewtonMethod<TypeTag, TTag::FvBaseNewtonMethod>
|
||||
{ using type = Opm::FvBaseNewtonMethod<TypeTag>; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct NewtonMethod<TypeTag, TTag::FvBaseNewtonMethod>
|
||||
{ using type = GetPropType<TypeTag, Properties::DiscNewtonMethod>; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct NewtonConvergenceWriter<TypeTag, TTag::FvBaseNewtonMethod>
|
||||
{ using type = Opm::FvBaseNewtonConvergenceWriter<TypeTag>; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -42,11 +42,13 @@ struct VtkPrimaryVars;
|
||||
struct FiniteDifferenceLocalLinearizer;
|
||||
}
|
||||
|
||||
namespace TTag {
|
||||
|
||||
//! The type tag for models based on the finite volume schemes
|
||||
NEW_TYPE_TAG(FvBaseDiscretization,
|
||||
INHERITS_FROM(ImplicitModel,
|
||||
FvBaseNewtonMethod,
|
||||
VtkPrimaryVars));
|
||||
struct FvBaseDiscretization
|
||||
{ using InheritsFrom = std::tuple<VtkPrimaryVars, FvBaseNewtonMethod, ImplicitModel>; };
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
|
||||
//! set the splices for the finite volume discretizations
|
||||
@ -54,7 +56,12 @@ template<class TypeTag, class MyTypeTag>
|
||||
struct LinearSolverSplice { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LocalLinearizerSplice { using type = UndefinedProperty; };
|
||||
SET_SPLICES(FvBaseDiscretization, LinearSolverSplice, LocalLinearizerSplice);
|
||||
template<class TypeTag>
|
||||
struct Splices<TypeTag, TTag::FvBaseDiscretization>
|
||||
{
|
||||
using type = std::tuple<GetSplicePropType<TypeTag, TTag::FvBaseDiscretization, Properties::LinearSolverSplice>,
|
||||
GetSplicePropType<TypeTag, TTag::FvBaseDiscretization, Properties::LocalLinearizerSplice>>;
|
||||
};
|
||||
|
||||
//! use a parallel BiCGStab linear solver by default
|
||||
template<class TypeTag>
|
||||
|
@ -72,12 +72,14 @@ struct Discretization<TypeTag, TTag::EcfvDiscretization> { using type = Opm::Ecf
|
||||
|
||||
//! The base class for the output modules (decides whether to write
|
||||
//! element or vertex based fields)
|
||||
SET_TYPE_PROP(EcfvDiscretization, DiscBaseOutputModule,
|
||||
Opm::EcfvBaseOutputModule<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct DiscBaseOutputModule<TypeTag, TTag::EcfvDiscretization>
|
||||
{ using type = Opm::EcfvBaseOutputModule<TypeTag>; };
|
||||
|
||||
//! The class to create grid communication handles
|
||||
SET_TYPE_PROP(EcfvDiscretization, GridCommHandleFactory,
|
||||
Opm::EcfvGridCommHandleFactory<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct GridCommHandleFactory<TypeTag, TTag::EcfvDiscretization>
|
||||
{ using type = Opm::EcfvGridCommHandleFactory<TypeTag>; };
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
//! Set the DiscreteFunctionSpace
|
||||
|
@ -74,16 +74,19 @@ struct Discretization<TypeTag, TTag::VcfvDiscretization> { using type = Opm::Vcf
|
||||
|
||||
//! The base class for the output modules (decides whether to write
|
||||
//! element or vertex based fields)
|
||||
SET_TYPE_PROP(VcfvDiscretization, DiscBaseOutputModule,
|
||||
Opm::VcfvBaseOutputModule<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct DiscBaseOutputModule<TypeTag, TTag::VcfvDiscretization>
|
||||
{ using type = Opm::VcfvBaseOutputModule<TypeTag>; };
|
||||
|
||||
//! Calculates the gradient of any quantity given the index of a flux approximation point
|
||||
SET_TYPE_PROP(VcfvDiscretization, GradientCalculator,
|
||||
Opm::P1FeGradientCalculator<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct GradientCalculator<TypeTag, TTag::VcfvDiscretization>
|
||||
{ using type = Opm::P1FeGradientCalculator<TypeTag>; };
|
||||
|
||||
//! The class to create grid communication handles
|
||||
SET_TYPE_PROP(VcfvDiscretization, GridCommHandleFactory,
|
||||
Opm::VcfvGridCommHandleFactory<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct GridCommHandleFactory<TypeTag, TTag::VcfvDiscretization>
|
||||
{ using type = Opm::VcfvGridCommHandleFactory<TypeTag>; };
|
||||
|
||||
//! Use two-point gradients by default for the vertex centered finite volume scheme.
|
||||
template<class TypeTag>
|
||||
|
@ -58,20 +58,23 @@ class FlashModel;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
//! The type tag for the isothermal single phase problems
|
||||
NEW_TYPE_TAG(FlashModel, INHERITS_FROM(MultiPhaseBaseModel,
|
||||
VtkComposition,
|
||||
VtkEnergy,
|
||||
VtkDiffusion));
|
||||
struct FlashModel { using InheritsFrom = std::tuple<VtkDiffusion,
|
||||
VtkEnergy,
|
||||
VtkComposition,
|
||||
MultiPhaseBaseModel>; };
|
||||
} // namespace TTag
|
||||
|
||||
//! Use the FlashLocalResidual function for the flash model
|
||||
SET_TYPE_PROP(FlashModel, LocalResidual,
|
||||
Opm::FlashLocalResidual<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::FlashModel> { using type = Opm::FlashLocalResidual<TypeTag>; };
|
||||
|
||||
//! Use the NCP flash solver by default
|
||||
SET_TYPE_PROP(FlashModel, FlashSolver,
|
||||
Opm::NcpFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>);
|
||||
template<class TypeTag>
|
||||
struct FlashSolver<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::NcpFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>; };
|
||||
|
||||
//! Let the flash solver choose its tolerance by default
|
||||
template<class TypeTag>
|
||||
|
@ -70,8 +70,8 @@ struct ImmiscibleTwoPhaseModel { using InheritsFrom = std::tuple<ImmiscibleModel
|
||||
} // end namespace TTag
|
||||
|
||||
//! Use the immiscible multi-phase local jacobian operator for the immiscible multi-phase model
|
||||
SET_TYPE_PROP(ImmiscibleModel, LocalResidual,
|
||||
Opm::ImmiscibleLocalResidual<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::ImmiscibleModel> { using type = Opm::ImmiscibleLocalResidual<TypeTag>; };
|
||||
|
||||
//! the Model property
|
||||
template<class TypeTag>
|
||||
|
@ -54,7 +54,11 @@ class StructuredGridVanguard;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(StructuredGridVanguard);
|
||||
namespace TTag {
|
||||
|
||||
struct StructuredGridVanguard {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// GRIDDIM is only set by the finger problem
|
||||
#ifndef GRIDDIM
|
||||
|
@ -42,8 +42,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK multi-phase output
|
||||
NEW_TYPE_TAG(VtkBlackOilEnergy);
|
||||
struct VtkBlackOilEnergy {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the energy module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -42,8 +42,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK multi-phase output
|
||||
NEW_TYPE_TAG(VtkBlackOil);
|
||||
struct VtkBlackOil {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the multi phase module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -42,8 +42,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK multi-phase output
|
||||
NEW_TYPE_TAG(VtkBlackOilPolymer);
|
||||
struct VtkBlackOilPolymer {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the polymer output module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -42,8 +42,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK multi-phase output
|
||||
NEW_TYPE_TAG(VtkBlackOilSolvent);
|
||||
struct VtkBlackOilSolvent {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the solvent output module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -37,8 +37,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK composition output
|
||||
NEW_TYPE_TAG(VtkComposition);
|
||||
struct VtkComposition {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the composition module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -39,9 +39,13 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK output of the quantities for molecular
|
||||
// diffusion
|
||||
NEW_TYPE_TAG(VtkDiffusion);
|
||||
struct VtkDiffusion {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the diffusion module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -41,8 +41,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK multi-phase output
|
||||
NEW_TYPE_TAG(VtkDiscreteFracture);
|
||||
struct VtkDiscreteFracture {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the multi phase module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -37,8 +37,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK energy output
|
||||
NEW_TYPE_TAG(VtkEnergy);
|
||||
struct VtkEnergy {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the energy module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -42,8 +42,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK multi-phase output
|
||||
NEW_TYPE_TAG(VtkMultiPhase);
|
||||
struct VtkMultiPhase {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the multi phase module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -35,8 +35,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK primary variables output
|
||||
NEW_TYPE_TAG(VtkPhasePresence);
|
||||
struct VtkPhasePresence {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the primary variables module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -35,8 +35,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK primary variables output
|
||||
NEW_TYPE_TAG(VtkPrimaryVars);
|
||||
struct VtkPrimaryVars {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the primary variables module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -37,8 +37,12 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// create new type tag for the VTK temperature output
|
||||
NEW_TYPE_TAG(VtkTemperature);
|
||||
struct VtkTemperature {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
// create the property tags needed for the temperature module
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -64,18 +64,19 @@ class NcpModel;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
/*!
|
||||
* \brief Define the type tag for the compositional NCP model.
|
||||
*/
|
||||
NEW_TYPE_TAG(NcpModel, INHERITS_FROM(MultiPhaseBaseModel,
|
||||
VtkComposition,
|
||||
VtkEnergy,
|
||||
VtkDiffusion));
|
||||
struct NcpModel { using InheritsFrom = std::tuple<VtkDiffusion,
|
||||
VtkEnergy,
|
||||
VtkComposition,
|
||||
MultiPhaseBaseModel>; };
|
||||
} // namespace TTag
|
||||
|
||||
//! Use the Ncp local jacobian operator for the compositional NCP model
|
||||
SET_TYPE_PROP(NcpModel,
|
||||
LocalResidual,
|
||||
Opm::NcpLocalResidual<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::NcpModel> { using type = Opm::NcpLocalResidual<TypeTag>; };
|
||||
|
||||
//! Use the Ncp specific newton method for the compositional NCP model
|
||||
template<class TypeTag>
|
||||
|
@ -62,9 +62,13 @@ namespace Opm {
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
//! The type tag on which the default properties for the Newton method
|
||||
//! are attached
|
||||
NEW_TYPE_TAG(NewtonMethod);
|
||||
struct NewtonMethod {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
//! Specifies the type of the actual Newton method
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -63,17 +63,18 @@ class PvsModel;
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
//! The type tag for the isothermal single phase problems
|
||||
NEW_TYPE_TAG(PvsModel, INHERITS_FROM(MultiPhaseBaseModel,
|
||||
VtkPhasePresence,
|
||||
VtkComposition,
|
||||
VtkEnergy,
|
||||
VtkDiffusion));
|
||||
struct PvsModel { using InheritsFrom = std::tuple<VtkDiffusion,
|
||||
VtkEnergy,
|
||||
VtkComposition,
|
||||
VtkPhasePresence,
|
||||
MultiPhaseBaseModel>; };
|
||||
} // namespace TTag
|
||||
|
||||
//! Use the PVS local jacobian operator for the PVS model
|
||||
SET_TYPE_PROP(PvsModel,
|
||||
LocalResidual,
|
||||
Opm::PvsLocalResidual<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::PvsModel> { using type = Opm::PvsLocalResidual<TypeTag>; };
|
||||
|
||||
//! Use the PVS specific newton method for the PVS model
|
||||
template<class TypeTag>
|
||||
|
@ -89,9 +89,8 @@ template<class TypeTag>
|
||||
struct GasComponentIndex<TypeTag, TTag::Richards> { static constexpr int value = 1 - getPropValue<TypeTag, Properties::LiquidComponentIndex>(); };
|
||||
|
||||
//! The local residual operator
|
||||
SET_TYPE_PROP(Richards,
|
||||
LocalResidual,
|
||||
Opm::RichardsLocalResidual<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::Richards> { using type = Opm::RichardsLocalResidual<TypeTag>; };
|
||||
|
||||
//! The global model used
|
||||
template<class TypeTag>
|
||||
|
@ -223,9 +223,13 @@ private:
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
// type tag which is supposed to spliced in or inherited from if the
|
||||
// parameter system is to be used
|
||||
NEW_TYPE_TAG(ParameterSystem);
|
||||
struct ParameterSystem {};
|
||||
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct ParameterMetaData { using type = UndefinedProperty; };
|
||||
@ -477,7 +481,7 @@ inline void getFlattenedKeyList_(std::list<std::string>& dest,
|
||||
template <class TypeTag>
|
||||
void printParamList_(std::ostream& os, const std::list<std::string>& keyList, bool printDefaults = false)
|
||||
{
|
||||
typedef typename GET_PROP(TypeTag, ParameterMetaData) ParamsMeta;
|
||||
typedef GetProp<TypeTag, Properties::ParameterMetaData> ParamsMeta;
|
||||
|
||||
const Dune::ParameterTree& tree = ParamsMeta::tree();
|
||||
|
||||
@ -512,7 +516,7 @@ void printUsage(const std::string& helpPreamble,
|
||||
const std::string& errorMsg = "",
|
||||
std::ostream& os = std::cerr)
|
||||
{
|
||||
typedef typename GET_PROP(TypeTag, ParameterMetaData) ParamsMeta;
|
||||
typedef GetProp<TypeTag, Properties::ParameterMetaData> ParamsMeta;
|
||||
|
||||
if (errorMsg != "") {
|
||||
os << errorMsg << "\n"
|
||||
@ -680,7 +684,7 @@ std::string parseCommandLineOptions(int argc,
|
||||
const std::string& helpPreamble = "",
|
||||
const PositionalArgumentCallback& posArgCallback = noPositionalParameters_)
|
||||
{
|
||||
Dune::ParameterTree& paramTree = GET_PROP(TypeTag, ParameterMetaData)::tree();
|
||||
Dune::ParameterTree& paramTree = GetProp<TypeTag, Properties::ParameterMetaData>::tree();
|
||||
|
||||
// handle the "--help" parameter
|
||||
if (!helpPreamble.empty()) {
|
||||
@ -781,7 +785,7 @@ std::string parseCommandLineOptions(int argc,
|
||||
template <class TypeTag>
|
||||
void parseParameterFile(const std::string& fileName, bool overwrite = true)
|
||||
{
|
||||
Dune::ParameterTree& paramTree = GET_PROP(TypeTag, ParameterMetaData)::tree();
|
||||
Dune::ParameterTree& paramTree = GetProp<TypeTag, Properties::ParameterMetaData>::tree();
|
||||
|
||||
std::set<std::string> seenKeys;
|
||||
std::ifstream ifs(fileName);
|
||||
@ -848,7 +852,7 @@ void parseParameterFile(const std::string& fileName, bool overwrite = true)
|
||||
template <class TypeTag>
|
||||
void printValues(std::ostream& os = std::cout)
|
||||
{
|
||||
typedef typename GET_PROP(TypeTag, ParameterMetaData) ParamsMeta;
|
||||
typedef GetProp<TypeTag, Properties::ParameterMetaData> ParamsMeta;
|
||||
|
||||
const Dune::ParameterTree& tree = ParamsMeta::tree();
|
||||
|
||||
@ -916,7 +920,7 @@ void printValues(std::ostream& os = std::cout)
|
||||
template <class TypeTag>
|
||||
bool printUnused(std::ostream& os = std::cout)
|
||||
{
|
||||
typedef typename GET_PROP(TypeTag, ParameterMetaData) ParamsMeta;
|
||||
typedef GetProp<TypeTag, Properties::ParameterMetaData> ParamsMeta;
|
||||
|
||||
const Dune::ParameterTree& tree = ParamsMeta::tree();
|
||||
std::list<std::string> runTimeAllKeyList;
|
||||
@ -948,7 +952,7 @@ bool printUnused(std::ostream& os = std::cout)
|
||||
template <class TypeTag>
|
||||
class Param
|
||||
{
|
||||
typedef typename GET_PROP(TypeTag, ParameterMetaData) ParamsMeta;
|
||||
typedef GetProp<TypeTag, Properties::ParameterMetaData> ParamsMeta;
|
||||
|
||||
public:
|
||||
template <class ParamType, class PropTag>
|
||||
@ -1107,7 +1111,7 @@ void getLists(Container& usedParams, Container& unusedParams)
|
||||
usedParams.clear();
|
||||
unusedParams.clear();
|
||||
|
||||
typedef typename GET_PROP(TypeTag, ParameterMetaData) ParamsMeta;
|
||||
typedef GetProp<TypeTag, Properties::ParameterMetaData> ParamsMeta;
|
||||
if (ParamsMeta::registrationOpen())
|
||||
throw std::runtime_error("Parameter lists can only retieved after _all_ of them have "
|
||||
"been registered.");
|
||||
@ -1146,7 +1150,7 @@ bool isSet(const char *propTagName, const char *paramName, bool errorIfNotRegist
|
||||
template <class TypeTag, class ParamType>
|
||||
void registerParam(const char *paramName, const char *propertyName, const ParamType& defaultValue, const char *usageString)
|
||||
{
|
||||
typedef typename GET_PROP(TypeTag, ParameterMetaData) ParamsMeta;
|
||||
typedef GetProp<TypeTag, Properties::ParameterMetaData> ParamsMeta;
|
||||
if (!ParamsMeta::registrationOpen())
|
||||
throw std::logic_error("Parameter registration was already closed before "
|
||||
"the parameter '"+std::string(paramName)+"' was registered.");
|
||||
@ -1180,7 +1184,7 @@ void registerParam(const char *paramName, const char *propertyName, const ParamT
|
||||
template <class TypeTag, class ParamType>
|
||||
void hideParam(const char *paramName, const ParamType& defaultValue)
|
||||
{
|
||||
typedef typename GET_PROP(TypeTag, ParameterMetaData) ParamsMeta;
|
||||
typedef GetProp<TypeTag, Properties::ParameterMetaData> ParamsMeta;
|
||||
if (!ParamsMeta::registrationOpen())
|
||||
throw std::logic_error("Parameter '"+std::string(paramName)+"' declared as hidden"
|
||||
" when parameter registration was already closed.");
|
||||
@ -1197,7 +1201,7 @@ void hideParam(const char *paramName, const ParamType& defaultValue)
|
||||
template <class TypeTag>
|
||||
void endParamRegistration()
|
||||
{
|
||||
typedef typename GET_PROP(TypeTag, ParameterMetaData) ParamsMeta;
|
||||
typedef GetProp<TypeTag, Properties::ParameterMetaData> ParamsMeta;
|
||||
if (!ParamsMeta::registrationOpen())
|
||||
throw std::logic_error("Parameter registration was already closed. It is only possible "
|
||||
"to close it once.");
|
||||
|
@ -27,7 +27,6 @@
|
||||
#ifndef EWOMS_START_HH
|
||||
#define EWOMS_START_HH
|
||||
|
||||
#include <opm/models/utils/propertysystemmacros.hh>
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
// the following header is not required here, but it must be included before
|
||||
// dune/common/densematrix.hh because of some c++ ideosyncrasies
|
||||
@ -35,8 +34,6 @@
|
||||
|
||||
#include "parametersystem.hh"
|
||||
|
||||
#include <opm/models/utils/parametersystem.hh>
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
#include <opm/models/utils/simulator.hh>
|
||||
#include <opm/models/utils/timer.hh>
|
||||
|
||||
|
@ -28,8 +28,9 @@
|
||||
* In conjunction with a suitable solver backend, preconditioner wrappers work by
|
||||
* specifying the "PreconditionerWrapper" property:
|
||||
* \code
|
||||
* SET_TYPE_PROP(YourTypeTag, PreconditionerWrapper,
|
||||
* Opm::Linear::PreconditionerWrapper$PRECONDITIONER<TypeTag>);
|
||||
* template<class TypeTag>
|
||||
* struct PreconditionerWrapper<TypeTag, TTag::YourTypeTag>
|
||||
* { using type = Opm::Linear::PreconditionerWrapper$PRECONDITIONER<TypeTag>; };
|
||||
* \endcode
|
||||
*
|
||||
* Where the choices possible for '\c $PRECONDITIONER' are:
|
||||
|
@ -28,8 +28,9 @@
|
||||
* In conjunction with a suitable solver backend, solver wrappers work by specifying the
|
||||
* "SolverWrapper" property:
|
||||
* \code
|
||||
* SET_TYPE_PROP(YourTypeTag, LinearSolverWrapper,
|
||||
* Opm::Linear::SolverWrapper$SOLVER<TypeTag>);
|
||||
* template<class TypeTag>
|
||||
* struct LinearSolverWrapper<TypeTag, TTag::YourTypeTag>
|
||||
* { using type = Opm::Linear::SolverWrapper$SOLVER<TypeTag>; };
|
||||
* \endcode
|
||||
*
|
||||
* The possible choices for '\c $SOLVER' are:
|
||||
@ -49,9 +50,7 @@
|
||||
|
||||
#include <dune/istl/solvers.hh>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
namespace Linear {
|
||||
namespace Opm::Linear {
|
||||
|
||||
/*!
|
||||
* \brief Macro to create a wrapper around an ISTL solver
|
||||
@ -61,10 +60,8 @@ namespace Linear {
|
||||
class SolverWrapper##SOLVER_NAME \
|
||||
{ \
|
||||
typedef GetPropType<TypeTag, Properties::Scalar> Scalar; \
|
||||
typedef typename GET_PROP_TYPE(TypeTag, \
|
||||
OverlappingMatrix) OverlappingMatrix; \
|
||||
typedef typename GET_PROP_TYPE(TypeTag, \
|
||||
OverlappingVector) OverlappingVector; \
|
||||
typedef GetPropType<TypeTag, Properties::OverlappingMatrix> OverlappingMatrix; \
|
||||
typedef GetPropType<TypeTag, Properties::OverlappingVector> OverlappingVector; \
|
||||
\
|
||||
public: \
|
||||
typedef ISTL_SOLVER_NAME<OverlappingVector> RawSolver; \
|
||||
@ -163,6 +160,6 @@ private:
|
||||
|
||||
#undef EWOMS_WRAP_ISTL_SOLVER
|
||||
|
||||
}} // namespace Linear, Opm
|
||||
} // namespace Opm::Linear
|
||||
|
||||
#endif
|
||||
|
@ -42,11 +42,10 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace Opm {
|
||||
namespace Linear {
|
||||
namespace Opm::Linear {
|
||||
template <class TypeTag>
|
||||
class ParallelAmgBackend;
|
||||
}}
|
||||
} // namespace Opm::Linear
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
@ -67,8 +66,9 @@ struct LinearSolverMaxError<TypeTag, TTag::ParallelAmgLinearSolver>
|
||||
static constexpr type value = 1e7;
|
||||
};
|
||||
|
||||
SET_TYPE_PROP(ParallelAmgLinearSolver, LinearSolverBackend,
|
||||
Opm::Linear::ParallelAmgBackend<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverBackend<TypeTag, TTag::ParallelAmgLinearSolver>
|
||||
{ using type = Opm::Linear::ParallelAmgBackend<TypeTag>; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -52,7 +52,10 @@
|
||||
#include <iostream>
|
||||
|
||||
namespace Opm::Properties {
|
||||
NEW_TYPE_TAG(ParallelBaseLinearSolver);
|
||||
|
||||
namespace TTag {
|
||||
struct ParallelBaseLinearSolver {};
|
||||
}
|
||||
|
||||
//! Set the type of a global jacobian matrix for linear solvers that are based on
|
||||
//! dune-istl.
|
||||
@ -80,8 +83,9 @@ namespace Linear {
|
||||
* This class provides access to all preconditioners offered by dune-istl using the
|
||||
* PreconditionerWrapper property:
|
||||
* \code
|
||||
* SET_TYPE_PROP(YourTypeTag, PreconditionerWrapper,
|
||||
* Opm::Linear::PreconditionerWrapper$PRECONDITIONER<TypeTag>);
|
||||
* template<class TypeTag>
|
||||
* struct PreconditionerWrapper<TypeTag, TTag::YourTypeTag>
|
||||
* { using type = Opm::Linear::PreconditionerWrapper$PRECONDITIONER<TypeTag>; };
|
||||
* \endcode
|
||||
*
|
||||
* Where the choices possible for '\c $PRECONDITIONER' are:
|
||||
@ -405,9 +409,9 @@ struct PreconditionerOrder<TypeTag, TTag::ParallelBaseLinearSolver> { static con
|
||||
|
||||
//! by default use the same kind of floating point values for the linearization and for
|
||||
//! the linear solve
|
||||
SET_TYPE_PROP(ParallelBaseLinearSolver,
|
||||
LinearSolverScalar,
|
||||
GetPropType<TypeTag, Properties::Scalar>);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverScalar<TypeTag, TTag::ParallelBaseLinearSolver>
|
||||
{ using type = GetPropType<TypeTag, Properties::Scalar>; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct OverlappingMatrix<TypeTag, TTag::ParallelBaseLinearSolver>
|
||||
@ -422,9 +426,9 @@ public:
|
||||
typedef Opm::Linear::OverlappingBCRSMatrix<NonOverlappingMatrix> type;
|
||||
};
|
||||
|
||||
SET_TYPE_PROP(ParallelBaseLinearSolver,
|
||||
Overlap,
|
||||
typename GetPropType<TypeTag, Properties::OverlappingMatrix>::Overlap);
|
||||
template<class TypeTag>
|
||||
struct Overlap<TypeTag, TTag::ParallelBaseLinearSolver>
|
||||
{ using type = typename GetPropType<TypeTag, Properties::OverlappingMatrix>::Overlap; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct OverlappingVector<TypeTag, TTag::ParallelBaseLinearSolver>
|
||||
@ -454,13 +458,13 @@ struct OverlappingLinearOperator<TypeTag, TTag::ParallelBaseLinearSolver>
|
||||
};
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,7)
|
||||
SET_TYPE_PROP(ParallelBaseLinearSolver,
|
||||
PreconditionerWrapper,
|
||||
Opm::Linear::PreconditionerWrapperILU<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct PreconditionerWrapper<TypeTag, TTag::ParallelBaseLinearSolver>
|
||||
{ using type = Opm::Linear::PreconditionerWrapperILU<TypeTag>; };
|
||||
#else
|
||||
SET_TYPE_PROP(ParallelBaseLinearSolver,
|
||||
PreconditionerWrapper,
|
||||
Opm::Linear::PreconditionerWrapperILU0<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct PreconditionerWrapper<TypeTag, TTag::ParallelBaseLinearSolver>
|
||||
{ using type = Opm::Linear::PreconditionerWrapperILU0<TypeTag>; };
|
||||
#endif
|
||||
|
||||
//! set the default overlap size to 2
|
||||
|
@ -35,11 +35,10 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Opm {
|
||||
namespace Linear {
|
||||
namespace Opm::Linear {
|
||||
template <class TypeTag>
|
||||
class ParallelBiCGStabSolverBackend;
|
||||
}} // namespace Linear, Opm
|
||||
} // namespace Opm::Linear
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
@ -48,9 +47,9 @@ namespace TTag {
|
||||
struct ParallelBiCGStabLinearSolver { using InheritsFrom = std::tuple<ParallelBaseLinearSolver>; };
|
||||
} // end namespace TTag
|
||||
|
||||
SET_TYPE_PROP(ParallelBiCGStabLinearSolver,
|
||||
LinearSolverBackend,
|
||||
Opm::Linear::ParallelBiCGStabSolverBackend<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverBackend<TypeTag, TTag::ParallelBiCGStabLinearSolver>
|
||||
{ using type = Opm::Linear::ParallelBiCGStabSolverBackend<TypeTag>; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct LinearSolverMaxError<TypeTag, TTag::ParallelBiCGStabLinearSolver>
|
||||
@ -71,8 +70,9 @@ namespace Linear {
|
||||
* Chosing the preconditioner works by setting the "PreconditionerWrapper" property:
|
||||
*
|
||||
* \code
|
||||
* SET_TYPE_PROP(YourTypeTag, PreconditionerWrapper,
|
||||
* Opm::Linear::PreconditionerWrapper$PRECONDITIONER<TypeTag>);
|
||||
* template<class TypeTag>
|
||||
* struct PreconditionerWrapper<TypeTag, TTag::YourTypeTag>
|
||||
* { using type = Opm::Linear::PreconditionerWrapper$PRECONDITIONER<TypeTag>; };
|
||||
* \endcode
|
||||
*
|
||||
* Where the choices possible for '\c $PRECONDITIONER' are:
|
||||
|
@ -34,17 +34,14 @@
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
|
||||
namespace Opm::Properties {
|
||||
namespace Opm::Properties::TTag {
|
||||
|
||||
// Create new type tags
|
||||
namespace TTag {
|
||||
// Create new type tag
|
||||
struct ParallelIstlLinearSolver { using InheritsFrom = std::tuple<ParallelBaseLinearSolver>; };
|
||||
} // end namespace TTag
|
||||
|
||||
} // namespace Opm::Properties
|
||||
} // namespace Opm::Properties::TTag
|
||||
|
||||
namespace Opm {
|
||||
namespace Linear {
|
||||
namespace Opm::Linear {
|
||||
/*!
|
||||
* \ingroup Linear
|
||||
*
|
||||
@ -52,8 +49,9 @@ namespace Linear {
|
||||
*
|
||||
* To set the linear solver, use
|
||||
* \code
|
||||
* SET_TYPE_PROP(YourTypeTag, LinearSolverWrapper,
|
||||
* Opm::Linear::SolverWrapper$SOLVER<TypeTag>);
|
||||
* template<class TypeTag>
|
||||
* struct LinearSolverWrapper<TypeTag, TTag::YourTypeTag>
|
||||
* { using type = Opm::Linear::SolverWrapper$SOLVER<TypeTag>; };
|
||||
* \endcode
|
||||
*
|
||||
* The possible choices for '\c $SOLVER' are:
|
||||
@ -66,8 +64,9 @@ namespace Linear {
|
||||
*
|
||||
* Chosing the preconditioner works in an analogous way:
|
||||
* \code
|
||||
* SET_TYPE_PROP(YourTypeTag, PreconditionerWrapper,
|
||||
* Opm::Linear::PreconditionerWrapper$PRECONDITIONER<TypeTag>);
|
||||
* template<class TypeTag>
|
||||
* struct PreconditionerWrapper<TypeTag, TTag::YourTypeTag>
|
||||
* { using type = Opm::Linear::PreconditionerWrapper$PRECONDITIONER<TypeTag>; };
|
||||
* \endcode
|
||||
*
|
||||
* Where the choices possible for '\c $PRECONDITIONER' are:
|
||||
@ -141,26 +140,26 @@ protected:
|
||||
LinearSolverWrapper solverWrapper_;
|
||||
};
|
||||
|
||||
}} // namespace Linear, Opm
|
||||
} // namespace Opm::Linear
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
SET_TYPE_PROP(ParallelIstlLinearSolver,
|
||||
LinearSolverBackend,
|
||||
Opm::Linear::ParallelIstlSolverBackend<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverBackend<TypeTag, TTag::ParallelIstlLinearSolver>
|
||||
{ using type = Opm::Linear::ParallelIstlSolverBackend<TypeTag>; };
|
||||
|
||||
SET_TYPE_PROP(ParallelIstlLinearSolver,
|
||||
LinearSolverWrapper,
|
||||
Opm::Linear::SolverWrapperBiCGStab<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverWrapper<TypeTag, TTag::ParallelIstlLinearSolver>
|
||||
{ using type = Opm::Linear::SolverWrapperBiCGStab<TypeTag>; };
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,7)
|
||||
SET_TYPE_PROP(ParallelIstlLinearSolver,
|
||||
PreconditionerWrapper,
|
||||
Opm::Linear::PreconditionerWrapperILU<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct PreconditionerWrapper<TypeTag, TTag::ParallelIstlLinearSolver>
|
||||
{ using type = Opm::Linear::PreconditionerWrapperILU<TypeTag>; };
|
||||
#else
|
||||
SET_TYPE_PROP(ParallelIstlLinearSolver,
|
||||
PreconditionerWrapper,
|
||||
Opm::Linear::PreconditionerWrapperILU0<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct PreconditionerWrapper<TypeTag, TTag::ParallelIstlLinearSolver>
|
||||
{ using type = Opm::Linear::PreconditionerWrapperILU0<TypeTag>; };
|
||||
#endif
|
||||
|
||||
//! set the GMRes restart parameter to 10 by default
|
||||
|
@ -39,11 +39,9 @@
|
||||
#include <dune/common/fmatrix.hh>
|
||||
#include <dune/common/version.hh>
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
NEW_TYPE_TAG(SuperLULinearSolver);
|
||||
|
||||
} // namespace Opm::Properties
|
||||
namespace Opm::Properties::TTag {
|
||||
struct SuperLULinearSolver {};
|
||||
} // namespace Opm::Properties::TTag
|
||||
|
||||
namespace Opm {
|
||||
namespace Linear {
|
||||
@ -176,8 +174,8 @@ namespace Opm::Properties {
|
||||
|
||||
template<class TypeTag>
|
||||
struct LinearSolverVerbosity<TypeTag, TTag::SuperLULinearSolver> { static constexpr int value = 0; };
|
||||
SET_TYPE_PROP(SuperLULinearSolver, LinearSolverBackend,
|
||||
Opm::Linear::SuperLUBackend<TypeTag>);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverBackend<TypeTag, TTag::SuperLULinearSolver> { using type = Opm::Linear::SuperLUBackend<TypeTag>; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
#include <opm/models/utils/propertysystemmacros.hh>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user