gmarkall / manycore_form_compiler

MCFC is deprecated. See https://code.launchpad.net/~grm08/ffc/pyop2
https://code.launchpad.net/~grm08/ffc/pyop2
GNU General Public License v3.0
3 stars 1 forks source link

Populate namespace for UFL execution in input parser #26

Closed kynan closed 13 years ago

kynan commented 13 years ago

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.