+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions src/ansys/dpf/gate/common.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import abc

def __getattr__(name):
if name == "locations":
from ansys.dpf.core.common import locations
import warnings
warnings.warn(message="Use ansys.dpf.core.common.locations", category=DeprecationWarning)
return locations
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

elemental_property_type_dict = {
"eltype": "ELEMENT_TYPE",
"elshape": "ELEMENT_SHAPE",
Expand Down
6 changes: 6 additions & 0 deletions tests/test_scoping.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,9 @@ def test_scoping_dont_start_server(server_type):
assert not dpf.core.server.has_local_server()
assert np.allclose(scop.ids, ids)
dpf.core.SERVER = s


def test_locations_redirect_retro_compatibility(server_type):
from ansys.dpf.gate.common import locations

_ = locations.faces
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载