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

Add caching to the jacobian definition method

This onleiner makes my richards example faster by 70%.
parent abc98906
No related branches found
No related tags found
No related merge requests found
...@@ -525,6 +525,7 @@ def name_meshwidth(): ...@@ -525,6 +525,7 @@ def name_meshwidth():
return name return name
@kernel_cached
def _name_jacobian(i, j, restriction, visitor): def _name_jacobian(i, j, restriction, visitor):
"""Return the (i, j) component of the jacobian of the geometry mapping """Return the (i, j) component of the jacobian of the geometry mapping
...@@ -534,8 +535,6 @@ def _name_jacobian(i, j, restriction, visitor): ...@@ -534,8 +535,6 @@ def _name_jacobian(i, j, restriction, visitor):
Note: At the moment this only works for the mappings from reference cells Note: At the moment this only works for the mappings from reference cells
to the cell and not for the geometry mappings of intersections. to the cell and not for the geometry mappings of intersections.
""" """
do_predicates = visitor.do_predicates
# Create matrix sequence with derivative in j direction # Create matrix sequence with derivative in j direction
matrix_sequence = construct_basis_matrix_sequence(derivative=j, matrix_sequence = construct_basis_matrix_sequence(derivative=j,
facedir=get_facedir(restriction), facedir=get_facedir(restriction),
......
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