Skip to content

Commit

Permalink
fix regression error
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalinve committed Nov 23, 2023
1 parent 9d6e466 commit 0baae87
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion _unittest/test_03_Materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def test_08B_import_materials_from_excel(self):
assert len(mats) == 2

def test_09_non_linear_materials(self, add_app):
app = add_app(application=Maxwell3d)
app = add_app(application=Maxwell3d, solution_type="Transient")
mat1 = app.materials.add_material("myMat")
mat1.permeability = [[0, 0], [1, 12], [10, 30]]
mat1.permittivity = [[0, 0], [2, 12], [10, 30]]
Expand Down
10 changes: 0 additions & 10 deletions pyaedt/generic/DataHandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ def _dict2arg(d, arg_out):
arg = ["NAME:" + k]
_dict2arg(el, arg)
arg_out.append(arg)
elif isinstance(v, list) and len(v) > 0 and all(isinstance(n, int) for n in v):
arg = ["NAME:" + k]
for el in v:
arg.append(el)
arg_out.append(arg)
elif isinstance(v, list) and len(v) > 0 and all(isinstance(n, float) for n in v):
arg = ["NAME:" + k]
for el in v:
arg.append(el)
arg_out.append(arg)

else:
arg_out.append(k + ":=")
Expand Down
5 changes: 4 additions & 1 deletion pyaedt/modules/Material.py
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ def _get_args(self, props=None):
Parameters
----------
prop : str, optional
props : str, optional
Name of the property. The default is ``None``.
"""
if not props:
Expand Down Expand Up @@ -2096,6 +2096,9 @@ def get_core_loss_coefficients(

props = self._get_args(props)
props.pop(0)
props[0][-1][2] = "NAME:Points"
points = props[0][-1].pop(2)
props[0][-1][2].insert(0, points)
coefficients = self.odefinition_manager.ComputeCoreLossCoefficients(
core_loss_model_type, self.mass_density.evaluated_value, props[0]
)
Expand Down

0 comments on commit 0baae87

Please sign in to comment.