Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into chore/extension_template
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalinve committed Dec 12, 2024
2 parents 2c82488 + 23f68ca commit af9b8f0
Show file tree
Hide file tree
Showing 50 changed files with 1,382 additions and 1,358 deletions.
41 changes: 33 additions & 8 deletions doc/source/API/Boundaries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,49 @@ app methods and can be used to edit or delete a boundary condition.
:toctree: _autosummary
:nosignatures:

BoundaryObject
BoundaryObject3dLayout
NetworkObject
FarFieldSetup
Matrix
BoundaryObject3dLayout
common.BoundaryObject
hfss_boundary.FarFieldSetup
hfss_boundary.NearFieldSetup
q3d_boundary.Matrix
maxwell_boundary.MaxwellParameters
maxwell_boundary.MaxwellMatrix
layout_boundary.BoundaryObject3dLayout
icepak_boundary.NetworkObject

Circuit excitations
-------------------
To facilitate excitations assignment in Circuit, multiple classes have been created.

.. currentmodule:: ansys.aedt.core.modules.boundary.circuit_boundary

.. autosummary::
:toctree: _autosummary
:nosignatures:

Sources
PowerSinSource
PowerIQSource
VoltageFrequencyDependentSource
VoltageDCSource
VoltageSinSource
CurrentSinSource
Excitations

Native components
-----------------

When native components object are created, the ``NativeComponentObject`` class is returned. For PCB components, ``NativeComponentPCB`` is returned.

.. currentmodule:: ansys.aedt.core.modules.boundary.layout_boundary

.. autosummary::
:toctree: _autosummary
:nosignatures:

NativeComponentObject
NativeComponentPCB
NativeComponentObject
PCBSettingsDeviceParts
PCBSettingsPackageParts

``Native Component Object`` example:

Expand All @@ -50,14 +73,16 @@ Icepak transient assignments
----------------------------
To facilitate transient assignment handling in Icepak, it is possible to use one of the following classes:

.. currentmodule:: ansys.aedt.core.modules.boundary.icepak_boundary

.. autosummary::
:toctree: _autosummary
:nosignatures:

SinusoidalDictionary
LinearDictionary
PowerLawDictionary
ExponentialDictionary
SinusoidalDictionary
SquareWaveDictionary
PieceWiseLinearDictionary

Expand Down
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/application/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def setups(self):
Returns
-------
List[:class:`ansys.aedt.core.modules.solve_setup.Setup`]
list[:class:`ansys.aedt.core.modules.solve_setup.Setup`]
Setups in the project.
"""
Expand Down
3 changes: 1 addition & 2 deletions src/ansys/aedt/core/application/analysis_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ def post(self):
Returns
-------
:class:`ansys.aedt.core.visualization.post.post_common_3d.PostProcessor3D` or
:class:`ansys.aedt.core.visualization.post.post_icepak.PostProcessorIcepak`
:class:`ansys.aedt.core.visualization.post.post_common_3d.PostProcessor3D`
PostProcessor object.
"""
if self._post is None and self._odesign:
Expand Down
9 changes: 7 additions & 2 deletions src/ansys/aedt/core/application/analysis_nexxim.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,12 @@ def nominal_sweep(self):

@property
def modeler(self):
"""Modeler object."""
"""Modeler object.
Returns
-------
:class:`ansys.aedt.core.modeler.schematic.ModelerNexxim`
"""
if self._modeler is None and self._odesign:
self.logger.reset_timer()
from ansys.aedt.core.modeler.schematic import ModelerNexxim
Expand Down Expand Up @@ -270,7 +275,7 @@ def sources(self):
Returns
-------
List of :class:`ansys.aedt.core.modules.boundary.Sources`
list[:class:`ansys.aedt.core.modules.boundary.circuit_boundary.Sources`]
List of sources.
"""
Expand Down
17 changes: 10 additions & 7 deletions src/ansys/aedt/core/application/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import sys
import threading
import time
from typing import List
import warnings

from ansys.aedt.core.application.aedt_objects import AedtObjects
Expand Down Expand Up @@ -77,8 +78,8 @@
from ansys.aedt.core.generic.general_methods import settings
from ansys.aedt.core.generic.general_methods import write_csv
from ansys.aedt.core.generic.load_aedt_file import load_entire_aedt_file
from ansys.aedt.core.modules.boundary.circuit_boundary import NetworkObject
from ansys.aedt.core.modules.boundary.common import BoundaryObject
from ansys.aedt.core.modules.boundary.icepak_boundary import NetworkObject
from ansys.aedt.core.modules.boundary.maxwell_boundary import MaxwellParameters

if sys.version_info.major > 2:
Expand Down Expand Up @@ -324,7 +325,7 @@ def project_datasets(self):
Returns
-------
Dict[str, :class:`ansys.aedt.core.application.variables.DataSet`]
dict[str, :class:`ansys.aedt.core.application.variables.DataSet`]
"""
if not self._project_datasets:
self._project_datasets = self._get_project_datasets()
Expand All @@ -336,19 +337,21 @@ def design_datasets(self):
Returns
-------
Dict[str, :class:`ansys.aedt.core.application.variables.DataSet`]
dict[str, :class:`ansys.aedt.core.application.variables.DataSet`]
"""
if not self._design_datasets:
self._design_datasets = self._get_design_datasets()
return self._design_datasets

@property
def boundaries(self):
def boundaries(self) -> List[BoundaryObject]:
"""Design boundaries and excitations.
Returns
-------
List of :class:`ansys.aedt.core.modules.boundary.BoundaryObject`
list[:class:`ansys.aedt.core.modules.boundary.common.BoundaryObject`]
Boundaries available in design.
"""
bb = []
if self.oboundary and "GetBoundaries" in self.oboundary.__dir__():
Expand Down Expand Up @@ -465,7 +468,7 @@ def boundaries_by_type(self):
Returns
-------
Dictionary of boundaries.
dict[str, :class:`ansys.aedt.core.modules.boundary.common.BoundaryObject`]
"""
_dict_out = {}
for bound in self.boundaries:
Expand Down Expand Up @@ -2352,7 +2355,7 @@ def _get_boundaries_data(self):
Returns
-------
[:class:`ansys.aedt.core.modules.boundary.BoundaryObject`]
list[:class:`ansys.aedt.core.modules.boundary.common.BoundaryObject`]
"""
boundaries = []
if self.design_properties and "BoundarySetup" in self.design_properties:
Expand Down
4 changes: 3 additions & 1 deletion src/ansys/aedt/core/application/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,12 @@ def variables(self):
Returns
-------
dict
dict[str, :class:`ansys.aedt.core.application.variables.Variable`]
Dictionary of the `Variable` objects for each project variable and each
design property in the active design.
References
----------
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/aedt/core/emit.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ def modeler(self):
Returns
-------
ansys.aedt.core.modeler.schematic.ModelerEmit
Design oModeler
:class:`ansys.aedt.core.modeler.schematic.ModelerEmit`
Design oModeler.
"""
return self._modeler

