Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tools/odbclient/src/odbclient/odbclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,15 @@ def variable(self, variable_name, instance_name, step_name, frame_id, nset_name=
index = pd.Index(index_data[:, 0], name=index_labels[0], dtype=np.int64)

column_names = _ascii(_decode, labels)
return pd.DataFrame(values, index=index, columns=column_names)

response_values = pd.DataFrame(values, index=index, columns=column_names)

if variable_name == 'S':
for stress_component in ['S11', 'S22', 'S33', 'S12', 'S13', 'S23']:
if stress_component not in response_values.columns:
response_values[stress_component] = 0.0

return response_values
Copy link
Member

@johannes-mueller johannes-mueller Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about other tensor variables like strain and force? Can we add those, too? Otherwise it would be like a half finished improvement.


def history_regions(self, step_name):
"""Query the history Regions of a given step.
Expand Down
20 changes: 10 additions & 10 deletions tools/odbserver/odbserver/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,16 @@ def _instance_or_rootasm(self, instance_name):
else:
instance = self._asm.instances[instance_name]

element_types = {el.type for el in instance.elements}
unsupported_types = {et for et in element_types if et[0] != "C"}
if unsupported_types:
raise ValueError(
"Only continuum elements (C...) are supported at this point, sorry. "
"Please submit an issue to https://github.com/boschresearch/pylife/issues "
"if you need to support other types. "
"(Unsupported types %s found in instance %s)" % (
", ".join(unsupported_types), instance_name
))
# element_types = {el.type for el in instance.elements}
# unsupported_types = {et for et in element_types if et[0] != "C"}
# if unsupported_types:
# raise ValueError(
# "Only continuum elements (C...) are supported at this point, sorry. "
# "Please submit an issue to https://github.com/boschresearch/pylife/issues "
# "if you need to support other types. "
# "(Unsupported types %s found in instance %s)" % (
# ", ".join(unsupported_types), instance_name
# ))
Comment on lines +247 to +256
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this code still needed? Do we really support all element types? We need to be sure about that. If yes we delete the code, not comment it.


return instance

Expand Down
Loading