Skip to content

Commit

Permalink
Added separation of faces and objects in assign_voltage method
Browse files Browse the repository at this point in the history
  • Loading branch information
AlfVII committed Aug 7, 2024
1 parent abff52f commit 3d6d09b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyaedt/maxwell.py
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,12 @@ def assign_voltage(self, assignment, amplitude=1, name=None):
else:
props = OrderedDict({"Faces": assignment, "Value": amplitude})
else:
props = OrderedDict({"Faces": assignment, "Voltage": amplitude})
props = OrderedDict({"Faces": [], "Objects": [], "Voltage": amplitude})
for element in assignment:
if isinstance(element, str) and element in self.modeler.object_names:
props["Objects"].append(element)
else:
props["Faces"].append(element)
bound = BoundaryObject(self, name, props, "Voltage")
if bound.create():
self._boundaries[bound.name] = bound
Expand Down

0 comments on commit 3d6d09b

Please sign in to comment.