Commit 3f1e173c authored by sfritschi's avatar sfritschi
Browse files

Fixed missing throat radius

parent 0b425b1a
......@@ -113,7 +113,7 @@ class Network:
lt = distance(*throat_ends(throat, self.L))
self.throats.add(throat) # TODO: Not necessary? Can potentially save memory
Network.throatIdx += 1
......@@ -1182,12 +1182,12 @@ def load_network_from(filename: str, isGenerator: bool = False) -> Network:
# throats
tid = np.array(f['throats/id'])
throats = {} # id:throat dictionary
for id, pore1, pore2 in zip(tid,
for id, pore1, pore2, r in zip(tid,
[pores[id] for id in np.array(f['throats/pore1'])],
[pores[id] for id in np.array(f['throats/pore2'])]):
throats[id] = connector_method(pore1, pore2, 0.0, id)
# radius
for id, r in zip(tid, np.array(f['throats/r'])): throats[id].r = r
[pores[id] for id in np.array(f['throats/pore2'])],
throats[id] = connector_method(pore1, pore2, r, id)
# labels
if 'label' in f['throats']: # are there any labels != ''?
for id, strg in zip(f['throats/label/id'],f['throats/label/strg']):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment