Skip to content

Commit 0f9987a

Browse files
committed
various api cleanup
1 parent 92bd3fb commit 0f9987a

File tree

4 files changed

+2
-24
lines changed

4 files changed

+2
-24
lines changed

pyansys/errors.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
88
"""
99

10-
EMAILME = """
11-
The ANSYS gRPC interface currently requires the closed source python
12-
module ``ansys.mapdl`` to open a connection to the gRPC server.
13-
Please contact Alex Kaszynski at [email protected] to
14-
request access to the code repository.
15-
"""
16-
1710
class MapdlRuntimeError(RuntimeError):
1811
"""Raised when MAPDL passes an error"""
1912
pass
@@ -36,10 +29,3 @@ class LockFileException(RuntimeError):
3629
"""Error message when the lockfile has not been removed"""
3730
def __init__(self, msg=LOCKFILE_MSG):
3831
RuntimeError.__init__(self, msg)
39-
40-
41-
class PrivateModuleImportError(ImportError):
42-
"""Raised when attempting to import a closed source module"""
43-
44-
def __init__(self, msg=EMAILME):
45-
ImportError.__init__(self, msg)

pyansys/mapdl.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,11 +1838,6 @@ def _screenshot_path(self):
18381838
filenames.sort()
18391839
return filenames[-1]
18401840

1841-
@property
1842-
def math(self): # pragma: no cover
1843-
"""Return mapdl.math instance"""
1844-
raise NotImplementedError("Requires gRPC interface")
1845-
18461841
def _set_log_level(self, level):
18471842
"""alias for set_log_level"""
18481843
self.set_log_level(level)

pyansys/mesh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Module for common class between gRPC, Archive, and Result mesh"""
1+
"""Module for common class between Archive, and Result mesh"""
22
import pyvista as pv
33
import vtk
44
import numpy as np

tests/test_mapdl.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,6 @@ def test_elements(cleared, mapdl):
421421
mapdl.e(*list(range(9, 17)))
422422
expected = np.array([[1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8],
423423
[1, 1, 1, 1, 0, 0, 0, 0, 2, 0, 9, 10, 11, 12, 13, 14, 15, 16]])
424-
if 'Grpc' in str(type(mapdl)):
425-
# no element number in elements
426-
expected[:, 8] = 0
427424

428425
assert np.allclose(np.array(mapdl.mesh.elem), expected)
429426

@@ -433,7 +430,7 @@ def test_elements(cleared, mapdl):
433430
10.0,
434431
[1, 2, 3],
435432
[[1, 2, 3], [1, 2, 3]],
436-
np.random.random((10000)), # fails on gRPC at 100000
433+
np.random.random((10000)),
437434
np.random.random((10, 3)),
438435
np.random.random((10, 3, 3))))
439436
def test_set_get_parameters(mapdl, parm):

0 commit comments

Comments
 (0)