To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

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))
Network.throatL.append(lt)
Network.throatR.append(r)
self.throats.add(throat)
self.throats.add(throat) # TODO: Not necessary? Can potentially save memory
pore1.throats.add(Network.throatIdx)
pore2.throats.add(Network.throatIdx)
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'])],
np.array(f['throats/r'])):
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']):
......
Markdown is supported
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