NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ read_from_hdf5() [2/3]

template<typename T >
void cntr::herm_matrix_timestep_view< T >::read_from_hdf5 ( hid_t  group_id)

Read herm_matrix_timestep_view from hdf5 group given by group ID group_id.

Purpose

Read herm_matrix_timestep_view from the hdf5 group given by group ID group_id If \(t>-1\) then ret,les,tv components are written, otherwise mat. Works for scalar or square-matrix contour objects.

Parameters
group_id

group ID for group to read from

Definition at line 1960 of file cntr_herm_matrix_timestep_view_impl.hpp.

1960  {
1961  // -- Read data: NO RESIZE POSSIBLE
1962  int tstp = read_primitive_type<int>(group_id, "tstp");
1963  int ntau = read_primitive_type<int>(group_id, "ntau");
1964  int sig = read_primitive_type<int>(group_id, "sig");
1965  int size1 = read_primitive_type<int>(group_id, "size1");
1966  int size2 = read_primitive_type<int>(group_id, "size2");
1967  int element_size = read_primitive_type<int>(group_id, "element_size");
1968 
1969  assert(element_size == element_size_ && size1 == size1_ && size2 == size2_ && tstp == tstp_ && ntau ==ntau_);
1970 
1971  sig_ = sig;
1972  if (tstp == -1) {
1973  hsize_t mat_size = (ntau + 1) * element_size;
1974  read_primitive_type_array(group_id, "mat", mat_size, matptr(0));
1975  } else if (tstp_ > -1) {
1976  hsize_t ret_size = (tstp_ + 1) * element_size;
1977  read_primitive_type_array(group_id, "ret", ret_size, retptr(0));
1978  hsize_t les_size = (tstp_ + 1) * element_size;
1979  read_primitive_type_array(group_id, "les", les_size, lesptr(0));
1980  hsize_t tv_size = (ntau_ + 1) * element_size;
1981  read_primitive_type_array(group_id, "tv", tv_size, tvptr(0));
1982  }
1983 }