Skip to content

Commit

Permalink
Merge pull request #30 from devitocodes/cache_subs
Browse files Browse the repository at this point in the history
boundary: Cache substitutions to avoid recomputation
  • Loading branch information
EdCaunt authored Apr 22, 2024
2 parents 6be9d33 + d5c1f75 commit 5a8ff41
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 5a8ff41

Please sign in to comment.