29 int ndims = solver->
ndims;
30 int ghosts = solver->
ghosts;
37 double dxinv[ndims],dissp[ndims*ndims];
44 double local_diff[ndims];
45 local_diff[0] =
absolute(dissp[0*ndims+0]) * dt * dxinv[0] * dxinv[0];
46 local_diff[1] =
absolute(dissp[1*ndims+1]) * dt * dxinv[1] * dxinv[1];
47 local_diff[2] =
absolute(dissp[2*ndims+2]) * dt * dxinv[2] * dxinv[2];
48 local_diff[3] =
absolute(dissp[3*ndims+3]) * dt * dxinv[3] * dxinv[3];
50 if (local_diff[0] > max_diff) max_diff = local_diff[0];
51 if (local_diff[1] > max_diff) max_diff = local_diff[1];
52 if (local_diff[2] > max_diff) max_diff = local_diff[2];
53 if (local_diff[3] > max_diff) max_diff = local_diff[3];
int FPPowerSystem3BusDissipationFunction(int, int, void *, double, double *)
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
MPI related function definitions.
#define _GetCoordinate_(dir, i, dim, ghosts, x, coord)
Contains function definitions for common mathematical functions.
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.
double FPPowerSystem3BusComputeDiffNumber(void *s, void *m, double dt, double t)
Structure containing all solver-specific variables and functions.