pamhyr: Add just-in-time database geometry loading.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-10-10 15:17:53 +02:00
1 parent a603c3a63f
commit ab9ebc6400
9 files changed
+140 -77

No files matched your search

+20
View File
@@ -68,6 +68,26 @@ class FrictionList(PamhyrModelList):
return ok
def _get_frictions_list(self):
# Frictions list generator is type (int, Point) with the first
# element the index of the Point in list
return list(
map(
lambda p: p[1],
sorted(
self._lst,
key = lambda p: p[0]
)
)
)
@property
def lst(self):
if not isinstance(self._lst, list):
self._lst = self._get_frictions_list()
return self._lst
@property
def frictions(self):
return self.lst