Skip to content

Commit 573ca17

Browse files
committed
Merge branch 'master' of https://github.com/pyansys/DPF-Core
2 parents c602288 + 233eee0 commit 573ca17

File tree

3 files changed

+8
-24
lines changed

3 files changed

+8
-24
lines changed

ansys/dpf/core/server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import grpc
1515
import psutil
1616
import weakref
17-
import atexit
1817
import copy
1918

2019
from ansys import dpf

examples/05-plotting/00-plot_on_path.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from ansys.dpf import core as dpf
1212
from ansys.dpf.core import examples
13+
from ansys.dpf.core import operators as ops
1314
from ansys.dpf.core.plotter import DpfPlotter
1415

1516
###############################################################################
@@ -26,11 +27,9 @@
2627

2728
###############################################################################
2829
# Then, we create a coordinates field to map on
29-
coordinates = []
30-
ref = [0.024, 0.03, 0.003]
31-
coordinates.append(ref)
30+
coordinates = [ [0.024, 0.03, 0.003]]
3231
for i in range(1, 51):
33-
coord_copy = ref.copy()
32+
coord_copy = coordinates[0].copy()
3433
coord_copy[1] = coord_copy[0] + i * 0.001
3534
coordinates.append(coord_copy)
3635
field_coord = dpf.fields_factory.create_3d_vector_field(len(coordinates))
@@ -39,11 +38,11 @@
3938

4039
###############################################################################
4140
# Let's now compute the mapped data using the mapping operator
42-
mapping_operator = dpf.Operator("mapping")
43-
mapping_operator.inputs.fields_container.connect(stress_fc)
44-
mapping_operator.inputs.coordinates.connect(field_coord)
45-
mapping_operator.inputs.mesh.connect(mesh)
46-
mapping_operator.inputs.create_support.connect(True)
41+
mapping_operator = ops.mapping.on_coordinates(
42+
fields_container=stress_fc,
43+
coordinates=field_coord,
44+
create_support=True,
45+
mesh=mesh)
4746
fields_mapped = mapping_operator.outputs.fields_container()
4847

4948
###############################################################################

tests/conftest.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,3 @@ def engineering_data_sources():
154154

155155

156156
local_server = core.start_local_server(as_global=False)
157-
158-
159-
@pytest.fixture(scope="session", autouse=True)
160-
def cleanup(request):
161-
"""Cleanup a testing directory once we are finished."""
162-
163-
def close_servers():
164-
core.server.shutdown_all_session_servers()
165-
try:
166-
local_server.shutdown()
167-
except:
168-
pass
169-
170-
request.addfinalizer(close_servers)

0 commit comments

Comments
 (0)