NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ read_from_hdf5() [1/6]

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

Reads herm_matrix from a given HDF5 group handle.

Purpose

Reads the herm_matrix, including the matrix size, number of points on real and imaginary axis and fermionic/bosonic character, from a given HDF5 group handle.

Parameters
group_id

[hid_t] The HDF5 group handle from which the herm_matrix is read.

Definition at line 1668 of file cntr_herm_matrix_impl.hpp.

1668  {
1669  // -- Read dimensions
1670  int nt = read_primitive_type<int>(group_id, "nt");
1671  int ntau = read_primitive_type<int>(group_id, "ntau");
1672  int sig = read_primitive_type<int>(group_id, "sig");
1673  int size1 = read_primitive_type<int>(group_id, "size1");
1674  // RESIZE G
1675  this->resize(nt, ntau, size1);
1676  sig_ = sig;
1677  if (nt > -2) {
1678  hsize_t mat_size = (ntau + 1) * element_size_;
1679  read_primitive_type_array(group_id, "mat", mat_size, matptr(0));
1680  }
1681  if (nt > -1) {
1682  hsize_t ret_size = ((nt + 1) * (nt + 2)) / 2 * element_size_;
1683  hsize_t les_size = ((nt + 1) * (nt + 2)) / 2 * element_size_;
1684  hsize_t tv_size = ((nt + 1) * (ntau + 1)) * element_size_;
1685  read_primitive_type_array(group_id, "ret", ret_size, retptr(0, 0));
1686  read_primitive_type_array(group_id, "les", les_size, lesptr(0, 0));
1687  read_primitive_type_array(group_id, "tv", tv_size, tvptr(0, 0));
1688  }
1689 }
void resize(int nt, int ntau, int size1)
Resizes herm_matrix object with respect to the number of time points nt, points on the Matsubara bra...