23 int bounds[ndims], index1[ndims], index2[ndims], offset[ndims],
32 index2[dir] = index1[dir] + size[dir]-ghosts;
73 int nsims = ctxt->
nsims;
78 std::vector<int> local_sizes(ctxt->
nproc ,0);
83 for (
int i=0; i<ctxt->
rank; i++) MPIOffset += local_sizes[i];
86 for (
int ns = 0; ns < nsims; ns++) {
92 ndims = solver->
ndims,
98 ctxt->
globalDOF[ns] = (
double*) calloc( npoints_wg,
sizeof(
double) );
101 for (
int i = 0; i < npoints; i++) {
102 int p = (ctxt->
points[ns]+i*nv)[ndims];
103 ctxt->
globalDOF[ns][p] = (double) (i + simOffset + MPIOffset);
106 for (
int i=0; i<ndims; i++) {
113 simOffset += npoints;
std::vector< int * > points
Structure defining a simulation.
C++ declarations for MPI-related functions.
int MPIExchangeBoundariesnD(int, int, int *, int, void *, double *)
Some basic definitions and macros.
int MPIMax_integer(int *, int *, int, void *)
Structure containing all solver-specific variables and functions.
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _ArrayIndex1DWO_(N, imax, i, offset, ghost, index)
Structure containing the variables for time-integration with PETSc.
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
static int ApplyPeriodicity(int dir, int ndims, int *size, int ghosts, double *phi)
Structure of MPI-related variables.
int npoints_local_wghosts
std::vector< double * > globalDOF
#define _ArrayCopy1D_(x, y, size)
Contains macros and function definitions for common array operations.
int PetscGlobalDOF(void *c)