HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Gathers local 1D arrays to a global 1D array. 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 | MPIGatherArray1D (void *m, double *xg, double *x, int istart, int iend, int N_local, int ghosts) |
Gathers local 1D arrays to a global 1D array.
Definition in file MPIGatherArray1D.c.
int MPIGatherArray1D | ( | void * | m, |
double * | xg, | ||
double * | x, | ||
int | istart, | ||
int | iend, | ||
int | N_local, | ||
int | ghosts | ||
) |
Gathers the contents of a 1D array (partitioned amongst MPI ranks) into a global 1D array on the root rank (rank 0). See documentation of MPIExchangeBoundaries1D() on what a "1D array" is in the context of a multidimensional simulation. The 1D array must be the same along spatial dimensions normal to the one it represents.
Notes:
m | MPI object of type MPIVariables |
xg | Global 1D array (must be preallocated) without ghost points |
x | Local 1D array to be gathered |
istart | Starting index (global) of this rank's portion of the array |
iend | Ending index (global) of this rank's portion of the array + 1 |
N_local | Local size of the array |
ghosts | Number of ghost points |
Definition at line 26 of file MPIGatherArray1D.c.