HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Gather an n-dimensional array in to a global 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 | MPIGatherArraynD (int ndims, void *m, double *xg, double *x, int *dim_global, int *dim_local, int ghosts, int nvars) |
int | MPIGatherArraynDwGhosts (int ndims, void *m, double *xg, double *x, int *dim_global, int *dim_local, int ghosts, int nvars) |
Gather an n-dimensional array in to a global array.
Definition in file MPIGatherArraynD.c.
int MPIGatherArraynD | ( | int | ndims, |
void * | m, | ||
double * | xg, | ||
double * | x, | ||
int * | dim_global, | ||
int * | dim_local, | ||
int | ghosts, | ||
int | nvars | ||
) |
Gathers the contents of an n-dimensional array, partitioned amongst the MPI ranks, in to a global array on rank 0. See documentation of MPIExchangeBoundariesnD() for how the n-dimensional array is stored in the memory as a single-index array.
Notes:
ndims | Number of spatial dimensions |
m | MPI object of type MPIVariables |
xg | Global array (preallocated) without ghost points |
x | Local array |
dim_global | Integer array with elements as global size along each spatial dimension |
dim_local | Integer array with elements as local size along each spatial dimension |
ghosts | Number of ghost points |
nvars | Number of variables (vector components) |
Definition at line 21 of file MPIGatherArraynD.c.
int MPIGatherArraynDwGhosts | ( | int | ndims, |
void * | m, | ||
double * | xg, | ||
double * | x, | ||
int * | dim_global, | ||
int * | dim_local, | ||
int | ghosts, | ||
int | nvars | ||
) |
Gathers the contents of an n-dimensional array, partitioned amongst the MPI ranks, in to a global array on rank 0. See documentation of MPIExchangeBoundariesnD() for how the n-dimensional array is stored in the memory as a single-index array. This is same as MPIGatherArraynD() but where the global array has ghost points.
Notes:
ndims | Number of spatial dimensions |
m | MPI object of type MPIVariables |
xg | Global array (preallocated) with ghost points |
x | Local array |
dim_global | Integer array with elements as global size along each spatial dimension |
dim_local | Integer array with elements as local size along each spatial dimension |
ghosts | Number of ghost points |
nvars | Number of variables (vector components) |
Definition at line 115 of file MPIGatherArraynD.c.