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

Filter magic names from the ufl file

parent d6a4e433
No related branches found
No related tags found
No related merge requests found
...@@ -87,10 +87,19 @@ def read_ufl(uflfile): ...@@ -87,10 +87,19 @@ def read_ufl(uflfile):
# Extract and preprocess the forms # Extract and preprocess the forms
data = interpret_ufl_namespace(namespace) data = interpret_ufl_namespace(namespace)
# Enrich data by some additional objects we deem worth keeping # Enrich data by some additional objects to whose name we attached some
# special meaning.
if get_option("exact_solution_expression"): if get_option("exact_solution_expression"):
data.object_by_name[get_option("exact_solution_expression")] = namespace[get_option("exact_solution_expression")] data.object_by_name[get_option("exact_solution_expression")] = namespace[get_option("exact_solution_expression")]
magic_names = ("dirichlet_expression",
"is_dirichlet",
"initial_condition",
"exact_solution",
)
for name in magic_names:
data.object_by_name[name] = namespace.get(name, None)
formdatas = [] formdatas = []
forms = data.forms forms = data.forms
for index, form in enumerate(forms): for index, form in enumerate(forms):
......
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