fedoo.MultiFrameDataSet.get_history
- MultiFrameDataSet.get_history(field, indices=None, component=None, data_type='Node', return_list=False)
Retrieve history data from the MultiFrameDataSet.
This method load every iteration and save the requested data in array(s).
- Parameters:
field (str or list[str]) – Name(s) of the data field(s) to retrieve. If a list of str is given the function return a dict whose keys are each requested fields. If field is a str, only the requested field array is returned.
indices (int, list[int], list[list[int]] optional) – The node/elements/gauss point indice(s) over which the solution is extracted. When many fields are required, indices should be a list of same length than field.
component (int, str, None or list[int|str|None], optional) – Index or label of the component to extract if the data is multi-dimensional. If None, all components are returned.
data_type (str, None or list[str|None], default = "Node") – Desired data type to convert to. Can be one of ‘Node’, ‘Element’, or ‘GaussPoint’. If None, the original data type is preserved. A list may be given to use different data type for many fields.
- Returns:
history_data – If multiple data fields are requested, a dict whose keys are the field names is returned by default, or if return_list is True, an ordered list of array is returned instead of a dict. The returned arrays shape = (nb iterations, [nb_indices], [nb_comp]) If only one indice or component are extracted, the coresponding dimensions are removed.
- Return type:
dict|list[array] or array
Notes
This method may be costly, because it needed to load every iterations in memory. It is generaly more efficient to extract several fields in a single operation than to extract one field many times.