diff --git a/python/dumux/common/properties.py b/python/dumux/common/properties.py index aac62c724ffeee9f19c7286180080e20e68f2373..ea3af05c740fc09269911483b2b5a01818187666 100644 --- a/python/dumux/common/properties.py +++ b/python/dumux/common/properties.py @@ -4,6 +4,7 @@ Property, TypeTag and Model """ import os +import re from dataclasses import dataclass from typing import List, Union from dune.common.hashit import hashIt @@ -189,8 +190,11 @@ def predefinedProperties(): propertiesHeader = propertiesHeaderPath() with open(propertiesHeader, encoding="utf-8") as header: properties = [] + pattern = re.compile(r"DUMUX_DEFINE_PROPERTY\((.*?)\)") for line in header: - if line.startswith("struct"): + if line.startswith("DUMUX_DEFINE_PROPERTY("): + properties.append(pattern.search(line).group(1)) + elif line.startswith("struct"): properties.append(line.split(" ")[1]) return properties