Expand Down
9 changes: 4 additions & 5 deletions src/ansys/aedt/core/filtersolutions_core/dll_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ def _define_dll_functions(self):
self._dll.getVersion.restype = ctypes.c_int

def get_string(self, dll_function: Callable, max_size=100) -> str:
"""
Call a DLL function that returns a string.
"""Call a DLL function that returns a string.
Parameters
----------
Expand All @@ -108,13 +107,13 @@ def get_string(self, dll_function: Callable, max_size=100) -> str:
Maximum number of string characters to return. This value is used for the string buffer size.
Raises
-------
------
If there is an error in the execution of the DLL function, an exception is raised.
Returns
--------
-------
str
Return value of the called DLL function.
Return value of the called DLL function.
"""
text_buffer = ctypes.create_string_buffer(max_size)
status = dll_function(text_buffer, max_size)
Expand Down
6 changes: 3 additions & 3 deletions src/ansys/aedt/core/filtersolutions_core/export_to_aedt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ def substrate_er(self) -> Union[SubstrateType, str]:
The value can be either a string or an instance of the ``SubstrateEr`` enum.
The default is ``9.8`` for ``SubstrateEr.ALUMINA``.
Returns:
Returns
-------
Union[SubstrateEr, str]
Expand Down Expand Up @@ -1282,7 +1282,7 @@ def substrate_resistivity(self) -> Union[SubstrateResistivity, str]:
The value can be either a string or an instance of the ``SubstrateResistivity`` enum.
The default is ``1.43`` for ``SubstrateResistivity.GOLD``.
Returns:
Returns
-------
Union[SubstrateResistivity, str]
"""
Expand Down Expand Up @@ -1315,7 +1315,7 @@ def substrate_loss_tangent(self) -> Union[SubstrateEr, str]:
The value can be either a string or an instance of the ``SubstrateEr`` enum.
The default is ``0.0005`` for ``SubstrateEr.ALUMINA``.
Returns:
Returns
-------
Union[SubstrateEr, str]
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def restore_design_goals(self):
def save_goals(self, design, file_path) -> str:
"""Save the optimization goals from a design's optimization goals table to a CSV file.
Parameters:
Parameters
----------
design: The design object containing the optimization goals table.
file_path: The path to the CSV file where the goals will be saved.
Expand All @@ -316,9 +316,10 @@ def save_goals(self, design, file_path) -> str:
def load_goals(self, file_path) -> str:
"""Load optimization goals from a CSV file into this optimization goals table.
Parameters:
Parameters
----------
file_path: The path to the CSV file from which the goals will be loaded.
file_path: str
The path to the CSV file from which the goals will be loaded.
"""
try:
with open(file_path, mode="r", newline="") as file:
Expand Down
6 changes: 3 additions & 3 deletions src/ansys/aedt/core/generic/ibis_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def insert(self, x, y, angle=0.0):
Returns
-------
:class:`ansys.aedt.core.modeler.Object3d.CircuitComponent`
:class:`ansys.aedt.core.modeler.circuits.object_3d_circuit.CircuitComponent`
Circuit Component Object.
"""
Expand Down Expand Up @@ -455,7 +455,7 @@ def insert(self, x, y, angle=0.0):
Returns
-------
:class:`ansys.aedt.core.modeler.Object3d.CircuitComponent`
:class:`ansys.aedt.core.modeler.circuits.object_3d_circuit.CircuitComponent`
Circuit Component Object.
"""
Expand Down Expand Up @@ -516,7 +516,7 @@ def insert(self, x, y, angle=0.0):
Returns
-------
:class:`ansys.aedt.core.modeler.Object3d.CircuitComponent`
:class:`ansys.aedt.core.modeler.circuits.object_3d_circuit.CircuitComponent`
Circuit Component Object.
"""
Expand Down
Loading

0 comments on commit af9b8f0

Please sign in to comment.