Properties generator
Looking some of the extracted properties, they mostly look very similar but it's a lot of tedious Boilerplate code to write.
One common mistake I often do it that I copy a property definition from another file but forget to adjust the typetag I specialize for.
We could use try a code generation approach instead. Maybe properties could be written in YAML for example and then the property header can be generated from that with Python. Something like
name: properties.hh
tags:
- TestIncompressibleOneP:
- inherits_from: [BoxModel, CCTpfa]
includes:
- dune/grid/yaspgrid.hh
TestIncompressibleOneP:
properties:
- Grid: 'Dune::YaspGrid<3>'
Not sure if it gets too complicated. We could give it a try. I don't know if property traits can be cleanly implemented as a yml structure.
Using other properties could be something like
...
TracerTest:
properties:
- SpatialParams: 'TracerTestSpatialParams<{GridGeometry}, {Scalar}>'
which expands to
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::TracerTest>
{
private:
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = TracerTestSpatialParams<GridGeometry, Scalar>;
};