paramak icon indicating copy to clipboard operation
paramak copied to clipboard

Consider using cubit.string_from_id_list() instead of " ".join()

Open GregVernon opened this issue 4 years ago • 0 comments

There is a current bug with this Cubit-Python function, that we will address this month -- and this bug will probably break functionality with older versions of Trelis or Cubit.

Consider using Cubit-Python's string_from_id_list() function to convert lists into Cubit strings.

For example this: https://github.com/ukaea/paramak/blob/7924ab0b20e53b0122f56789734bfb795cd73d38/paramak/parametric_neutronics/make_faceteted_neutronics_model.py#L105

could be modified to:

surfaces_in_volume = cubit.parse_cubit_list("surface", " in volume {}".format(cubit.string_from_cubit_list(new_vols)))

This would allow you to avoid needing to map a list of integers into a list of strings, such as what is done here:

https://github.com/ukaea/paramak/blob/7924ab0b20e53b0122f56789734bfb795cd73d38/paramak/parametric_neutronics/make_faceteted_neutronics_model.py#L87

GregVernon avatar Feb 04 '21 14:02 GregVernon