Skip to content

Commit

Permalink
boundary: Cache substitutions to avoid recomputation
Browse files Browse the repository at this point in the history
  • Loading branch information
EdCaunt committed Apr 22, 2024
1 parent 6be9d33 commit d5c1f75
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions schism/finite_differences/boundary.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Immersed boundary object forming the core API"""

import devito as dv
from devito.tools.memoization import memoized_meth

from schism.geometry.skin import ModifiedSkin
from schism.basic.basis import Basis
Expand Down Expand Up @@ -42,6 +43,7 @@ def __init__(self, conditions, geometry, **kwargs):
self._conditions = conditions
self._geometry = geometry

@memoized_meth
def substitutions(self, derivs):
"""
Get the substitution for the specified derivative. This will return
Expand Down

0 comments on commit d5c1f75

Please sign in to comment.