ansys-pyensight-core 0.9.6__tar.gz → 0.9.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ansys-pyensight-core might be problematic. Click here for more details.
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/PKG-INFO +1 -1
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/pyproject.toml +1 -1
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/dvs.py +19 -24
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/launcher.py +47 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/locallauncher.py +10 -2
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/LICENSE +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/README.rst +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/__init__.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/common.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/deep_pixel_view.html +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/dockerlauncher.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/enscontext.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/enshell_grpc.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/ensight_grpc.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/ensobj.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/launch_ensight.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/libuserd.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/listobj.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/py.typed +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/renderable.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/session.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/sgeo_poll.html +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/__init__.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/adr.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/dsg_server.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/export.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/omniverse.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/omniverse_cli.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/omniverse_dsg_server.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/omniverse_glb_server.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/parts.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/query.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/readers.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/resources/Materials/000_sky.exr +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/support.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/variables.py +0 -0
- {ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/views.py +0 -0
|
@@ -627,37 +627,30 @@ class DVS(dvs_base):
|
|
|
627
627
|
start = end
|
|
628
628
|
return parts
|
|
629
629
|
|
|
630
|
-
def
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
i += faces[i] + 1
|
|
638
|
-
mask = numpy.zeros(faces.shape, dtype=bool)
|
|
639
|
-
mask[indices] = True
|
|
640
|
-
vertices_per_face = numpy.array(faces[mask])
|
|
641
|
-
connectivity_1d = numpy.array(faces[~mask])
|
|
642
|
-
connectivity_split = numpy.split(connectivity_1d, numpy.cumsum(vertices_per_face[:-1]))
|
|
643
|
-
all_same = numpy.all(numpy.array(vertices_per_face) == vertices_per_face[0])
|
|
644
|
-
return connectivity_split, vertices_per_face, all_same
|
|
645
|
-
|
|
646
|
-
def send_connectivity(self, part_id, faces: Union[List, numpy.ndarray], ghost=False):
|
|
630
|
+
def send_connectivity(
|
|
631
|
+
self,
|
|
632
|
+
part_id,
|
|
633
|
+
offsets: Union[List, numpy.ndarray],
|
|
634
|
+
faces: Union[List, numpy.ndarray],
|
|
635
|
+
ghost=False,
|
|
636
|
+
):
|
|
647
637
|
"""Send the connectivity data for the input part.
|
|
648
638
|
|
|
649
639
|
The data will be used for building an element block in DVS.
|
|
650
640
|
The connectivity array will be split among all the available ranks.
|
|
651
|
-
The data are assumed in the following format:
|
|
641
|
+
The faces data are assumed in the following format:
|
|
652
642
|
[n, i1, i2, ...in, m, j1, j2, ...jn, p, k1, k2, ...kp, ...]
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
face,
|
|
643
|
+
The offsets data instead:
|
|
644
|
+
[0, n, n+m, n+m+p ....]
|
|
645
|
+
The faces list indicates the IDs of the vertices of each face, in order.
|
|
646
|
+
The offsets lists indicates the index where to find a specific face.
|
|
656
647
|
|
|
657
648
|
Parameters
|
|
658
649
|
----------
|
|
659
650
|
part_id: int
|
|
660
651
|
the part to define the connectivity for
|
|
652
|
+
offsets: List[int] or numpy array
|
|
653
|
+
the offsets values. The format is described above.
|
|
661
654
|
faces: List[int] or numpy array
|
|
662
655
|
the connectivity value. The format is described above.
|
|
663
656
|
ghost: bool
|
|
@@ -671,10 +664,12 @@ class DVS(dvs_base):
|
|
|
671
664
|
)
|
|
672
665
|
if not isinstance(faces, numpy.ndarray):
|
|
673
666
|
faces = numpy.array(faces)
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
)
|
|
667
|
+
if not isinstance(offsets, numpy.ndarray):
|
|
668
|
+
offsets = numpy.array(offsets)
|
|
669
|
+
vertices_per_face = numpy.diff(offsets)
|
|
670
|
+
connectivity_split = numpy.split(faces, numpy.cumsum(vertices_per_face[:-1]))
|
|
677
671
|
elem_type = self.ELEMTYPE_N_SIDED_POLYGON
|
|
672
|
+
all_same = numpy.all(numpy.array(vertices_per_face) == vertices_per_face[0])
|
|
678
673
|
if all_same:
|
|
679
674
|
num_vertices = vertices_per_face[0]
|
|
680
675
|
_elem_type = self._elem_type_map.get(num_vertices)
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/launcher.py
RENAMED
|
@@ -34,6 +34,12 @@ if TYPE_CHECKING:
|
|
|
34
34
|
# See: https://bugs.python.org/issue29288
|
|
35
35
|
"".encode("idna")
|
|
36
36
|
|
|
37
|
+
# The user doesn't know "eth" and "ib" what they mean. Use more meaningful
|
|
38
|
+
# keywords.
|
|
39
|
+
INTERCONNECT_MAP = {"ethernet": "eth", "infiniband": "ib"}
|
|
40
|
+
|
|
41
|
+
MPI_TYPES = ["intel2018", "intel2021", "openmpi"]
|
|
42
|
+
|
|
37
43
|
|
|
38
44
|
class Launcher:
|
|
39
45
|
"""Provides the EnSight ``Launcher`` base class.
|
|
@@ -63,6 +69,31 @@ class Launcher:
|
|
|
63
69
|
are not supported.
|
|
64
70
|
launch_web_ui : bool, optional
|
|
65
71
|
Whether to launch the webUI from EnSight
|
|
72
|
+
use_mpi: str, optional
|
|
73
|
+
If set, EnSight will be launched with the MPI type selected. The valid
|
|
74
|
+
values depend on the EnSight version to be used. The user can see
|
|
75
|
+
the specific list starting the EnSight Launcher manually and specifying the options
|
|
76
|
+
to launch EnSight in parallel and MPI. Here are reported the values for releases
|
|
77
|
+
2024R2 and 2025R1.
|
|
78
|
+
|
|
79
|
+
=================== =========================================
|
|
80
|
+
Release Valid MPI Types
|
|
81
|
+
=================== =========================================
|
|
82
|
+
2024R2 intel2021, intel2018, openmpi
|
|
83
|
+
2025R1 intel2021, intel2018, openmpi
|
|
84
|
+
=================== =========================================
|
|
85
|
+
|
|
86
|
+
The remote nodes must be Linux nodes.
|
|
87
|
+
This option is valid only if a LocalLauncher is used.
|
|
88
|
+
interconnet: str, optional
|
|
89
|
+
If set, EnSight will be launched with the MPI Interconnect selected. Valid values
|
|
90
|
+
are "ethernet", "infiniband". It requires use_mpi to be set.
|
|
91
|
+
If use_mpi is set and interconnect is not, "ethernet" will be used.
|
|
92
|
+
This option is valid only if a LocalLauncher is used.
|
|
93
|
+
server_hosts: List[str], optional
|
|
94
|
+
A list of hostnames where the server processes should be spawned on when MPI is selected.
|
|
95
|
+
If use_mpi is set and server_hosts not, it will default to "localhost".
|
|
96
|
+
This option is valid only if a LocalLauncher is used.
|
|
66
97
|
"""
|
|
67
98
|
|
|
68
99
|
def __init__(
|
|
@@ -73,10 +104,26 @@ class Launcher:
|
|
|
73
104
|
enable_rest_api: bool = False,
|
|
74
105
|
additional_command_line_options: Optional[List] = None,
|
|
75
106
|
launch_webui: bool = False,
|
|
107
|
+
use_mpi: Optional[str] = None,
|
|
108
|
+
interconnect: Optional[str] = None,
|
|
109
|
+
server_hosts: Optional[List[str]] = None,
|
|
76
110
|
) -> None:
|
|
77
111
|
self._timeout = timeout
|
|
78
112
|
self._use_egl_param_val: bool = use_egl
|
|
79
113
|
self._use_sos = use_sos
|
|
114
|
+
self._use_mpi = use_mpi
|
|
115
|
+
self._interconnect = interconnect
|
|
116
|
+
if self._use_mpi and self._use_mpi not in MPI_TYPES:
|
|
117
|
+
raise RuntimeError(f"{self._use_mpi} is not a valid MPI option.")
|
|
118
|
+
if self._use_mpi and not self._interconnect:
|
|
119
|
+
self._interconnect = "ethernet"
|
|
120
|
+
if self._interconnect:
|
|
121
|
+
if self._interconnect not in list(INTERCONNECT_MAP.values()):
|
|
122
|
+
raise RuntimeError(f"{self._interconnect} is not a valid MPI interconnect option.")
|
|
123
|
+
self._interconnect = INTERCONNECT_MAP.get(self._interconnect)
|
|
124
|
+
self._server_hosts = server_hosts
|
|
125
|
+
if self._use_mpi and not self._server_hosts:
|
|
126
|
+
self._server_hosts = ["localhost"]
|
|
80
127
|
self._enable_rest_api = enable_rest_api
|
|
81
128
|
|
|
82
129
|
self._sessions: List[Session] = []
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/locallauncher.py
RENAMED
|
@@ -218,8 +218,16 @@ class LocalLauncher(Launcher):
|
|
|
218
218
|
cmd.append("-egl")
|
|
219
219
|
if self._use_sos:
|
|
220
220
|
cmd.append("-sos")
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
if not self._use_mpi:
|
|
222
|
+
cmd.append("-nservers")
|
|
223
|
+
cmd.append(str(int(self._use_sos)))
|
|
224
|
+
else:
|
|
225
|
+
cmd.append(f"--np={int(self._use_sos)+1}")
|
|
226
|
+
cmd.append(f"--mpi={self._use_mpi}")
|
|
227
|
+
cmd.append(f"--ic={self._interconnect}")
|
|
228
|
+
hosts = ",".join(self._server_hosts)
|
|
229
|
+
cmd.append(f"--cnf={hosts}")
|
|
230
|
+
|
|
223
231
|
# cmd.append("-minimize_console")
|
|
224
232
|
logging.debug(f"Starting EnSight with : {cmd}\n")
|
|
225
233
|
self._ensight_pid = subprocess.Popen(cmd, **popen_common).pid
|
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/__init__.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/common.py
RENAMED
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/dockerlauncher.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/enscontext.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/enshell_grpc.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/ensight_grpc.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/ensobj.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/launch_ensight.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/libuserd.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/listobj.py
RENAMED
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/renderable.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/session.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/sgeo_poll.html
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/__init__.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/adr.py
RENAMED
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/export.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/parts.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/query.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/readers.py
RENAMED
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/support.py
RENAMED
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.6 → ansys_pyensight_core-0.9.7}/src/ansys/pyensight/core/utils/views.py
RENAMED
|
File without changes
|