diff --git a/src/ansys/mapdl/core/commands.py b/src/ansys/mapdl/core/commands.py index e186027ac6..5ad9c82c97 100644 --- a/src/ansys/mapdl/core/commands.py +++ b/src/ansys/mapdl/core/commands.py @@ -53,7 +53,7 @@ # Some of them are not documented (already deprecated?) # So they are not in the Mapdl class, # so they won't be wrapped. -CMD_LISTING = [ +CMD_RESULT_LISTING = [ "NLIN", # not documented "PRCI", "PRDI", # Not documented. @@ -78,12 +78,24 @@ "PRST", # Not documented. "PRVE", "PRXF", # Not documented. - "STAT", "SWLI", ] CMD_BC_LISTING = ["FLIS", "DLIS"] +CMD_ENTITY_LISTING = [ + "NLIS", + # "ELIS", # To be implemented later + # "KLIS", + # "LLIS", + # "ALIS", + # "VLIS", +] + +CMD_LISTING = [] +CMD_LISTING.extend(CMD_ENTITY_LISTING) +CMD_LISTING.extend(CMD_RESULT_LISTING) + # Adding empty lines to match current format. docstring_injection = """ Returns diff --git a/tests/test_commands.py b/tests/test_commands.py index fe727e50a2..708fad736c 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -657,3 +657,16 @@ def test_string_with_literal(): assert output.__repr__() == output assert output.__repr__() == base_ assert len(output.split()) == 2 + + +def test_nlist_to_array(mapdl, beam_solve): + # This kinternal include the internal points, so it matches the + # number of nodes with midside nodes. + nlist = mapdl.nlist(kinternal="internal") + assert isinstance(nlist.to_list(), list) + assert isinstance(nlist.to_array(), np.ndarray) + + # above asserts should be removed once fixed the midside issue. + assert len(nlist.to_list()) == len(mapdl.mesh.nodes) + assert len(nlist.to_array()) == len(mapdl.mesh.nodes) + assert np.allclose(nlist.to_array()[:, 1:4], mapdl.mesh.nodes)