sonVishal / TurbulentFlow

2 stars 0 forks source link

Communication of Pressure #1

Closed sonVishal closed 7 years ago

sonVishal commented 7 years ago
  1. Implement a boundary stencil PressureBufferFillStencil which reads the pressure values in each of the six (3D) boundary faces of a sub-domain (i.e. the domain of one process) and stores them consecutively in one-dimensional buffer arrays (one array for each of the six faces). For traversal of the respective sub-domain cells, cf. 1.
  2. Implement a boundary stencil PressureBufferReadStencil which reads data from one- dimensional arrays (one array for each of the six faces) and writes them into the correct cells of the boundary.
  3. Integrate the read- and write operations into a class PetscParallelManager. The PetscParallelManager should provide a method communicatePressure() which a) fills pressure values from the domain into buffers using the PressureBufferFill- Stencil, b) communicates the pressure values between neighbored processes. You may use the function MPI Sendrecv(...) for this purpose, c) reads pressure values from the buffers of the preceding communication step and writes them to the grid cells using the PressureBufferReadStencil.
zellnerm commented 7 years ago

Done. PressureBufferFillStancil/PressureBufferReadStencil and VecolityBufferFillStencil/VelocityBufferReadStencil are not necessary anymore. Current implementation uses MPI_Datatype and MPI_Datatype_vector to send the values to the neighbored processes.