Reads the herm_matrix
up to a given number of time steps from file in text format.
- Purpose
Reads the herm_matrix
to file in plain text format, which happens been created with the corresponding routine herm_matrix:print_to_file
. The herm_matrix
is read up to a given number of time steps nt1
.
- Parameters
-
nt1 |
Read up to this time step.
|
file |
The input file name.
|
Definition at line 1469 of file cntr_herm_matrix_impl.hpp.
1474 out.open(file, std::ios::in);
1476 if (!(out >> s >> n >> m >>
size1 >>
sig)) {
1477 std::cerr <<
"read G from file " << file <<
" error in file" 1482 assert(nt1 <= nt_ && "nt1 > nt_
"); 1483 assert(nt1 <= n && "nt1 > n
"); 1484 assert(m == ntau_ && "m /= ntau_
"); 1485 assert(size1 == size1_ && "size1 /= size1_
"); 1489 for (j = 0; j <= ntau_; j++) { 1491 for (l = 0; l < sg; l++) { 1492 if (!(out >> real >> imag)) { 1493 std::cerr << "read G from file
" << file 1494 << " error at mat (
" << j << ")
" << std::endl; 1497 matptr(j)[l] = std::complex<T>(real, imag); 1502 for (i = 0; i <= n; i++) { 1503 for (j = 0; j <= i; j++) { 1505 for (l = 0; l < sg; l++) { 1506 if (!(out >> real >> imag)) { 1507 std::cerr << "read G from file
" << file 1508 << " error at ret (
" << i << ",
" << j << ")
" 1513 retptr(i, j)[l] = std::complex<T>(real, imag); 1517 for (i = 0; i <= n; i++) { 1518 for (j = 0; j <= ntau_; j++) { 1520 for (l = 0; l < sg; l++) { 1521 if (!(out >> real >> imag)) { 1522 std::cerr << "read G from file
" << file 1523 << " error at tv (
" << i << ",
" << j << ")
" 1528 tvptr(i, j)[l] = std::complex<T>(real, imag); 1532 for (j = 0; j <= n; j++) { 1533 for (i = 0; i <= j; i++) { 1535 for (l = 0; l < sg; l++) { 1536 if (!(out >> real >> imag)) { 1537 std::cerr << "read G from file
" << file 1538 << " error at les (
" << i << ",
" << j << ")
" 1543 lesptr(i, j)[l] = std::complex<T>(real, imag);