Commit 57c342b2 authored by sfritschi's avatar sfritschi
Browse files

Fixed minor bug

parent 7bee3cf2
......@@ -874,13 +874,13 @@ def __add_buffer_layers(pores: List[Pore], targetsize: List[float],
pores_layer = [pore for pore in pores \
if targetsize[k]-Lbuffer <= pore.pos[k] < targetsize[k]]
for pore in pores_layer:
lbl = pore.label.split(); lbl[k + 1] = '-1'
originIndex = int(lbl[0])
pcopy = Pore(pore.pos, pore.r, throats=pore.throats, \
id=pore.id, useIndex=useIndex, index=runningIndex)
id=pore.id, useIndex=useIndex, \
index=runningIndex, originIndex=originIndex)
pcopy.pos[k] = pcopy.pos[k]-targetsize[k]
lbl = pore.label.split(); lbl[k + 1] = '-1'
pcopy.label = ' '.join(lbl) # periodicity label
originIndex = int(lbl[0])
pcopy.originIndex = originIndex
pores.append(pcopy)
copies[pores[originIndex]].add(pcopy)
runningIndex += 1
......@@ -888,13 +888,13 @@ def __add_buffer_layers(pores: List[Pore], targetsize: List[float],
pores_layer = [pore for pore in pores \
if 0 <= pore.pos[k] < Lbuffer]
for pore in pores_layer:
lbl = pore.label.split(); lbl[k + 1] = '1'
originIndex = int(lbl[0])
pcopy = Pore(pore.pos, pore.r, throats=pore.throats, \
id=pore.id, useIndex=useIndex, index=runningIndex)
id=pore.id, useIndex=useIndex, \
index=runningIndex, originIndex=originIndex)
pcopy.pos[k] = pcopy.pos[k]+targetsize[k]
lbl = pore.label.split(); lbl[k + 1] = '1'
pcopy.label = ' '.join(lbl) # periodicity label
originIndex = int(lbl[0])
pcopy.originIndex = originIndex
pores.append(pcopy)
copies[pores[originIndex]].add(pcopy)
runningIndex += 1
......
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