33 if (solver->
nsims > 1) {
36 strcat(fname_root,
"_");
37 strcat(fname_root, index);
38 strcat(fname_root,
"_");
42 strcat(filename,fname_root);
47 strcat(filename,
".dat");
53 int dim_global_x[ndims_x];
55 int dim_local_x[ndims_x];
62 xg = (
double*) calloc (size_g,
sizeof(
double));
65 int offset_global, offset_local;
66 offset_global = offset_local = 0;
67 for (d=0; d<ndims_x; d++) {
69 (mpi->
rank?NULL:&xg[offset_global]),
70 &solver->
x[offset_local+ghosts],
75 offset_global += dim_global_x[d];
76 offset_local += dim_local_x [d] + 2*ghosts;
84 field_g = (
double*) calloc (size_g,
sizeof(
double));
89 fprintf(stderr,
"Warning in VlasovWriteSpatialField():\n");
90 fprintf(stderr,
" field writing not yet supported for >1 spatial dimensions.\n");
94 (mpi->
rank ? NULL : field_g),
Some common functions used here and there.
MPI related function definitions.
Contains function definitions for common mathematical functions.
int VlasovWriteSpatialField(void *s, void *m, double *a_field, char *fname_root)
Some basic definitions and macros.
int WriteText(int, int, int *, double *, double *, char *, int *)
Structure containing all solver-specific variables and functions.
#define _MAX_STRING_SIZE_
int MPIGatherArray1D(void *, double *, double *, int, int, int, int)
Contains structure definition for hypar.
char op_overwrite[_MAX_STRING_SIZE_]
void GetStringFromInteger(int, char *, int)
#define _ArraySetValue_(x, size, value)
int(* WriteOutput)(int, int, int *, double *, double *, char *, int *)
Structure of MPI-related variables.
Function declarations for file I/O functions.
#define _ArrayCopy1D_(x, y, size)
Contains macros and function definitions for common array operations.