-
Notifications
You must be signed in to change notification settings - Fork 140
Closed
Description
Discussed in #1754
Originally posted by iceblink-ansys January 4, 2023
Hi, I would like to get access to some node numbers and stress results that I retrieve from a result file, using the mapdl.starvget method. When I try to do that, I get an error "ValueError: cannot reshape array of size 0 into shape (25,1,1)"
Is this a bug, or should I prepare my variable first so that it has the right size, before using mapdl.parameters ?
Something like:
mapdl.cwd(dirpath=os.getcwd())
mapdl.post1()
mapdl.inres(item1='ALL')
mapdl.file(fname='v18.rst')
mapdl.set(lstep='FIRST')
mapdl.cmsel(type_='S', name='DUMMY_CMP')
mapdl.starvget(parr='CMP_NODENUMS', entity='NODE', item1='NLIST')
node_num_list = mapdl.parameters['CMP_NODENUMS']
Update
I found out I should be able to do:
mapdl.get_array('NODE', item1='NLIST')
but that returns an array of length zero, even though I am sure I have selected nodes
>>> mapdl.cmsel(type_='S', name='DUMMY_CMP')
SELECT COMPONENT DUMMY_CMP
>>> mapdl.get(par='TOT_NODES', entity='NODE', item1='COUNT')
25.0
>>> mapdl.get_array('NODE', item1='NLIST')
array([], dtype=float64)Things to be fixed:
- Fix cwd message:
In [6]: mapdl.cwd(dirpath="/local/tmp/test")
Out[6]: Current working directory switched to /local- The extension is not correctly applied in
mapdl.input:
mapdl.input(fname='FAT_NS.cdb', ext='cdb', dir=os.getcwd())-
mapdl.filedoes not detect files in the instance?
If the RST is already there, it is not detected.
Metadata
Metadata
Assignees
Labels
No labels