devito icon indicating copy to clipboard operation
devito copied to clipboard

Retaining legacy API when reversing reference between Grid and SubDomain prevents solve cache from clearing

Open EdCaunt opened this issue 5 months ago • 0 comments

To implement Functions on SubDomains, the reference between Grid and SubDomain must be reversed such that SubDomains have a parent Grid. However, to avoid breaking existing codes, the legacy API wherein SubDomains are passed to Grid on instantiation must be retained. This creates a circular reference between Grid and SubDomain, preventing the cache from clearing. When the legacy API is removed, tests/test_caching.py::TestMemoryLeaks::test_solve should be updated to reflect this.

EdCaunt avatar Jan 23 '24 15:01 EdCaunt