Commit 9cdc4da1 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[propertysystem] remove property macros from three files

parent 1a257dce
......@@ -38,21 +38,24 @@ struct GridProperties {};
}
//! Use the leaf grid view if not defined otherwise
SET_TYPE_PROP(GridProperties, GridView, typename GET_PROP_TYPE(TypeTag, Grid)::LeafGridView);
template<class TypeTag>
struct GridView<TypeTag, TTag::GridProperties> { using type = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView; };
//! Use the minimal point source implementation as default
SET_PROP(GridProperties, PointSource)
template<class TypeTag>
struct PointSource<TypeTag, TTag::GridProperties>
{
private:
using SourceValues = typename GET_PROP_TYPE(TypeTag, NumEqVector);
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using SourceValues = GetPropType<TypeTag, Properties::NumEqVector>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GlobalPosition = typename Dune::FieldVector<typename GridView::ctype, GridView::dimensionworld>;
public:
using type = Dumux::PointSource<GlobalPosition, SourceValues>;
};
//! Use the point source helper using the bounding box tree as a default
SET_TYPE_PROP(GridProperties, PointSourceHelper, BoundingBoxTreePointSourceHelper);
template<class TypeTag>
struct PointSourceHelper<TypeTag, TTag::GridProperties> { using type = BoundingBoxTreePointSourceHelper; };
} // namespace Properties
} // namespace Dumux
......
......@@ -43,30 +43,37 @@ struct ModelProperties {};
}
//! Set the default type of scalar values to double
SET_TYPE_PROP(ModelProperties, Scalar, double);
template<class TypeTag>
struct Scalar<TypeTag, TTag::ModelProperties> { using type = double; };
//! Set the default vector with size number of equations to a field vector
SET_TYPE_PROP(ModelProperties, NumEqVector, Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar), GET_PROP_TYPE(TypeTag, ModelTraits)::numEq()>);
template<class TypeTag>
struct NumEqVector<TypeTag, TTag::ModelProperties> { using type = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>, GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; };
//! Set the default primary variable vector to a vector of size of number of equations
SET_TYPE_PROP(ModelProperties, PrimaryVariables, typename GET_PROP_TYPE(TypeTag, NumEqVector));
template<class TypeTag>
struct PrimaryVariables<TypeTag, TTag::ModelProperties> { using type = GetPropType<TypeTag, Properties::NumEqVector>; };
//! do not specific any model-specific default parameters here
SET_PROP(ModelProperties, ModelDefaultParameters)
template<class TypeTag>
struct ModelDefaultParameters<TypeTag, TTag::ModelProperties>
{
static void defaultParams(Dune::ParameterTree& tree, const std::string& group = "") { }
};
//! \todo this property is deprecated use IOFields instead!
SET_PROP(ModelProperties, VtkOutputFields) {
using type DUNE_DEPRECATED_MSG("This property is deprecated use property IOFields instead") = typename GET_PROP_TYPE(TypeTag, IOFields);
template<class TypeTag>
struct VtkOutputFields<TypeTag, TTag::ModelProperties> {
using type DUNE_DEPRECATED_MSG("This property is deprecated use property IOFields instead") = GetPropType<TypeTag, Properties::IOFields>;
};
//! Set the default to an implementation throwing a NotImplemented error
SET_TYPE_PROP(ModelProperties, IOFields, DefaultIOFields);
template<class TypeTag>
struct IOFields<TypeTag, TTag::ModelProperties> { using type = DefaultIOFields; };
//! Set the default class for the balance equation options
SET_TYPE_PROP(ModelProperties, BalanceEqOpts, BalanceEquationOptions<TypeTag>);
template<class TypeTag>
struct BalanceEqOpts<TypeTag, TTag::ModelProperties> { using type = BalanceEquationOptions<TypeTag>; };
} // namespace Properties
} // namespace Dumux
......
......@@ -73,7 +73,7 @@ int start_(int argc,
// parse the command line arguments and input file
////////////////////////////////////////////////////////////
auto defaultParams = [] (Dune::ParameterTree& p) {GET_PROP(TypeTag, ModelDefaultParameters)::defaultParams(p);};
auto defaultParams = [] (Dune::ParameterTree& p) {GetProp<TypeTag, Properties::ModelDefaultParameters>::defaultParams(p);};
Parameters::init(argc, argv, defaultParams, usage);
//////////////////////////////////////////////////////////////////////
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment