34 int ndims = solver->
ndims;
35 int nvars = solver->
nvars;
36 int ghosts = solver->
ghosts;
39 int index_outer[ndims], index_inter[ndims], bounds_outer[ndims], bounds_inter[ndims];
41 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
46 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
49 double x1, x2,
drift[ndims];
53 x[0] = 0.5 * ( x1 + x2 );
57 }
else if (dir == 1) {
61 x[1] = 0.5 * ( x1 + x2 );
64 }
else if (dir == 2) {
69 x[2] = 0.5 * ( x1 + x2 );
71 }
else if (dir == 3) {
77 x[3] = 0.5 * ( x1 + x2 );
80 for (v = 0; v < nvars; v++)
81 fI[nvars*p+v] = drift[dir] * (drift[dir] > 0 ? fL[nvars*p+v] : fR[nvars*p+v] );
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
#define _GetCoordinate_(dir, i, dim, ghosts, x, coord)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
int FPPowerSystem3BusUpwind(double *, double *, double *, double *, double *, double *, int, void *, double)
int FPPowerSystem3BusDriftFunction(int, void *, double *, double, double *)
#define _ArrayCopy1D_(x, y, size)
Structure containing variable and parameters specific to the 3-bus power system model. This structure contains the physical parameters and variables for the Fokker-Planck model for a 3-bus power system.
Contains structure definition for hypar.
Some basic definitions and macros.
Contains macros and function definitions for common array operations.
Structure containing all solver-specific variables and functions.