more logical layout
This commit is contained in:
parent
855bf124d3
commit
4ff99a7af4
|
@ -787,14 +787,13 @@ class Geom:
|
||||||
New material indices.
|
New material indices.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
mapper = dict(zip(from_material,to_material))
|
def mp(entry,mapper):
|
||||||
|
|
||||||
def mp(entry):
|
|
||||||
return mapper[entry] if entry in mapper else entry
|
return mapper[entry] if entry in mapper else entry
|
||||||
|
|
||||||
mp = np.vectorize(mp)
|
mp = np.vectorize(mp)
|
||||||
|
mapper = dict(zip(from_material,to_material))
|
||||||
|
|
||||||
return Geom(material = mp(self.material).reshape(self.grid),
|
return Geom(material = mp(self.material,mapper).reshape(self.grid),
|
||||||
size = self.size,
|
size = self.size,
|
||||||
origin = self.origin,
|
origin = self.origin,
|
||||||
comments = self.comments+[util.execution_stamp('Geom','substitute')],
|
comments = self.comments+[util.execution_stamp('Geom','substitute')],
|
||||||
|
|
Loading…
Reference in New Issue