NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ Send_timestep()

template<typename T >
void cntr::herm_matrix_timestep_view< T >::Send_timestep ( int  tstp,
int  dest,
int  tag 
)

Sends the herm_matrix_timestep_view at a given time step to a specific task.

Purpose

Sends the herm_matrix_timestep_view at a given time step tstp to a specific task with rank dest.

Parameters
tstp

Time step which should be send.

dest

The task rank to which the herm_matrix_timestep_view should be send.

tag

The MPI error flag.

Definition at line 1757 of file cntr_herm_matrix_timestep_view_impl.hpp.

1757  {
1758  int taskid;
1759  MPI_Comm_rank(MPI_COMM_WORLD, &taskid);
1760  assert(tstp == tstp_);
1761  if (!(taskid == dest)) {
1762  if (sizeof(T) == sizeof(double)){
1763  if (tstp_ == -1){
1764  MPI_Send(mat_, (ntau_ + 1) * element_size_, MPI_DOUBLE_COMPLEX, dest, tag, MPI_COMM_WORLD);
1765  } else {
1766  MPI_Send(les_, (tstp_ + 1) * element_size_, MPI_DOUBLE_COMPLEX, dest, tag, MPI_COMM_WORLD);
1767  MPI_Send(ret_, (tstp_ + 1) * element_size_, MPI_DOUBLE_COMPLEX, dest, tag, MPI_COMM_WORLD);
1768  MPI_Send(tv_, (ntau_ + 1) * element_size_, MPI_DOUBLE_COMPLEX, dest, tag, MPI_COMM_WORLD);
1769  }
1770  }
1771  else {
1772  if (tstp_ == -1){
1773  MPI_Send(mat_, (ntau_ + 1) * element_size_, MPI_COMPLEX, dest, tag, MPI_COMM_WORLD);
1774  } else {
1775  MPI_Send(les_, (tstp_ + 1) * element_size_, MPI_COMPLEX, dest, tag, MPI_COMM_WORLD);
1776  MPI_Send(ret_, (tstp_ + 1) * element_size_, MPI_COMPLEX, dest, tag, MPI_COMM_WORLD);
1777  MPI_Send(tv_, (ntau_ + 1) * element_size_, MPI_COMPLEX, dest, tag, MPI_COMM_WORLD);
1778  }
1779  }
1780  } else {
1781  // do nothing
1782  }
1783 }