NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ read_from_hdf5() [4/6]

template<typename T >
void cntr::function< T >::read_from_hdf5 ( int  nt1,
hid_t  group_id 
)

Read the function data from a hdf5 file

Purpose

Read the function data from a hdf5 file. The file is probably written by write_to_hdf5 method, or is assumed to have the same format.

Parameters
nt1

the number of time steps to be read

group_id

the group id of the hdf5 data

Definition at line 1005 of file cntr_function_impl.hpp.

References cntr::function< T >::data_, cntr::function< T >::nt(), cntr::function< T >::read_from_hdf5(), and cntr::function< T >::size1().

1005  {
1006  function<T> ftmp;
1007  ftmp.read_from_hdf5(group_id);
1008 
1009  assert(nt1 >= -1 && nt1 <= ftmp.nt());
1010  assert(nt1 >= -1 && nt1 <= nt_);
1011  assert(ftmp.size1() == size1_);
1012  assert(ftmp.element_size() == element_size_);
1013 
1014  memcpy(data_, ftmp.data_, sizeof(cplx) * (nt1 + 2) * element_size_);
1015 }
cplx * data_
Pointer to the function in the Matrix form on the real-time axis ( ) ; &#39;data_+ element_size&#39; corresp...
int size1_
Number of the colums in the Matrix form.
std::complex< T > cplx
int nt_
Maximum number of the time steps.
+ Here is the call graph for this function: