According to the suggested pipeline, the input parser stage is responsible for parsing the UFL code from the input file and populate the namespace. The output of that stage is a dictionary with equation labels (built from material phase and field name) as keys and tuples of (ufl code, namespace) as values.
The namespace is currently created in canonicaliser, which needs to be moved to inputparser.
inputparser contains an abstract base class InputParser which specifies the parse method. Input parsers for different formats are derived from that (currently flufl and flml). The flufl parser handles a single UFL input file and return a dictionary with a single unnamed equation. The flml parser extracts all UFL equations from an flml file and populates the dictionary with keys as stated above.
According to the suggested pipeline, the input parser stage is responsible for parsing the UFL code from the input file and populate the namespace. The output of that stage is a dictionary with equation labels (built from material phase and field name) as keys and tuples of (ufl code, namespace) as values.
The namespace is currently created in
canonicaliser
, which needs to be moved toinputparser
.inputparser
contains an abstract base classInputParser
which specifies theparse
method. Input parsers for different formats are derived from that (currently flufl and flml). The flufl parser handles a single UFL input file and return a dictionary with a single unnamed equation. The flml parser extracts all UFL equations from an flml file and populates the dictionary with keys as stated above.