HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Plot a vector field, stored as an array, and save to file. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <basic.h>
#include <arrayfunctions.h>
#include <plotfuncs.h>
#include <mpivars.h>
#include <hypar.h>
#include <Python.h>
#include <numpy/arrayobject.h>
Go to the source code of this file.
Macros | |
#define | NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION |
Functions | |
static int | PlotArraySerial (int, int, int *, int *, int, double *, double *, double, void *, void *, char *) |
int | PlotArray (int a_ndims, int a_nvars, int *a_dim_global, int *a_dim_local, int a_ghosts, double *a_x, double *a_u, double a_time, void *a_s, void *a_m, char *a_fname_root) |
Plot a vector field, stored as an array, and save to file.
Definition in file PlotArray.c.
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION |
Definition at line 21 of file PlotArray.c.
|
static |
Function to plot a vector field, stored as an array, and save the figure to a file. It will allocate the global domain on rank 0, so do not use for big problems for which the entire global domain will not fit on one node. This approach is also not very scalable.
a_ndims | Number of spatial dimensions |
a_nvars | Number of variables per grid point |
a_dim_global | Integer array of size a_ndims with global grid size in each dimension |
a_dim_local | Integer array of size a_ndims with local grid size in each dimension |
a_ghosts | Number of ghost points |
a_x | Array of spatial coordinates (i.e. the grid) |
a_u | Vector field to write |
a_time | Current simulation time |
a_s | Solver object of type HyPar |
a_m | MPI object of type MPIVariables |
a_fname_root | Filename root (extension is added automatically). For unsteady output, a numerical index is added that is the same as for the solution output files. |
Definition at line 66 of file PlotArray.c.
int PlotArray | ( | int | a_ndims, |
int | a_nvars, | ||
int * | a_dim_global, | ||
int * | a_dim_local, | ||
int | a_ghosts, | ||
double * | a_x, | ||
double * | a_u, | ||
double | a_time, | ||
void * | a_s, | ||
void * | a_m, | ||
char * | a_fname_root | ||
) |
Plot a vector field, stored as an array, and save figure to file: this is a wrapper function that calls PlotArraySerial().
a_ndims | Number of spatial dimensions |
a_nvars | Number of variables per grid point |
a_dim_global | Integer array of size a_ndims with global grid size in each dimension |
a_dim_local | Integer array of size a_ndims with local grid size in each dimension |
a_ghosts | Number of ghost points |
a_x | Array of spatial coordinates (i.e. the grid) |
a_u | Vector field to write |
a_time | Current simulation time |
a_s | Solver object of type HyPar |
a_m | MPI object of type MPIVariables |
a_fname_root | Filename root (extension is added automatically). For unsteady output, a numerical index is added that is the same as for the solution output files. |
Definition at line 31 of file PlotArray.c.