Skip to content

Commit 9d7e7e5

Browse files
committed
WIP
1 parent c783090 commit 9d7e7e5

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/ansys/dpf/core/meshed_region.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ def get_elemental_nodal_size_list(self):
739739
# Get the field of element types
740740
element_types_field = self.elements.element_types_field
741741
# get the number of nodes for each possible element type
742-
size_map = dict([(e_type.value, element_types.descriptor(e_type).n_nodes)
742+
size_map = dict([(e_type.value, element_types.descriptor(e_type).n_corner_nodes)
743743
for e_type in element_types])
744744
keys = list(size_map.keys())
745745
sort_idx = np.argsort(keys)

tests/test_plotter.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,17 +233,19 @@ def test_field_elemental_nodal_plot_scoped(simple_bar):
233233

234234
@pytest.mark.skipif(not HAS_PYVISTA, reason="Please install pyvista")
235235
def test_field_elemental_nodal_plot_multiple_solid_types():
236-
model = Model(simple_bar)
237-
stress = model.results.element_nodal_forces()
236+
from ansys.dpf.core import examples
237+
model = dpf.core.Model(examples.download_hemisphere())
238+
stress = model.results.stress()
238239
fc = stress.outputs.fields_container()
239240
f = fc[0]
241+
240242
print(f.data.shape)
241243
f.plot()
242-
picture = 'test_plotter1.png'
244+
picture = 'test_plotter3.png'
243245
remove_picture(picture)
244246
f.plot(off_screen=True, screenshot=picture)
245247
assert os.path.exists(os.path.join(os.getcwd(), picture))
246-
remove_picture(picture)
248+
# remove_picture(picture)
247249

248250

249251
@pytest.mark.skipif(not HAS_PYVISTA, reason="Please install pyvista")

0 commit comments

Comments
 (0)