_NodeData¶
- class _NodeData(dll: SofDll)¶
Bases:
objectThis class provides methods and a data structure to:
access keys
2/00of the CDB file;store the retrieved data in a convenient format;
provide access to the data after the CDB is closed.
The underlying data structure is a
pandas.DataFramewith the following columns:IDnode numberX0X-coordinateY0: Y-coordinateZ0: Z-coordinateKFIX: lateral stiffnessIS_:USED: rotational stiffness
The
DataFrameuses a MultiIndex with levelIDto enable fast lookups via thegetmethod. The index column is not dropped from theDataFrame.Note
Not all available quantities are retrieved and stored. In particular:
internal node id (“INR)
additional bit code (“NCOD”)
are currently not included.
This is a deliberate design choice and may be changed in the future without breaking the existing API.
- get(node_id: int, quantity: str, default: bool | float | None = None) float | int | bool¶
Retrieve the requested nodal quantity.
- Parameters:
- Returns:
value – The requested quantity if found. Otherwise, returns
defaultwhen it is not None.- Return type:
- Raises:
LookupError – If the requested quantity is not found and
defaultis None.
- get_data(deep: bool = True) DataFrame¶
Return the
pandas.DataFramecontaining the loaded key20/00.- Parameters:
deep (bool, default True) – When
deep=True, a new object will be created with a copy of the calling object’s data and indices. Modifications to the data or indices of the copy will not be reflected in the original object (refer topandas.DataFrame.copy()documentation for details).