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

Allow exec to be properly executed (seems to depend on the interpreter impl)

parent 8f24d927
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,15 @@ from os.path import splitext, basename
loopy.CACHING_ENABLED = False
def type_guessing(val):
for t in [int, float]:
try:
return t(val)
except TypeError:
pass
return val
def read_ufl(uflfile):
"""Read uflfile file, extract and preprocess forms
......@@ -49,14 +58,6 @@ def read_ufl(uflfile):
from dune.common.parametertree.parser import parse_ini_file
ini = parse_ini_file(ini)
def type_guessing(val):
for t in [int, float]:
try:
return t(val)
except TypeError:
pass
return val
for k, v in ini.get("formcompiler.ufl_variants", {}).items():
namespace[k] = type_guessing(v)
......
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