mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 09:16:27 -06:00
[properties] replace SET_STRING_PROP calls
It's not possible to have `constexpr std::string`s in C++17. Taking `std::string_view` gives conversion errors. Since this is all temporary and will be replaced by pure runtime parameters anyway, use string literals for the moment.
This commit is contained in:
parent
3ba67ebaa8
commit
b809e9a4f7
@ -208,7 +208,8 @@ struct Temperature<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 293.15;
|
||||
};
|
||||
SET_STRING_PROP(Co2InjectionBaseProblem, SimulationName, "co2injection");
|
||||
template<class TypeTag>
|
||||
struct SimulationName<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr auto value = "co2injection"; };
|
||||
|
||||
// The default for the end time of the simulation
|
||||
template<class TypeTag>
|
||||
@ -227,7 +228,8 @@ struct InitialTimeStepSize<TypeTag, TTag::Co2InjectionBaseProblem>
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(Co2InjectionBaseProblem, GridFile, "data/co2injection.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr auto value = "data/co2injection.dgf"; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -139,7 +139,8 @@ struct InitialTimeStepSize<TypeTag, TTag::CuvetteBaseProblem>
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(CuvetteBaseProblem, GridFile, "./data/cuvette_11x4.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::CuvetteBaseProblem> { static constexpr auto value = "./data/cuvette_11x4.dgf"; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -162,7 +162,8 @@ template<class TypeTag>
|
||||
struct EnableConstraints<TypeTag, TTag::FractureProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Set the default value for the file name of the grid
|
||||
SET_STRING_PROP(FractureProblem, GridFile, "data/fracture.art.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::FractureProblem> { static constexpr auto value = "data/fracture.art.dgf"; };
|
||||
|
||||
// Set the default value for the end time
|
||||
template<class TypeTag>
|
||||
|
@ -162,7 +162,8 @@ struct InitialTimeStepSize<TypeTag, TTag::GroundWaterBaseProblem>
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(GroundWaterBaseProblem, GridFile, "./data/groundwater_2d.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::GroundWaterBaseProblem> { static constexpr auto value = "./data/groundwater_2d.dgf"; };
|
||||
|
||||
// Use the conjugated gradient linear solver with the default preconditioner (i.e.,
|
||||
// ILU-0) from dune-istl
|
||||
|
@ -130,7 +130,8 @@ struct InitialTimeStepSize<TypeTag, TTag::ObstacleBaseProblem>
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(ObstacleBaseProblem, GridFile, "./data/obstacle_24x16.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::ObstacleBaseProblem> { static constexpr auto value = "./data/obstacle_24x16.dgf"; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -94,7 +94,8 @@ struct InitialTimeStepSize<TypeTag, TTag::OutflowBaseProblem>
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(OutflowBaseProblem, GridFile, "./data/outflow.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::OutflowBaseProblem> { static constexpr auto value = "./data/outflow.dgf"; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -169,7 +169,8 @@ public:
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(ReservoirBaseProblem, GridFile, "data/reservoir.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::ReservoirBaseProblem> { static constexpr auto value = "data/reservoir.dgf"; };
|
||||
|
||||
// increase the tolerance for this problem to get larger time steps
|
||||
template<class TypeTag>
|
||||
|
@ -138,7 +138,8 @@ struct InitialTimeStepSize<TypeTag, TTag::RichardsLensProblem>
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(RichardsLensProblem, GridFile, "./data/richardslens_24x16.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::RichardsLensProblem> { static constexpr auto value = "./data/richardslens_24x16.dgf"; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -142,7 +142,8 @@ struct InitialTimeStepSize<TypeTag, TTag::WaterAirBaseProblem>
|
||||
};
|
||||
|
||||
// The default DGF file to load
|
||||
SET_STRING_PROP(WaterAirBaseProblem, GridFile, "./data/waterair.dgf");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::WaterAirBaseProblem> { static constexpr auto value = "./data/waterair.dgf"; };
|
||||
|
||||
// Use the restarted GMRES linear solver with the ILU-2 preconditioner from dune-istl
|
||||
template<class TypeTag>
|
||||
|
@ -240,7 +240,8 @@ template<class TypeTag>
|
||||
struct EnableGridAdaptation<TypeTag, TTag::FvBaseDiscretization> { static constexpr bool value = false; };
|
||||
|
||||
//! By default, write the simulation output to the current working directory
|
||||
SET_STRING_PROP(FvBaseDiscretization, OutputDir, ".");
|
||||
template<class TypeTag>
|
||||
struct OutputDir<TypeTag, TTag::FvBaseDiscretization> { static constexpr auto value = "."; };
|
||||
|
||||
//! Enable the VTK output by default
|
||||
template<class TypeTag>
|
||||
|
@ -203,10 +203,12 @@ struct ParameterTree<TypeTag, TTag::NumericModel>
|
||||
};
|
||||
|
||||
//! use the global group as default for the model's parameter group
|
||||
SET_STRING_PROP(NumericModel, ModelParameterGroup, "");
|
||||
template<class TypeTag>
|
||||
struct ModelParameterGroup<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
|
||||
|
||||
//! Set a value for the GridFile property
|
||||
SET_STRING_PROP(NumericModel, GridFile, "");
|
||||
template<class TypeTag>
|
||||
struct GridFile<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
template<class TypeTag>
|
||||
@ -228,7 +230,8 @@ struct GridView<TypeTag, TTag::NumericModel> { using type = typename GetPropType
|
||||
#endif
|
||||
|
||||
//! Set a value for the ParameterFile property
|
||||
SET_STRING_PROP(NumericModel, ParameterFile, "");
|
||||
template<class TypeTag>
|
||||
struct ParameterFile<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
|
||||
|
||||
//! Set the number of refinement levels of the grid to 0. This does not belong
|
||||
//! here, strictly speaking.
|
||||
@ -268,7 +271,8 @@ struct RestartTime<TypeTag, TTag::NumericModel>
|
||||
};
|
||||
|
||||
//! By default, do not force any time steps
|
||||
SET_STRING_PROP(NumericModel, PredeterminedTimeStepsFile, "");
|
||||
template<class TypeTag>
|
||||
struct PredeterminedTimeStepsFile<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
|
||||
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
Loading…
Reference in New Issue
Block a user