HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Send a part of a local array to another MPI rank. More...
#include <stdio.h>
#include <stdlib.h>
#include <basic.h>
#include <arrayfunctions.h>
#include <mpivars.h>
Go to the source code of this file.
Functions | |
int | MPIGetArrayDatanD (double *xbuf, double *x, int *source, int *dest, int *limits, int *dim, int ghosts, int ndims, int nvars, void *m) |
Send a part of a local array to another MPI rank.
Definition in file MPIGetArrayDatanD.c.
int MPIGetArrayDatanD | ( | double * | xbuf, |
double * | x, | ||
int * | source, | ||
int * | dest, | ||
int * | limits, | ||
int * | dim, | ||
int | ghosts, | ||
int | ndims, | ||
int | nvars, | ||
void * | m | ||
) |
This function lets one rank get a portion of a local n-dimensional array on another rank. The n-dimensional array must be stored in the memory as a single-index array as described in the documentation of MPIExchangeBoundariesnD(). The source rank sends to the dest rank a logically rectangular n-dimensional portion of its local copy of an array x. The extent of this logically rectangular portion is defined by limits.
xbuf | preallocated memory on destination rank to hold the received data |
x | local array of which a part is needed |
source | MPI rank of the source |
dest | MPI rank of the destination |
limits | Integer array (of size 2*ndims) with the start and end indices along each spatial dimension of the desired portion of the array |
dim | Integer array whose elements are the local size of x in each spatial dimension |
ghosts | Number of ghost points |
ndims | Number of spatial dimensions |
nvars | Number of variables (vector components) |
m | MPI object of type MPIVariables |
Definition at line 21 of file MPIGetArrayDatanD.c.