Python CubitInterface bug in 15.1.1?

Hello,

I am trying to use the Python interface to Trelis v15.1.1, but any call to the function “cubit.get_adjacent_volumes()” causes Trelis to crash immediately. I believe this is a bug. Has anyone else observed this behavior?

I am running Trelis on a machine running Scientific Linux 6, if this is relevant.

Hello,

Could you provide an example of how you are using this function, including the geometry setup?

The minimal buggy example is two adjacent cubes that share a surface, say Surface 6, with no mesh, no sidesets, no blocks, etc. Calling the PythonInterface function cubit.get_adjacent_volumes(“surface”,6) using either the journal editor or an auxiliary script invoked via a custom tool button causes the program to exit with no warning.

Hmmm…I am not seeing the crash in Trelis 15.1.4 for the following case:

cubit.cmd("reset")
cubit.cmd("bri x 10")
cubit.cmd("vol 1 copy move x 10")
cubit.cmd("merge all")
print cubit.get_adjacent_volumes("surface", 6)

However, I do see a crash when I specify an entity that does not exist (or that does not belong to a volume). For example,

cubit.cmd("reset")
print cubit.get_adjacent_volumes("surface", 6)

or this

cubit.cmd("reset")
cubit.cmd("create curve location 0 0 0 location 1 0 0")
print cubit.get_adjacent_volumes("curve", 1)

I wonder if you are referencing an entity that isn’t there anymore?

Regardless, these cases are definitely bugs and should not be crashing Trelis, which we will look into. Thanks for catching it.