Skip to content
Snippets Groups Projects
Commit 7b95458e authored by Dominic Kempf's avatar Dominic Kempf
Browse files

[bugfix] Write UFL variants to the debug script dumped by ufl

parent 624dcf0b
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,10 @@ def read_ufl(uflfile):
name = "{}_debug".format(name)
pyname = "{}.py".format(name)
print(pyname)
pycode = "#!/usr/bin/env python\nfrom dune.perftool.ufl.execution import *\nset_level(DEBUG)\n" + uflcode
pycode = "#!/usr/bin/env python\nfrom dune.perftool.ufl.execution import *\nset_level(DEBUG)\n"
for k, v in ini.get("formcompiler.ufl_variants", {}).items():
pycode = pycode + "{} = {}\n".format(k, repr(type_guessing(v)))
pycode = pycode + uflcode
with file(pyname, "w") as f:
f.write(pycode)
raise SyntaxError("Not a valid ufl file, dumped a debug script: {}".format(pyname))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment