Skip to content

Commit

Permalink
Update twin_model.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chrpetre committed Feb 6, 2023
1 parent 8839c35 commit e780602
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/ansys/pytwin/evaluate/twin_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,33 @@ def tbrom_info(self):
Return a dictionary with TBROM model names included in the Twin and their corresponding 3D visualization
capabilities available (e.g. snapshots, and optionally images generation). If no TBROM is included in the
Twin, it returns None
Raises
------
TwinModelError:
It raises an error if TwinModel has not been initialized.
"""
self._log_key = "TBROMInfo"
if not self.evaluation_is_initialized:
msg = "TwinModel has not been initialized! "
msg += "Please initialize evaluation before to call this method!"
self._raise_error(msg)
return self._tbrom_info

@property
def tbrom_names(self):
"""
Return available TBROM model names. If no TBROM is included in the Twin, it returns an empty list.
Raises
------
TwinModelError:
It raises an error if TwinModel has not been initialized.
"""
self._log_key = "TBROMNames"
if not self.evaluation_is_initialized:
msg = "TwinModel has not been initialized! "
msg += "Please initialize evaluation before to call this method!"
self._raise_error(msg)
if self._tbrom_info is not None:
return list(self._tbrom_info)
return []
Expand Down

0 comments on commit e780602

Please sign in to comment.