Skip to content

Commit

Permalink
geant4 : Transfer of material properties does not appear to work. Qui…
Browse files Browse the repository at this point in the history
…ck fix, but might not be general
  • Loading branch information
stewartboogert committed Feb 16, 2024
1 parent cf30d6b commit b4111e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pyg4ometry/geant4/Registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def transferMaterial(self, material, incrementRenameDict={}, userRenameDict=None
# transfer material properties
if hasattr(material, "properties"):
for key, value in material.properties.items():
self.transferDefines(value, incrementRenameDict, userRenameDict)
self.transferDefine(value, incrementRenameDict, userRenameDict)

self.materialDict[material.name] = material
material.registry = self
Expand Down Expand Up @@ -458,6 +458,7 @@ def transferDefines(self, var, otherRegistry, incrementRenameDict={}, userRename
) # probably best to reuse here

elif isinstance(var, _Defines.Matrix):
print(otherRegistry)
for v in var.values:
if v.name in otherRegistry.defineDict:
self.transferDefine(v, incrementRenameDict, userRenameDict)
Expand Down

0 comments on commit b4111e7

Please sign in to comment.