ansys / pydpf-core

Data Processing Framework - Python Core
http://dpf.docs.pyansys.com/
MIT License
67 stars 24 forks source link

mapdl.cm() makes named selection upper-case #101

Closed natter1 closed 2 years ago

natter1 commented 2 years ago

Not really a bug and not sure if here is the best place to post it, or if its an issue of dpf-core. When I define a named selection with mapdl.cm("lower_case_name", "NODE") in lower-case, and later want to use it e.g. like solution.displacement(named_selection="lower_case_name") the selection is not found (because its LOWER_CASE_NAME). I would like something to make users aware of this issue. Maybe a warning, that names become upper-case when using cm()or maybe change dpf-...so that named_selection is changed to upper-case automatically (not sure if this is allways the right thing to do though ^^)?

pmaroneh commented 2 years ago

Indeed all named selections names will be converted to upper case. I agree that we should at least mention this in the doc.

germa89 commented 2 years ago

maybe change dpf-...so that named_selection is changed to upper-case automatically (not sure if this is allways the right thing to do though ^^)?

Probably this is the way to go, since MAPDL do not discriminate upper from lower case.

germa89 commented 2 years ago

@akaszynski I believe this is a DPF-Core issue.

rlagha commented 2 years ago

@natter1 good point, yes this is a known issue, if you created this from mapdl, then you need to convert the name to upper case. you can also do mesh.available_named_selections which the returns right names.

We will work on this to get a consistent API. Regards

natter1 commented 2 years ago

you can also do mesh.available_named_selections which the returns right names.

Yeah that might work in some cases. But I'm thinking about the combination, doing a simulation with pymapdl and afterwards using dpf. The APDL variable name might be saved in a python variable used for some post-processing class/method and maybe the APDL name is even generated automatically depending on other conditions. So a more consistent API would be great.

PProfizi commented 2 years ago

Closing as wontfix and stale. Do not hesitate to reopen if this is still an issue.