Skip to content

Commit 8a8c442

Browse files
Duplicate method in Q3D.py
1 parent d184690 commit 8a8c442

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

pyaedt/q3d.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,36 @@ def get_traces_for_plot(
159159
category=category,
160160
)
161161

162+
@pyaedt_function_handler()
163+
def export_mesh_stats(self, setup_name, variation_string="", mesh_path=None, setup_type="CG"):
164+
"""Export mesh statistics to a file.
165+
166+
Parameters
167+
----------
168+
setup_name :str
169+
Setup name.
170+
variation_string : str, optional
171+
Variation list. The default is ``""``.
172+
mesh_path : str, optional
173+
Full path to the mesh statistics file. The default is ``None``, in which
174+
caswe the working directory is used.
175+
setup_type : str, optional
176+
Setup type in Q3D. The default is "CG", other options are "AC RL" or "DC RL".
177+
178+
Returns
179+
-------
180+
str
181+
File path.
182+
183+
References
184+
----------
185+
>>> oDesign.ExportMeshStats
186+
"""
187+
if not mesh_path:
188+
mesh_path = os.path.join(self.working_directory, "meshstats.ms")
189+
self.odesign.ExportMeshStats(setup_name, variation_string, setup_type, mesh_path)
190+
return mesh_path
191+
162192

163193
class Q3d(QExtractor, object):
164194
"""Provides the Q3D application interface.
@@ -724,36 +754,6 @@ def create_discrete_sweep(
724754
return sweepdata
725755
return False
726756

727-
@pyaedt_function_handler()
728-
def export_mesh_stats(self, setup_name, variation_string="", mesh_path=None, setup_type="CG"):
729-
"""Export mesh statistics to a file.
730-
731-
Parameters
732-
----------
733-
setup_name :str
734-
Setup name.
735-
variation_string : str, optional
736-
Variation list. The default is ``""``.
737-
mesh_path : str, optional
738-
Full path to the mesh statistics file. The default is ``None``, in which
739-
caswe the working directory is used.
740-
setup_type : str, optional
741-
Setup type in Q3D. The default is "CG", other options are "AC RL" or "DC RL".
742-
743-
Returns
744-
-------
745-
str
746-
File path.
747-
748-
References
749-
----------
750-
>>> oDesign.ExportMeshStats
751-
"""
752-
if not mesh_path:
753-
mesh_path = os.path.join(self.working_directory, "meshstats.ms")
754-
self.odesign.ExportMeshStats(setup_name, variation_string, setup_type, mesh_path)
755-
return mesh_path
756-
757757

758758
class Q2d(QExtractor, object):
759759
"""Provides the Q2D application interface.

0 commit comments

Comments
 (0)