|
HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Partition a global n-dimensional 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 | MPIPartitionArraynD (int ndims, void *m, double *xg, double *x, int *dim_global, int *dim_local, int ghosts, int nvars) |
| int | MPIPartitionArraynDwGhosts (int ndims, void *m, double *xg, double *x, int *dim_global, int *dim_local, int ghosts, int nvars) |
Partition a global n-dimensional array.
Definition in file MPIPartitionArraynD.c.
| int MPIPartitionArraynD | ( | int | ndims, |
| void * | m, | ||
| double * | xg, | ||
| double * | x, | ||
| int * | dim_global, | ||
| int * | dim_local, | ||
| int | ghosts, | ||
| int | nvars | ||
| ) |
Partitions the contents of a global n-dimensional array on rank 0 (root) to local n-dimensional arrays on all the MPI ranks. 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 MPIPartitionArraynD.c.
| int MPIPartitionArraynDwGhosts | ( | int | ndims, |
| void * | m, | ||
| double * | xg, | ||
| double * | x, | ||
| int * | dim_global, | ||
| int * | dim_local, | ||
| int | ghosts, | ||
| int | nvars | ||
| ) |
Partitions the contents of a global n-dimensional array on rank 0 (root) to local n-dimensional arrays on all the MPI ranks. See documentation of MPIExchangeBoundariesnD() for how the n-dimensional array is stored in the memory as a single-index array. This is same as MPIPartitionArraynD() but where the global array has ghost points.
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 114 of file MPIPartitionArraynD.c.