Skip to content
Snippets Groups Projects
Commit a2582a17 authored by Martin Bauer's avatar Martin Bauer
Browse files

pystencils: old style FD are using fast_subs instead of subs

parent 1bd1c6d6
Branches
Tags
No related merge requests found
...@@ -322,7 +322,7 @@ def discretize_center(term, symbols_to_field_dict, dx, dim=3): ...@@ -322,7 +322,7 @@ def discretize_center(term, symbols_to_field_dict, dx, dim=3):
for d in range(dim): for d in range(dim):
up, down = __up_down_offsets(d, dim) up, down = __up_down_offsets(d, dim)
substitutions.update({g[d][i]: (field[up](i) - field[down](i)) / dx / 2 for i in range(len(symbols))}) substitutions.update({g[d][i]: (field[up](i) - field[down](i)) / dx / 2 for i in range(len(symbols))})
return term.subs(substitutions) return fast_subs(term, substitutions)
def discretize_staggered(term, symbols_to_field_dict, coordinate, coordinate_offset, dx, dim=3): def discretize_staggered(term, symbols_to_field_dict, coordinate, coordinate_offset, dx, dim=3):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment