Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Tansformer loss distribution extension #5818

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d9e8597
first extension implementation
gmalinve Feb 20, 2025
c489575
first extension implementation
gmalinve Feb 20, 2025
72f82d6
first extension implementation
gmalinve Feb 20, 2025
2aba683
improve listbox chioces
gmalinve Feb 22, 2025
e669aa9
first extension implementation
gmalinve Feb 23, 2025
a891815
Merge branch 'refs/heads/main' into feat/transformer_loss_distribution
gmalinve Feb 23, 2025
ccac8e0
improve extension UI
gmalinve Feb 24, 2025
2db06f0
add workflow
gmalinve Feb 24, 2025
5e6c21c
improve workflow
gmalinve Feb 24, 2025
08150fd
improve workflow
gmalinve Feb 25, 2025
060bc91
Merge branch 'refs/heads/main' into feat/transformer_loss_distribution
gmalinve Feb 25, 2025
29dc576
Merge branch 'refs/heads/main' into feat/transformer_loss_distribution
gmalinve Feb 25, 2025
59eddbd
improve workflow
gmalinve Feb 26, 2025
f088cde
Merge branch 'refs/heads/main' into feat/transformer_loss_distribution
gmalinve Feb 27, 2025
32b6be1
improve workflow
gmalinve Feb 27, 2025
8c90a6c
export options
gmalinve Feb 27, 2025
2450d84
new UI
gmalinve Feb 28, 2025
ec3f26c
Merge branch 'refs/heads/main' into feat/transformer_loss_distribution
gmalinve Feb 28, 2025
416438b
update .toml
gmalinve Feb 28, 2025
326ecdc
fix style
gmalinve Mar 4, 2025
948698c
Merge branch 'refs/heads/main' into feat/transformer_loss_distribution
gmalinve Mar 4, 2025
12f19aa
Merge branch 'refs/heads/main' into feat/transformer_loss_distribution
gmalinve Mar 6, 2025
ec08e87
improve UI and workflow + fix template
gmalinve Mar 6, 2025
b0e29de
fixes
gmalinve Mar 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/modules/solve_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
else:
intrinsics[i] = "All"
elif i == "Phase":
intrinsics[i] = "All"
intrinsics[i] = "0deg"

Check warning on line 192 in src/ansys/aedt/core/modules/solve_setup.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/modules/solve_setup.py#L192

Added line #L192 was not covered by tests
elif i == "Time":
intrinsics[i] = "All"
return intrinsics
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/aedt/core/visualization/plot/pyvista.py
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,7 @@
conv = 1
vertices = np.array(nodes) * conv
filedata = pv.PolyData(vertices)
field._cached_polydata = filedata

Check warning on line 1096 in src/ansys/aedt/core/visualization/plot/pyvista.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/visualization/plot/pyvista.py#L1096

Added line #L1096 was not covered by tests
if is_vector:
vector_scale = (max(filedata.bounds) - min(filedata.bounds)) / (
20 * (np.vstack(values).max() - np.vstack(values).min())
Expand All @@ -1106,7 +1107,7 @@
filedata = filedata.delaunay_2d(tol=field.surface_mapping_tolerance)
filedata.point_data[field.label] = np.array(values)
field.scalar_name = filedata.point_data.active_scalars_name
field._cached_polydata = filedata
# field._cached_polydata = filedata

@pyaedt_function_handler()
def _add_buttons(self):
Expand Down
7 changes: 7 additions & 0 deletions src/ansys/aedt/core/workflows/maxwell3d/toolkits_catalog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ icon = "images/large/magnet_segmentation.png"
template = "run_pyaedt_toolkit_script"
pip = "ansys-magnet-segmentation-toolkit"
package = "ansys-magnet-segmentation-toolkit"

[LossDistribution]
name = "Export of loss distribution"
script = "transfomer_loss_distribution.py"
icon = ""
template = "run_pyaedt_toolkit_script"
pip = ""
Loading
Loading