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

CHORE: refacto maxwell test #5601

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
bf90449
refacto test
gmalinve Dec 18, 2024
8038ad0
refacto test
gmalinve Dec 18, 2024
7e7fa37
Merge branch 'refs/heads/main' into chore/refacto_maxwell_test
gmalinve Dec 19, 2024
6efc10f
refacto test + delete useless aedt file
gmalinve Dec 19, 2024
80265a8
improve tests
gmalinve Dec 19, 2024
deb3181
improve tests
gmalinve Dec 19, 2024
6cd3378
improve tests
gmalinve Dec 19, 2024
83c2a0b
improve tests
gmalinve Dec 19, 2024
79399f9
refacto m2d and m3d tests + add maxwell app in conftest.py
gmalinve Dec 20, 2024
22548d3
Merge branch 'refs/heads/main' into chore/refacto_maxwell_test
gmalinve Dec 20, 2024
b99a08b
refacto m2d and m3d tests + add maxwell app in conftest.py
gmalinve Dec 20, 2024
f1bfb35
Merge branch 'refs/heads/main' into chore/refacto_maxwell_test
gmalinve Jan 2, 2025
c374fa2
refacto m2d and m3d tests + fix assign current density
gmalinve Jan 2, 2025
fc68975
CHORE: Auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 2, 2025
f887aab
refacto m2d and m3d tests + delete unused test files + improve methods
gmalinve Jan 3, 2025
c67fba0
Merge remote-tracking branch 'origin/chore/refacto_maxwell_test' into…
gmalinve Jan 3, 2025
d0d6c1c
Merge branch 'refs/heads/main' into chore/refacto_maxwell_test
gmalinve Jan 3, 2025
599e127
refacto m3d tests
gmalinve Jan 7, 2025
213be64
Merge branch 'main' into chore/refacto_maxwell_test
gmalinve Jan 7, 2025
3239b31
refacto maxwell class boundary objects and improve readability
gmalinve Jan 7, 2025
9fcff2b
fix test coil
gmalinve Jan 8, 2025
38c8bbe
fix tests
gmalinve Jan 8, 2025
138f731
fix tests
gmalinve Jan 8, 2025
f8057f0
Merge branch 'refs/heads/main' into chore/refacto_maxwell_test
gmalinve Jan 8, 2025
a621fc3
Merge branch 'main' into chore/refacto_maxwell_test
gmalinve Jan 9, 2025
89565f0
Update src/ansys/aedt/core/maxwell.py
gmalinve Jan 9, 2025
65f0d50
Update src/ansys/aedt/core/maxwell.py
gmalinve Jan 9, 2025
b3f4c16
Merge branch 'refs/heads/main' into chore/refacto_maxwell_test
gmalinve Jan 9, 2025
774e52b
Merge branch 'refs/heads/main' into chore/refacto_maxwell_test
gmalinve Jan 10, 2025
0b03cbf
Move get solution data test to solvers
Samuelopez-ansys Jan 10, 2025
1f7ed6b
Merge branch 'main' into chore/refacto_maxwell_test
Samuelopez-ansys Jan 10, 2025
31cca63
Merge remote-tracking branch 'origin/chore/refacto_maxwell_test' into…
Samuelopez-ansys Jan 10, 2025
2158e18
revert back get_solution_data
gmalinve Jan 10, 2025
5980969
delete test - not needed
gmalinve Jan 10, 2025
592bebb
Merge branch 'refs/heads/main' into chore/refacto_maxwell_test
gmalinve Jan 10, 2025
5c686db
fix UT m3d
gmalinve Jan 10, 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
3 changes: 0 additions & 3 deletions src/ansys/aedt/core/application/analysis_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1312,9 +1312,6 @@ def import_dxf(
import_method : int, bool
Whether the import method is ``Script`` or ``Acis``.
The default is ``1``, which means that the ``Acis`` is used.
sheet_bodies_2d : bool, optional
Whether importing as 2D sheet bodies causes imported objects to
be organized in terms of 2D sheets. The default is ``True``.

Returns
-------
Expand Down
526 changes: 207 additions & 319 deletions src/ansys/aedt/core/maxwell.py

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions src/ansys/aedt/core/modules/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,6 @@ def assign_length_mesh(self, assignment, inside_selection=True, maximum_length=1
if maximum_length is None and maximum_elements is None:
self.logger.error("mesh not assigned due to incorrect settings")
return
assignment = self._app.modeler.convert_to_selections(assignment, True)
gmalinve marked this conversation as resolved.
Show resolved Hide resolved

if isinstance(assignment[0], int) and not inside_selection:
seltype = "Faces"
Expand Down Expand Up @@ -1318,7 +1317,6 @@ def assign_curvilinear_elements(self, assignment, enable=True, name=None):
name = generate_unique_name(name)
else:
name = generate_unique_name("CurvilinearElements")
assignment = self._app.modeler.convert_to_selections(assignment, True)
gmalinve marked this conversation as resolved.
Show resolved Hide resolved

if isinstance(assignment[0], int):
seltype = "Faces"
Expand Down
19 changes: 5 additions & 14 deletions src/ansys/aedt/core/modules/solve_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ def add_mesh_link(
Name of the source design.
solution : str, optional
Name of the source design solution in the format ``"name : solution_name"``.
If ``None``, the default value is ``name : LastAdaptive``.
If ``None``, the default value is taken from the nominal adaptive solution.
parameters : dict, optional
Dictionary of the "mapping" variables from the source design.
If ``None``, the default is `appname.available_variations.nominal_w_values_dict`.
Expand Down Expand Up @@ -919,9 +919,7 @@ def add_mesh_link(
design_type = self.p_app.design_type
meshlinks["Product"] = design_type
# design name
if not design or design is None:
raise ValueError("Provide design name to add mesh link to.")
elif design not in self.p_app.design_list:
if design not in self.p_app.design_list:
raise ValueError("Design does not exist in current project.")
else:
meshlinks["Design"] = design
Expand All @@ -939,15 +937,8 @@ def add_mesh_link(
meshlinks["ImportMesh"] = True
# solution name
if solution is None:
meshlinks["Soln"] = (
f'{self.p_app.oproject.GetDesign(design).GetChildObject("Analysis").GetChildNames()[0]} : '
f"LastAdaptive"
)
elif (
solution.split()[0] in self.p_app.oproject.GetDesign(design).GetChildObject("Analysis").GetChildNames()
):
meshlinks["Soln"] = f"{solution.split()[0]} : LastAdaptive"
else:
meshlinks["Soln"] = self.p_app.nominal_adaptive
elif solution.split()[0] not in self.p_app.existing_analysis_setups:
raise ValueError("Setup does not exist in current design.")
# parameters
meshlinks["Params"] = {}
Expand All @@ -964,7 +955,7 @@ def add_mesh_link(
meshlinks["ForceSourceToSolve"] = force_source_to_solve
meshlinks["PreservePartnerSoln"] = preserve_partner_solution
meshlinks["ApplyMeshOp"] = apply_mesh_operations
if self.p_app.design_type != "Maxwell 2D" or self.p_app.design_type != "Maxwell 3D":
if self.p_app.design_type not in ["Maxwell 2D", "Maxwell 3D"]:
meshlinks["AdaptPort"] = adapt_port
self.update()
self.auto_update = auto_update
Expand Down
1 change: 0 additions & 1 deletion tests/system/general/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
# Initialize default desktop configuration
default_version = "2024.2"


if inside_desktop and "oDesktop" in dir(sys.modules["__main__"]):
default_version = sys.modules["__main__"].oDesktop.GetVersion()[0:6]
config = {
Expand Down
Loading
Loading