-
Martin Bauer authored
- square channel benchmark for evaluating spurious currents in Poseuille flow - force model support in cumulant methods - option to set initial velocity field for simple serial scenarios - bugfix in simple force model
Martin Bauer authored- square channel benchmark for evaluating spurious currents in Poseuille flow - force model support in cumulant methods - option to set initial velocity field for simple serial scenarios - bugfix in simple force model
cache.py 667 B
try:
from functools import lru_cache as memorycache
except ImportError:
from backports.functools_lru_cache import lru_cache as memorycache
try:
from joblib import Memory
diskcache = Memory(cachedir="/tmp/lbmpy", verbose=False).cache
except ImportError:
# fallback to in-memory caching if joblib is not available
diskcache = memorycache(maxsize=64)
# joblibs Memory decorator does not play nicely with sphinx autodoc (decorated functions do not occur in autodoc)
# -> if this script is imported by sphinx we use functools instead
import sys
calledBySphinx = 'sphinx' in sys.modules
if calledBySphinx:
diskcache = memorycache(maxsize=64)